[MediaWiki-commits] [Gerrit] oojs/ui[master]: FloatableElement: Abort positioning if no longer attached

2017-03-16 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343248 )

Change subject: FloatableElement: Abort positioning if no longer attached
..

FloatableElement: Abort positioning if no longer attached

Some parts of the positioning code break if the element is outside of the DOM,
because invalid CSS values start showing up. Plus, if it's not in the DOM
positioning isn't really meaningful any more.

Bug: T160197
Change-Id: Ia004fc1422a9116830b9a4aece4992ca39f33d4c
---
M src/mixins/FloatableElement.js
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/48/343248/1

diff --git a/src/mixins/FloatableElement.js b/src/mixins/FloatableElement.js
index b0b8c8a..0a2e8c4 100644
--- a/src/mixins/FloatableElement.js
+++ b/src/mixins/FloatableElement.js
@@ -251,6 +251,11 @@
return this;
}
 
+   if ( !( this.isElementAttached() && $.contains( 
this.getElementDocument(), this.$floatableClosestScrollable ) ) ) {
+   // Abort early if important parts of the widget are no longer 
attached to the DOM
+   return this;
+   }
+
if ( this.hideWhenOutOfView && !this.isElementInViewport( 
this.$floatableContainer, this.$floatableClosestScrollable ) ) {
this.$floatable.addClass( 'oo-ui-element-hidden' );
return this;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia004fc1422a9116830b9a4aece4992ca39f33d4c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: statistics/cruncher: Add reportupdater job for edit-beta-fea...

2017-03-16 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343246 )

Change subject: statistics/cruncher: Add reportupdater job for 
edit-beta-features
..

statistics/cruncher: Add reportupdater job for edit-beta-features

Depends-On: Ib06a6434478c7adc90b5200193e0959e4b825569
Change-Id: Icb57331bbcfe9746c9f9920eeed2284f042416bf
---
M modules/role/manifests/statistics/cruncher.pp
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/343246/1

diff --git a/modules/role/manifests/statistics/cruncher.pp 
b/modules/role/manifests/statistics/cruncher.pp
index 0c39b01..db5d6d6 100644
--- a/modules/role/manifests/statistics/cruncher.pp
+++ b/modules/role/manifests/statistics/cruncher.pp
@@ -63,6 +63,10 @@
 repository => 'limn-edit-data',
 output_dir => 'metrics',
 }
+reportupdater::job { 'edit-beta-features':
+repository => 'limn-edit-data',
+output_dir => 'metrics/beta-feature-enables',
+}
 reportupdater::job { 'language':
 repository => 'limn-language-data',
 output_dir => 'metrics/beta-feature-enables',

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

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

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


[MediaWiki-commits] [Gerrit] analytics/limn-edit-data[master]: Add stats for the "New wikitext mode" beta feature

2017-03-16 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343247 )

Change subject: Add stats for the "New wikitext mode" beta feature
..

Add stats for the "New wikitext mode" beta feature

Change-Id: Ib06a6434478c7adc90b5200193e0959e4b825569
---
A edit-beta-features/config.yaml
A edit-beta-features/nwe_beta.sql
A edit-beta-features/nwe_dbs.txt
3 files changed, 40 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-edit-data 
refs/changes/47/343247/1

diff --git a/edit-beta-features/config.yaml b/edit-beta-features/config.yaml
new file mode 100644
index 000..dd2a436
--- /dev/null
+++ b/edit-beta-features/config.yaml
@@ -0,0 +1,16 @@
+databases:
+mediawiki:
+host: "analytics-store.eqiad.wmnet"
+port: 3306
+creds_file: /a/.my.cnf.research
+db: enwiki # just a default, queries already specify it
+
+defaults:
+db: mediawiki
+
+reports:
+nwe_beta:
+granularity: days
+starts: 2017-03-17
+explode_by:
+wiki_db: nwe_dbs.txt
diff --git a/edit-beta-features/nwe_beta.sql b/edit-beta-features/nwe_beta.sql
new file mode 100644
index 000..2dca064
--- /dev/null
+++ b/edit-beta-features/nwe_beta.sql
@@ -0,0 +1,6 @@
+ select date('{from_timestamp}') as date,
+count(*) as {wiki_db}
+   from {wiki_db}.user_properties
+  where up_property='visualeditor-newwikitext'
+and up_value=1
+;
diff --git a/edit-beta-features/nwe_dbs.txt b/edit-beta-features/nwe_dbs.txt
new file mode 100644
index 000..7666a51
--- /dev/null
+++ b/edit-beta-features/nwe_dbs.txt
@@ -0,0 +1,18 @@
+enwiki
+dewiki
+frwiki
+eswiki
+jawiki
+ruwiki
+itwiki
+zhwiki
+ptwiki
+arwiki
+plwiki
+nlwiki
+trwiki
+svwiki
+hewiki
+commonswiki
+wikidatawiki
+enwiktionary

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib06a6434478c7adc90b5200193e0959e4b825569
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-edit-data
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Revert "Temporarily disable template, category related tests...

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342981 )

Change subject: Revert "Temporarily disable template, category related tests 
(3rd time)"
..


Revert "Temporarily disable template, category related tests (3rd time)"

This reverts commit 31a8caa945147c7d3b13286da20711003911acfd.

Change-Id: Ic9c73af07a2c9ef09ca3989228d9f11893292f2f
---
M ContentTranslation.hooks.php
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 96da8fb..c349729 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -375,10 +375,9 @@
 
$modules['qunit']['ext.cx.tools.tests'] = [
'scripts' => [
-   // TODO: Following commented tests need to 
better rewritten using mockdata.
-   // 
'tests/qunit/tools/ext.cx.tools.template.test.js',
+   
'tests/qunit/tools/ext.cx.tools.template.test.js',

'tests/qunit/tools/ext.cx.tools.mtabuse.test.js',
-   // 
'tests/qunit/tools/ext.cx.tools.categories.test.js',
+   
'tests/qunit/tools/ext.cx.tools.categories.test.js',
],
'dependencies' => [
'ext.cx.model',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9c73af07a2c9ef09ca3989228d9f11893292f2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Remove broken plaintext section markers

2017-03-16 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343245 )

Change subject: Remove broken plaintext section markers
..

Remove broken plaintext section markers

The heading tags from getExtract is useful even in plaintext output
mode. These tags, scrambled to a special format by ExtractFormatter,
are used by doSection(), which looks for such markers and reformat
them as specified by sectionformat.

When truncated, incomplete markers will become U+FFFD characters in
the API output (see bug below). This patch modifies
ApiQueryExtracts::tidy( $text ) to search for and eliminate broken
markers at the end.

Change-Id: If0bd35035e179282e126600068583094b7a9f683
---
M includes/ApiQueryExtracts.php
1 file changed, 37 insertions(+), 2 deletions(-)


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

diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index f80b90b..d6ba615 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -318,17 +318,52 @@
}
 
/**
-* A simple wrapper around tidy
+* Cleans up the text. Wraps tidy for HTML, trims out broken section 
markers for plaintext
 * @param string $text
 * @return string
 */
private function tidy( $text ) {
-   if ( $this->getConfig()->get( 'UseTidy' ) && 
!$this->params['plaintext'] ) {
+   static $regexp = false;
+   if ( $this->params['plaintext'] ) {
+   if ( $regexp === false ) {
+   // Prepare a structure for making partial 
regexes
+   $split_atoms = array_merge(
+   
str_split(ExtractFormatter::SECTION_MARKER_START),
+   array('\d'),
+   // A complete marker not followed by 
text is useless, trim it too
+   // (Still no guarantee for partial 
heading text)
+   
str_split(ExtractFormatter::SECTION_MARKER_END)
+   );
+   // Look for truncated section markers at the 
very end
+   // (That's where truncation happens)
+   $regexp = $this->makeTruncatedRegex( 
$split_atoms ) . '$/D';
+   }
+
+   $text = preg_replace( $regexp, "", $text );
+   } elseif ( $this->getConfig()->get( 'UseTidy' ) ) {
$text = trim( MWTidy::tidy( $text ) );
}
return $text;
}
 
+   /* Constructs a regular expression for matching partial substrings from 
a list of atoms.
+* @param array $atoms
+* @return string
+*/
+   private function makeTruncatedRegex( $atoms ) {
+   $open = "(?:";  // open a non-capture group
+   $close = ")?";  // end an optional group
+
+   // Maybe use a join() with a hardcoded "?" next time
+   $regexp = '/';
+   foreach ( array_expression as $atom ) {
+   $regexp .= $open . $atom;
+   }
+   $regexp .= str_repeat( $close, count( $atoms ) ) . '/';
+
+   return $regexp;
+   }
+
private function doSections( $text ) {
$text = preg_replace_callback(
"/" . ExtractFormatter::SECTION_MARKER_START . '(\d)'. 
ExtractFormatter::SECTION_MARKER_END . "(.*?)$/m",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0bd35035e179282e126600068583094b7a9f683
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Artoria2e5 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: Add follow_redirects query param to the wt2html endpoin...

2017-03-16 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343244 )

Change subject: WIP: Add follow_redirects query param to the wt2html endpoint 
in dev API
..

WIP: Add follow_redirects query param to the wt2html endpoint in dev API

* This is just a quick test patch for discussion.

* We need this for make visual diff testing more useful. Looks like
  almost 1 in 3 titles added to the test database is a redirect
  which makes all those titles useless for visual diff testing.

* Is there any benefit to exposing this outside the dev API?

Change-Id: I7d8727476a9a05bfc87a6f32ece2f61d357df5c7
---
M lib/api/apiUtils.js
M lib/api/routes.js
2 files changed, 34 insertions(+), 0 deletions(-)


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

diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 8c77f20..be5b261 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -460,6 +460,30 @@
 };
 
 /**
+ * @method
+ * @param {Request} req
+ * @param {Response} res
+ */
+apiUtils._redirectToPage = function(title, req, res) {
+   var opts = res.locals.opts;
+   var env = res.locals.env;
+   var prefix = res.locals.iwp;
+   var format = opts.format;
+   var path = [
+   '',
+   env.conf.parsoid.mwApiMap.get(prefix).domain,
+   'v3',
+   'page',
+   format,
+   encodeURIComponent(title),
+   ].join('/');
+   env.log('info', 'redirecting to page', title, 'for', format);
+   // Don't cache redirects
+   apiUtils.setHeader(res, 'Cache-Control', 'private,no-cache,s-maxage=0');
+   apiUtils.relativeRedirect(res, path);
+};
+
+/**
  * See if we can reuse transclusion or extension expansions.
  *
  * @method
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 0e5c6f0..ef9cd6a 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -472,6 +472,15 @@
return apiUtils.redirectToOldid(req, res);
}
 
+   // Follow redirects if asked
+   if (env.conf.parsoid.devAPI && 
req.query.follow_redirects) {
+   var s = wikitext || env.page.src;
+   var redirMatch = 
s.match(/^\s*#redirect\s\[\[([^\[\]]+)\]\]\s*/i);
+   if (redirMatch) {
+   return 
apiUtils._redirectToPage(redirMatch[1], req, res);
+   }
+   }
+
env.log('info', 'started parsing');
 
var p2;
@@ -499,6 +508,7 @@
 
p2 = env.getContentHandler().toHTML(env);
} else if (oldid) {
+
// Indicate the MediaWiki revision in a header 
as well for
// ease of extraction in clients.
apiUtils.setHeader(res, 'content-revision-id', 
oldid);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d8727476a9a05bfc87a6f32ece2f61d357df5c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Remove broken plaintext section markers

2017-03-16 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343243 )

Change subject: Remove broken plaintext section markers
..

Remove broken plaintext section markers

The heading tags from getExtract is useful even in plaintext output
mode. These tags, scrambled to a special format by ExtractFormatter,
are used by doSection(), which looks for such markers and reformat
them as specified by sectionformat.

When truncated, incomplete markers will become U+FFFD characters in
the API output (see bug below). This patch modifies
ApiQueryExtracts::tidy( $text ) to search for and eliminate broken
markers at the end.

Change-Id: I7f88ad8179f3837a2db57abbb4352963e51544db
---
M includes/ApiQueryExtracts.php
1 file changed, 37 insertions(+), 2 deletions(-)


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

diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index f80b90b..f0b7682 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -318,17 +318,52 @@
}
 
/**
-* A simple wrapper around tidy
+* Cleans up the text. Wraps tidy for HTML, trims out broken section 
markers for plaintext
 * @param string $text
 * @return string
 */
private function tidy( $text ) {
-   if ( $this->getConfig()->get( 'UseTidy' ) && 
!$this->params['plaintext'] ) {
+   static $regexp = false;
+   if ( $this->params['plaintext'] ) {
+   if ( $regexp === false ) {
+   // Prepare a structure for making partial 
regexes
+   $split_atoms = array_merge(
+   
str_split(ExtractFormatter::SECTION_MARKER_START),
+   array('\d'),
+   // A complete marker not followed by 
text is useless, trim it too
+   // (Still no guarantee for partial 
heading text)
+   
str_split(ExtractFormatter::SECTION_MARKER_END)
+   );
+   // Look for truncated section markers at the 
very end
+   // (That's where truncation happens)
+   $regexp = $this->makeTruncatedRegex( 
$split_atoms ) . '$/D';
+   }
+
+   $text = preg_replace( $regexp, "", $text );
+   } elseif ( $this->getConfig()->get( 'UseTidy' ) ) {
$text = trim( MWTidy::tidy( $text ) );
}
return $text;
}
 
+   /* Constructs a regular expression for matching partial substrings from 
a list of atoms.
+* @param array $atoms
+* @return string
+*/
+   private function makeTruncatedRegex( $atoms ) {
+   const OPEN = "(?:";  // open a non-capture group
+   const CLOSE = ")?";  // end an optional group
+
+   // Maybe use a join() with a hardcoded "?" next time
+   $regexp = '/';
+   foreach ( array_expression as $atom ) {
+   $regexp .= OPEN . $atom;
+   }
+   $regexp .= str_repeat( CLOSE, count( $atoms ) ) . '/';
+
+   return $regexp;
+   }
+
private function doSections( $text ) {
$text = preg_replace_callback(
"/" . ExtractFormatter::SECTION_MARKER_START . '(\d)'. 
ExtractFormatter::SECTION_MARKER_END . "(.*?)$/m",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f88ad8179f3837a2db57abbb4352963e51544db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Artoria2e5 
Gerrit-Reviewer: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T160599: Ignore thumbtime linter errors temporarily

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343080 )

Change subject: T160599: Ignore thumbtime linter errors temporarily
..


T160599: Ignore thumbtime linter errors temporarily

Change-Id: I5ae0e1002cbc42c819f2ee8e4c8de83d234c0364
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index b8ac598..0d7b005 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -240,7 +240,10 @@
var items = [];
dp.optList.forEach(function(item) {
if (item.ck === "bogus") {
-   items.push(item.ak);
+   // Temporary hack for T160599
+   if 
(!/^\s*thumbtime(\s*=\s*\d+)?\s*$/.test(item.ak)) {
+   items.push(item.ak);
+   }
}
});
if (items.length) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ae0e1002cbc42c819f2ee8e4c8de83d234c0364
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: CX2: Use OO.ui.Toolbar for Formatter tool

2017-03-16 Thread Santhosh (Code Review)
Santhosh has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342822 )

Change subject: CX2: Use OO.ui.Toolbar for Formatter tool
..


CX2: Use OO.ui.Toolbar for Formatter tool

Change-Id: I5e63ef5ca6158e8534283413b21ac09ab962e419
---
M modules/tools/mw.cx.tools.FormatterTool.js
M modules/tools/styles/mw.cx.tools.FormatterTool.less
2 files changed, 81 insertions(+), 23 deletions(-)

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



diff --git a/modules/tools/mw.cx.tools.FormatterTool.js 
b/modules/tools/mw.cx.tools.FormatterTool.js
index 6ad3971..b4e65d1 100644
--- a/modules/tools/mw.cx.tools.FormatterTool.js
+++ b/modules/tools/mw.cx.tools.FormatterTool.js
@@ -27,29 +27,86 @@
  * @inheritDoc
  */
 mw.cx.tools.FormatterTool.prototype.getActions = function () {
-   var formatterButtonGroup, undoButton, redoButton, boldButton, 
italicButton, orderedlistButton, unOrderedlistButton;
-   undoButton = new OO.ui.ButtonWidget( {
-   icon: 'undo'
-   } );
-   redoButton = new OO.ui.ButtonWidget( {
-   icon: 'redo'
-   } );
-   boldButton = new OO.ui.ButtonWidget( {
-   icon: 'bold'
-   } );
-   italicButton = new OO.ui.ButtonWidget( {
-   icon: 'italic'
-   } );
-   orderedlistButton = new OO.ui.ButtonWidget( {
-   icon: 'listBullet'
-   } );
-   unOrderedlistButton = new OO.ui.ButtonWidget( {
-   icon: 'listNumbered'
-   } );
-   formatterButtonGroup = new OO.ui.ButtonGroupWidget( {
-   items: [ undoButton, redoButton, boldButton, italicButton, 
orderedlistButton, unOrderedlistButton ]
-   } );
-   return [ formatterButtonGroup ];
+   var toolFactory, toolGroupFactory, toolbar;
+
+  // Create the toolbar
+   toolFactory = new OO.ui.ToolFactory();
+   toolGroupFactory = new OO.ui.ToolGroupFactory();
+   // Define the tools that we're going to place in our toolbar
+
+   // Create a class inheriting from OO.ui.Tool
+   function UndoTool() {
+   UndoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( UndoTool, OO.ui.Tool );
+   UndoTool.static.name = 'undo';
+   UndoTool.static.icon = 'undo';
+   UndoTool.prototype.onUpdateState = function () {};
+   toolFactory.register( UndoTool );
+
+   function RedoTool() {
+   RedoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( RedoTool, OO.ui.Tool );
+   RedoTool.static.name = 'redo';
+   RedoTool.static.icon = 'redo';
+   RedoTool.prototype.onUpdateState = function () {};
+   toolFactory.register( RedoTool );
+
+   function BoldTool() {
+   RedoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( BoldTool, OO.ui.Tool );
+   BoldTool.static.name = 'bold';
+   BoldTool.static.icon = 'bold';
+   BoldTool.prototype.onUpdateState = function () {};
+   toolFactory.register( BoldTool );
+
+   function ItalicTool() {
+   RedoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( ItalicTool, OO.ui.Tool );
+   ItalicTool.static.name = 'italic';
+   ItalicTool.static.icon = 'italic';
+   ItalicTool.prototype.onUpdateState = function () {};
+   toolFactory.register( ItalicTool );
+
+   function ListBulletTool() {
+   RedoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( ListBulletTool, OO.ui.Tool );
+   ListBulletTool.static.name = 'listBullet';
+   ListBulletTool.static.icon = 'listBullet';
+   ListBulletTool.prototype.onUpdateState = function () {};
+   toolFactory.register( ListBulletTool );
+
+   function ListNumberedTool() {
+   RedoTool.parent.apply( this, arguments );
+   }
+   OO.inheritClass( ListNumberedTool, OO.ui.Tool );
+   ListNumberedTool.static.name = 'listNumbered';
+   ListNumberedTool.static.icon = 'listNumbered';
+   ListNumberedTool.prototype.onUpdateState = function () {};
+   toolFactory.register( ListNumberedTool );
+
+   toolbar = new OO.ui.Toolbar( toolFactory, toolGroupFactory );
+   // Finally define which tools and in what order appear in the toolbar. 
Each tool may only be
+   // used once (but not all defined tools must be used).
+   toolbar.setup( [
+   {
+   type: 'bar',
+   include: [ 'undo', 'redo' ]
+   },
+   {
+   type: 'bar',
+   include: [ 'bold', 'italic' ]
+   },
+   {
+   type: 'bar',
+   include: [ 'listBullet', 'listNumbered' ]
+   }
+   ] );
+   return [ toolbar ];
 };
 
 /**
diff --git a/modules/tools/styles/mw.cx.tools.FormatterTool.less 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: CX2: Remove the padding for the search tool

2017-03-16 Thread Santhosh (Code Review)
Santhosh has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342821 )

Change subject: CX2: Remove the padding for the search tool
..


CX2: Remove the padding for the search tool

Change-Id: I119a53cf0545f9dc6191c6ff0d0a5f908a16f1a6
---
M modules/tools/styles/mw.cx.tools.SearchTool.less
1 file changed, 10 insertions(+), 9 deletions(-)

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



diff --git a/modules/tools/styles/mw.cx.tools.SearchTool.less 
b/modules/tools/styles/mw.cx.tools.SearchTool.less
index 3d885ac..76ead23 100644
--- a/modules/tools/styles/mw.cx.tools.SearchTool.less
+++ b/modules/tools/styles/mw.cx.tools.SearchTool.less
@@ -6,13 +6,14 @@
display: none;
}
border: 0;
-}
-
-.cx-card--search__input {
-   font-size: 1em;
-   width: 100%;
-   height: 2.5em;
-   border: 0;
-   background: none;
-   outline: 0;
+   padding: 0;
+   .oo-ui-textInputWidget input,
+   .oo-ui-textInputWidget textarea {
+   font-size: 1em;
+   width: 100%;
+   height: 2.5em;
+   border: 0;
+   background: none;
+   outline: 0;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I119a53cf0545f9dc6191c6ff0d0a5f908a16f1a6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: MWExceptionRenderer: Don't try to use OutputPage without a T...

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343242 )

Change subject: MWExceptionRenderer: Don't try to use OutputPage without a Title
..

MWExceptionRenderer: Don't try to use OutputPage without a Title

While OutputPage might not depend on having a Title set up,
it has many hooks, and extensions using them might.

Example way to reproduce the problem: cause a fatal in
ResourceLoaderFileModule::getDefinitionSummary() while
having the MultimediaViewer extension installed.

Change-Id: Id356dfafb2c66ca0c85eb08dac421dbb6f911d63
---
M includes/exception/MWExceptionRenderer.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/343242/1

diff --git a/includes/exception/MWExceptionRenderer.php 
b/includes/exception/MWExceptionRenderer.php
index a569bcd..59c8be8 100644
--- a/includes/exception/MWExceptionRenderer.php
+++ b/includes/exception/MWExceptionRenderer.php
@@ -136,9 +136,13 @@
}
}
 
+   // Has the OutputPage been set up, and does it have basic stuff 
like a Title?
+   if ( empty( $GLOBALS['wgOut'] ) || 
!$GLOBALS['wgOut']->getTitle() ) {
+   return false;
+   }
+
return (
!empty( $GLOBALS['wgFullyInitialised'] ) &&
-   !empty( $GLOBALS['wgOut'] ) &&
!defined( 'MEDIAWIKI_INSTALL' )
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id356dfafb2c66ca0c85eb08dac421dbb6f911d63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/mediawiki-config[master]: speed-tests: Remove old/unused files

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343241 )

Change subject: speed-tests: Remove old/unused files
..


speed-tests: Remove old/unused files

No longer used, no longer work the same due to external references.
Also these are the last references to the deprecated "/images"
entry point.

Change-Id: I1e23204c4d411060efd50dfa16c96329a780aa3b
---
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.NetSpeed_B.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-images.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-refs.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-srcset.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-top-css.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.ooui-mobile.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.original.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.preconnect.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.top-css-inlined.html
M docroot/wikipedia.org/speed-tests/pages.html
10 files changed, 1 insertion(+), 37,954 deletions(-)

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




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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: speed-tests: Remove old/unused files

2017-03-16 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343241 )

Change subject: speed-tests: Remove old/unused files
..

speed-tests: Remove old/unused files

No longer used, no longer work the same due to external references.
Also these are the last references to the deprecated "/images"
entry point.

Change-Id: I1e23204c4d411060efd50dfa16c96329a780aa3b
---
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.NetSpeed_B.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-images.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-refs.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-srcset.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.no-top-css.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.ooui-mobile.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.original.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.preconnect.html
D docroot/wikipedia.org/speed-tests/Barack_Obama.701448389.top-css-inlined.html
M docroot/wikipedia.org/speed-tests/pages.html
10 files changed, 1 insertion(+), 37,954 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Secure call to DOMDocument::loadHTML()

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342439 )

Change subject: Secure call to DOMDocument::loadHTML()
..


Secure call to DOMDocument::loadHTML()

Bug: T159458
Change-Id: I2bc425a34ef5cbfb641b285dc155368cc8937129
---
M includes/PF_AutoeditAPI.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/PF_AutoeditAPI.php b/includes/PF_AutoeditAPI.php
index f46ddc5..20de345 100644
--- a/includes/PF_AutoeditAPI.php
+++ b/includes/PF_AutoeditAPI.php
@@ -989,11 +989,13 @@
 
$data = array( );
$doc = new DOMDocument();
+   $oldVal = libxml_disable_entity_loader( true );
@$doc->loadHTML(
'http://www.w3.org/TR/REC-html40/loose.dtd;>'
. $html
. ''
);
+   libxml_disable_entity_loader( $oldVal );
 
// Process input tags.
$inputs = $doc->getElementsByTagName( 'input' );
@@ -1247,4 +1249,4 @@
return __CLASS__ . '-' . PF_VERSION . ($gitSha1 !== false) ? ' 
(' . substr( $gitSha1, 0, 7 ) . ')' : '';
}
 
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bc425a34ef5cbfb641b285dc155368cc8937129
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 
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] mediawiki...Example[master]: [DO NOT MERGE] Example of defining custom OOjs UI theme

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343240 )

Change subject: [DO NOT MERGE] Example of defining custom OOjs UI theme
..

[DO NOT MERGE] Example of defining custom OOjs UI theme

Using the 'blank' theme, which only contains "structural" styles and
no actual design.

Added some extra icons too, using upside-down versions of real ones.

Special:MovePage or Special:Search are good places to see the effect.

Bug: T100896
Change-Id: I9187a63e509b601b8558ea82850fa828e5c8cc0a
---
A includes/ooui/BlankTheme.php
A resources/ooui/icons.json
A resources/ooui/images/icons/add.svg
A resources/ooui/images/icons/advanced.svg
A resources/ooui/images/icons/alert.svg
A resources/ooui/images/icons/arched-arrow-ltr.svg
A resources/ooui/images/icons/arched-arrow-rtl.svg
A resources/ooui/images/icons/cancel.svg
A resources/ooui/images/icons/check.svg
A resources/ooui/images/icons/circle.svg
A resources/ooui/images/icons/close.svg
A resources/ooui/images/icons/code.svg
A resources/ooui/images/icons/collapse.svg
A resources/ooui/images/icons/comment.svg
A resources/ooui/images/icons/ellipsis.svg
A resources/ooui/images/icons/expand.svg
A resources/ooui/images/icons/help-ltr.svg
A resources/ooui/images/icons/help-rtl.svg
A resources/ooui/images/icons/history.svg
A resources/ooui/images/icons/info.svg
A resources/ooui/images/icons/menu.svg
A resources/ooui/images/icons/move-ltr.svg
A resources/ooui/images/icons/move-rtl.svg
A resources/ooui/images/icons/notice.svg
A resources/ooui/images/icons/search-ltr.svg
A resources/ooui/images/icons/search-rtl.svg
A resources/ooui/images/icons/settings.svg
A resources/ooui/images/icons/tag.svg
A resources/ooui/images/icons/trash.svg
A resources/ooui/images/icons/window.svg
A resources/ooui/oojs-ui-blank.js
A resources/ooui/oojs-ui-core-blank.css
A resources/ooui/oojs-ui-toolbars-blank.css
A resources/ooui/oojs-ui-widgets-blank.css
A resources/ooui/oojs-ui-windows-blank.css
M skin.json
36 files changed, 1,625 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/40/343240/1

diff --git a/includes/ooui/BlankTheme.php b/includes/ooui/BlankTheme.php
new file mode 100644
index 000..fa27c47
--- /dev/null
+++ b/includes/ooui/BlankTheme.php
@@ -0,0 +1,17 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
+
+
diff --git a/resources/ooui/images/icons/advanced.svg 
b/resources/ooui/images/icons/advanced.svg
new file mode 100644
index 000..c2d2e12
--- /dev/null
+++ b/resources/ooui/images/icons/advanced.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
diff --git a/resources/ooui/images/icons/alert.svg 
b/resources/ooui/images/icons/alert.svg
new file mode 100644
index 000..4bb3fd0
--- /dev/null
+++ b/resources/ooui/images/icons/alert.svg
@@ -0,0 +1,8 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
+
+
+
+
diff --git a/resources/ooui/images/icons/arched-arrow-ltr.svg 
b/resources/ooui/images/icons/arched-arrow-ltr.svg
new file mode 100644
index 000..62a7ecd
--- /dev/null
+++ b/resources/ooui/images/icons/arched-arrow-ltr.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
diff --git a/resources/ooui/images/icons/arched-arrow-rtl.svg 
b/resources/ooui/images/icons/arched-arrow-rtl.svg
new file mode 100644
index 000..f0ce101
--- /dev/null
+++ b/resources/ooui/images/icons/arched-arrow-rtl.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
diff --git a/resources/ooui/images/icons/cancel.svg 
b/resources/ooui/images/icons/cancel.svg
new file mode 100644
index 000..7722a90
--- /dev/null
+++ b/resources/ooui/images/icons/cancel.svg
@@ -0,0 +1,6 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
+
+
diff --git a/resources/ooui/images/icons/check.svg 
b/resources/ooui/images/icons/check.svg
new file mode 100644
index 000..b3331f4
--- /dev/null
+++ b/resources/ooui/images/icons/check.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24" style="transform-origin: 12px 12px; transform: scale(1, -1);">
+
+
diff --git a/resources/ooui/images/icons/circle.svg 
b/resources/ooui/images/icons/circle.svg
new file mode 100644
index 000..c2f002e
--- /dev/null
+++ 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Generalize demos and build so that it's easier to add new th...

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343232 )

Change subject: Generalize demos and build so that it's easier to add new themes
..

Generalize demos and build so that it's easier to add new themes

Instead of defining a new theme in a dozen different places, you'll
only need to do it in, like, three.

Change-Id: Ie912c8b8ec6ab7bbeb4fb8d94de0186a9f7f55e7
---
M Gruntfile.js
M demos/demo.js
M demos/demos.php
3 files changed, 126 insertions(+), 107 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/32/343232/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 46bb2b8..562f9fd 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,13 +6,11 @@
var modules = grunt.file.readYAML( 'build/modules.yaml' ),
pkg = grunt.file.readJSON( 'package.json' ),
themes = {
-   apex: 'Apex',
-   mediawiki: 'MediaWiki'
+   mediawiki: 'MediaWiki',
+   apex: 'Apex'
},
-   lessFiles = {
-   apex: {},
-   mediawiki: {}
-   },
+   lessFiles = {},
+   lessTargets = {},
colorizeSvgFiles = {},
requiredFiles = [],
concatCssFiles = {},
@@ -43,21 +41,40 @@
grunt.loadTasks( 'build/tasks' );
 
( function () {
-   var distFile, module, theme, moduleStyleFiles;
+   var distFile, module, moduleDef, theme, moduleStyleFiles;
+
+   for ( theme in themes ) {
+   lessFiles[ theme ] = {};
+   }
 
function themify( str ) {
return str.replace( /\{theme\}/g, theme ).replace( 
/\{Theme\}/g, themes[ theme ] );
}
+   function exists( file ) {
+   // Only pass one argument, otherwise 
grunt.file.exists() will try to join them
+   return grunt.file.exists( file );
+   }
for ( module in modules ) {
if ( module.indexOf( '{theme}' ) !== -1 || 
module.indexOf( '{Theme}' ) !== -1 ) {
for ( theme in themes ) {
-   modules[ themify( module ) ] = {};
-   modules[ themify( module ) ].theme = 
theme;
+   moduleDef = {};
+   moduleDef.theme = theme;
if ( modules[ module ].scripts ) {
-   modules[ themify( module ) 
].scripts = modules[ module ].scripts.map( themify );
+   moduleDef.scripts = modules[ 
module ].scripts
+   .map( themify )
+   .filter( exists );
}
if ( modules[ module ].styles ) {
-   modules[ themify( module ) 
].styles = modules[ module ].styles.map( themify );
+   moduleDef.styles = modules[ 
module ].styles
+   .map( themify )
+   .filter( exists );
+   }
+
+   if (
+   ( moduleDef.scripts && 
moduleDef.scripts.length ) ||
+   ( moduleDef.styles && 
moduleDef.styles.length )
+   ) {
+   modules[ themify( module ) ] = 
moduleDef;
}
}
delete modules[ module ];
@@ -118,6 +135,25 @@
concatJsFiles[ distFile ].unshift( 
'src/intro.js.txt' );
concatJsFiles[ distFile ].push( 
'src/outro.js.txt' );
}
+   }
+
+   // Define 'less' task targets - we need a target for each theme 
because of different import paths
+   lessTargets = {
+   options: {
+   modifyVars: {
+   // Changed dynamically by 
'set-graphics' task
+   'oo-ui-distribution': 'mixed',
+   'oo-ui-default-image-ext': 'png'
+   }
+   }
+   };
+   for ( theme in lessFiles ) {
+   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Fix up the 'blank' theme

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343233 )

Change subject: Fix up the 'blank' theme
..

Fix up the 'blank' theme

* Add missing BlankTheme.php.
* Add required Less variables to blank/common.less.

Change-Id: I6cd49ef2191ea70a115a087d7e9496c5294527af
---
A php/themes/BlankTheme.php
M src/themes/blank/common.less
2 files changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/33/343233/1

diff --git a/php/themes/BlankTheme.php b/php/themes/BlankTheme.php
new file mode 100644
index 000..fa27c47
--- /dev/null
+++ b/php/themes/BlankTheme.php
@@ -0,0 +1,17 @@
+https://gerrit.wikimedia.org/r/343233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cd49ef2191ea70a115a087d7e9496c5294527af
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] mediawiki/core[master]: ResourceLoaderOOUIImageModule: Actually load non-default the...

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343236 )

Change subject: ResourceLoaderOOUIImageModule: Actually load non-default 
themes' images
..

ResourceLoaderOOUIImageModule: Actually load non-default themes' images

Values in SkinOOUIThemes are TitleCase, but these filenames are
lowercase. And we silently ignore missing files. This only worked for
the default theme, which is hardcoded to lowercase 'mediawiki' above.

Change-Id: I5b14d65a8f7d5219acfa2a40eabbb13617833b26
---
M includes/resourceloader/ResourceLoaderOOUIImageModule.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/343236/1

diff --git a/includes/resourceloader/ResourceLoaderOOUIImageModule.php 
b/includes/resourceloader/ResourceLoaderOOUIImageModule.php
index 29f5cce..14e5c26 100644
--- a/includes/resourceloader/ResourceLoaderOOUIImageModule.php
+++ b/includes/resourceloader/ResourceLoaderOOUIImageModule.php
@@ -41,7 +41,7 @@
foreach ( $themes as $skin => $theme ) {
// Find the path to the JSON file which contains the 
actual image definitions for this theme
// TODO Allow extensions to specify this path somehow
-   $dataPath = $rootPath . '/' . $theme . '/' . $name . 
'.json';
+   $dataPath = $rootPath . '/' . strtolower( $theme ) . 
'/' . $name . '.json';
$localDataPath = $this->localBasePath . '/' . $dataPath;
 
// If there's no file for this module of this theme, 
that's okay, it will just use the defaults

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b14d65a8f7d5219acfa2a40eabbb13617833b26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] mediawiki/core[master]: Refactor registration of OOjs UI resource modules

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343238 )

Change subject: Refactor registration of OOjs UI resource modules
..

Refactor registration of OOjs UI resource modules

includes/resourceloader/ResourceLoaderOOUIModule.php
* New trait centralizing some logic for dealing with OOjs UI themes,
  previously duplicated in OutputPage, ResourcesOOUI.php and
  ResourceLoaderOOUIImageModule.
* Follow-up change I74362f0fc215b26f1f104ce7bdbbac1e106736ad uses this
  as a base to allow skins/extensions to define new OOjs UI themes.

resources/Resources.php
resources/ResourcesOOUI.php
includes/resourceloader/ResourceLoader.php
* OOjs UI resource module definitions are moved back to their rightly
  place in Resources.php. They are again (almost) normal and static.
* Theme-specific logic is now handled by the module code, definitions
  only specify 'themeScripts'/'themeStyles'/'themeImages'.
* ResourcesOOUI.php is deleted and no longer loaded by ResourceLoader.

includes/resourceloader/ResourceLoaderOOUIFileModule.php
includes/resourceloader/ResourceLoaderOOUIImageModule.php
* Glue code previously existing in ResourcesOOUI.php now lives here.
* Use the ResourceLoaderOOUIModule trait to avoid code duplication.

Change-Id: I39cc2a735d9625c87bf4ede6f5fb0ec441d47dcc
---
M autoload.php
M docs/extension.schema.v2.json
M includes/OutputPage.php
M includes/resourceloader/ResourceLoader.php
A includes/resourceloader/ResourceLoaderOOUIFileModule.php
M includes/resourceloader/ResourceLoaderOOUIImageModule.php
A includes/resourceloader/ResourceLoaderOOUIModule.php
M resources/Resources.php
D resources/ResourcesOOUI.php
9 files changed, 397 insertions(+), 189 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/343238/1

diff --git a/autoload.php b/autoload.php
index 4ffaa11..b45556c 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1206,7 +1206,9 @@
'ResourceLoaderLanguageDataModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageDataModule.php',
'ResourceLoaderLanguageNamesModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderLanguageNamesModule.php',
'ResourceLoaderModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderModule.php',
+   'ResourceLoaderOOUIFileModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderOOUIFileModule.php',
'ResourceLoaderOOUIImageModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderOOUIImageModule.php',
+   'ResourceLoaderOOUIModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderOOUIModule.php',
'ResourceLoaderRawFileModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderRawFileModule.php',
'ResourceLoaderSiteModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderSiteModule.php',
'ResourceLoaderSiteStylesModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderSiteStylesModule.php',
diff --git a/docs/extension.schema.v2.json b/docs/extension.schema.v2.json
index a2fdf65..fd3431d 100644
--- a/docs/extension.schema.v2.json
+++ b/docs/extension.schema.v2.json
@@ -653,7 +653,8 @@
"description": "Available feeds objects"
},
"SkinOOUIThemes": {
-   "type": "object"
+   "type": "object",
+   "description": "Map of skin names to OOjs UI themes to 
use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
},
"PasswordPolicy": {
"type": "object",
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 9ecfa23..153c9a5 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3926,10 +3926,8 @@
 * @param String $dir Language direction
 */
public static function setupOOUI( $skinName = '', $dir = 'ltr' ) {
-   $themes = ExtensionRegistry::getInstance()->getAttribute( 
'SkinOOUIThemes' );
-   // Make keys (skin names) lowercase for case-insensitive 
matching.
-   $themes = array_change_key_case( $themes, CASE_LOWER );
-   $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 
'MediaWiki';
+   $themes = ResourceLoaderOOUIModule::getSkinThemeMap();
+   $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 
$themes['default'];
// For example, 'OOUI\MediaWikiTheme'.
$themeClass = "OOUI\\{$theme}Theme";
OOUI\Theme::setSingleton( new $themeClass() );
diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 717fb45..9183e08 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -252,7 +252,6 @@
 
// Register core modules
$this->register( include 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ResourceLoaderOOUIModule: Minor code quality fixes, and more...

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343235 )

Change subject: ResourceLoaderOOUIModule: Minor code quality fixes, and more 
comments
..

ResourceLoaderOOUIModule: Minor code quality fixes, and more comments

Change-Id: Ibc7195cc68e1a46062612635988bd16d8145ab63
---
M includes/resourceloader/ResourceLoaderImageModule.php
M includes/resourceloader/ResourceLoaderOOUIImageModule.php
2 files changed, 32 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/343235/1

diff --git a/includes/resourceloader/ResourceLoaderImageModule.php 
b/includes/resourceloader/ResourceLoaderImageModule.php
index ff1b7b1..4c9e6be 100644
--- a/includes/resourceloader/ResourceLoaderImageModule.php
+++ b/includes/resourceloader/ResourceLoaderImageModule.php
@@ -70,7 +70,8 @@
 * 'selectorWithVariant' => [CSS selector template, variables: 
{prefix} {name} {variant}],
 * // List of variants that may be used for the image files
 * 'variants' => [
-* [theme name] => [
+* // This level of nesting can be omitted if you use the 
same images for every skin
+* [skin name (or 'default')] => [
 * [variant name] => [
 * 'color' => [color string, e.g. '#00'],
 * 'global' => [boolean, if true, this variant is 
available
@@ -82,7 +83,8 @@
 * ],
 * // List of image files and their options
 * 'images' => [
-* [theme name] => [
+* // This level of nesting can be omitted if you use the 
same images for every skin
+* [skin name (or 'default')] => [
 * [icon name] => [
 * 'file' => [file path string or array whose 
values are file path strings
 *and whose keys are 'default', 
'ltr', 'rtl', a single
diff --git a/includes/resourceloader/ResourceLoaderOOUIImageModule.php 
b/includes/resourceloader/ResourceLoaderOOUIImageModule.php
index 52aa392..29f5cce 100644
--- a/includes/resourceloader/ResourceLoaderOOUIImageModule.php
+++ b/includes/resourceloader/ResourceLoaderOOUIImageModule.php
@@ -26,6 +26,7 @@
 class ResourceLoaderOOUIImageModule extends ResourceLoaderImageModule {
protected function loadFromDefinition() {
if ( $this->definition === null ) {
+   // Do nothing if definition was already processed
return;
}
 
@@ -38,39 +39,48 @@
 
$definition = [];
foreach ( $themes as $skin => $theme ) {
+   // Find the path to the JSON file which contains the 
actual image definitions for this theme
// TODO Allow extensions to specify this path somehow
-   $dataPath = $this->localBasePath . '/' . $rootPath . 
'/' . $theme . '/' . $name . '.json';
+   $dataPath = $rootPath . '/' . $theme . '/' . $name . 
'.json';
+   $localDataPath = $this->localBasePath . '/' . $dataPath;
 
-   if ( file_exists( $dataPath ) ) {
-   $data = json_decode( file_get_contents( 
$dataPath ), true );
-   $fixPath = function ( &$path ) use ( $rootPath, 
$theme ) {
-   // TODO Allow extensions to specify 
this path somehow
-   $path = $rootPath . '/' . $theme . '/' 
. $path;
-   };
-   array_walk( $data['images'], function ( &$value 
) use ( $fixPath ) {
-   if ( is_string( $value['file'] ) ) {
-   $fixPath( $value['file'] );
-   } elseif ( is_array( $value['file'] ) ) 
{
-   array_walk_recursive( 
$value['file'], $fixPath );
-   }
-   } );
-   } else {
-   $data = [];
+   // If there's no file for this module of this theme, 
that's okay, it will just use the defaults
+   if ( !file_exists( $localDataPath ) ) {
+   continue;
}
+   $data = json_decode( file_get_contents( $localDataPath 
), true );
 
+   // Expand the paths to images (since they are relative 
to the JSON file that defines them, not
+   // our base directory)
+   $fixPath = function ( &$path ) use ( $dataPath ) {
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow skins/extensions to define custom OOjs UI themes

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343239 )

Change subject: Allow skins/extensions to define custom OOjs UI themes
..

Allow skins/extensions to define custom OOjs UI themes

This change follows I39cc2a735d9625c87bf4ede6f5fb0ec441d47dcc.

docs/extension.schema.v2.json
includes/registration/ExtensionProcessor.php
* The new extension attribute 'OOUIThemePaths' can be used to define
  custom OOjs UI themes. See I9187a63e509b601b8558ea82850fa828e5c8cc0a
  for an example usage.

includes/resourceloader/ResourceLoaderOOUIModule.php
* Add support for 'OOUIThemePaths'.
* Defining 'images' is now optional. I figure custom themes are
  unlikely to have or need them.
* Use ResourceLoaderFilePath objects to allow skin-/extension-defined
  OOjs UI module files to use skin/extension's base paths.
  This was previously used to support $wgResourceModuleSkinStyles,
  but only for 'skinStyles' - now ResourceLoaderFileModule needs
  to also handle it for 'skinScripts', and ResourceLoaderImageModule
  for 'images').

includes/resourceloader/ResourceLoaderFilePath.php
* Add getters for local/remote base paths, for when we need to
  construct a new ResourceLoaderFilePath based on existing one.

includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderImageModule.php
includes/resourceloader/ResourceLoaderOOUIImageModule.php
* Add or improve handling of ResourceLoaderFilePaths:
  * Replace `(array)` casts with explicit array wrapping, to avoid
casting objects into associative arrays.
  * Use getLocalPath() instead of string concatenation.

Bug: T100896
Change-Id: I74362f0fc215b26f1f104ce7bdbbac1e106736ad
---
M docs/extension.schema.v2.json
M includes/registration/ExtensionProcessor.php
M includes/resourceloader/ResourceLoaderFileModule.php
M includes/resourceloader/ResourceLoaderFilePath.php
M includes/resourceloader/ResourceLoaderImage.php
M includes/resourceloader/ResourceLoaderImageModule.php
M includes/resourceloader/ResourceLoaderOOUIImageModule.php
M includes/resourceloader/ResourceLoaderOOUIModule.php
8 files changed, 110 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/343239/1

diff --git a/docs/extension.schema.v2.json b/docs/extension.schema.v2.json
index fd3431d..b043569 100644
--- a/docs/extension.schema.v2.json
+++ b/docs/extension.schema.v2.json
@@ -656,6 +656,10 @@
"type": "object",
"description": "Map of skin names to OOjs UI themes to 
use. Same format as ResourceLoaderOOUIModule::$builtinSkinThemeMap."
},
+   "OOUIThemePaths": {
+   "type": "object",
+   "description": "Map of custom OOjs UI theme names to 
paths to load them from. Same format as 
ResourceLoaderOOUIModule::$builtinThemePaths."
+   },
"PasswordPolicy": {
"type": "object",
"description": "Password policies"
diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 1212f99..4e4ef12 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -108,6 +108,7 @@
'ResourceFileModulePaths',
'ResourceModules',
'ResourceModuleSkinStyles',
+   'OOUIThemePaths',
'ExtensionMessagesFiles',
'MessagesDirs',
'type',
@@ -282,7 +283,7 @@
}
}
 
-   foreach ( [ 'ResourceModules', 'ResourceModuleSkinStyles' ] as 
$setting ) {
+   foreach ( [ 'ResourceModules', 'ResourceModuleSkinStyles', 
'OOUIThemePaths' ] as $setting ) {
if ( isset( $info[$setting] ) ) {
foreach ( $info[$setting] as $name => $data ) {
if ( isset( $data['localBasePath'] ) ) {
@@ -296,7 +297,11 @@
if ( $defaultPaths ) {
$data += $defaultPaths;
}
-   $this->globals["wg$setting"][$name] = 
$data;
+   if ( $setting === 'OOUIThemePaths' ) {
+   
$this->attributes[$setting][$name] = $data;
+   } else {
+   
$this->globals["wg$setting"][$name] = $data;
+   }
}
}
}
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index 725bc6a..8bc5f48 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ResourceLoaderImage: Point to the right skin when generating...

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343237 )

Change subject: ResourceLoaderImage: Point to the right skin when generating URL
..

ResourceLoaderImage: Point to the right skin when generating URL

Previously, in skins using non-default OOUI theme (for example,
in MonoBook skin which uses Apex theme), when using a browser that
we don't serve SVG images to (for example, Internet Explorer 8),
the user would see the default theme's icons. This is noticeable
e.g. with the search box's icon on Special:Search.

Change-Id: I5a563c59efb267d8080161271513c0cc7d90d610
---
M includes/resourceloader/ResourceLoaderImage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/343237/1

diff --git a/includes/resourceloader/ResourceLoaderImage.php 
b/includes/resourceloader/ResourceLoaderImage.php
index 2503b22..6a6a3c2 100644
--- a/includes/resourceloader/ResourceLoaderImage.php
+++ b/includes/resourceloader/ResourceLoaderImage.php
@@ -176,6 +176,7 @@
'variant' => $variant,
'format' => $format,
'lang' => $context->getLanguage(),
+   'skin' => $context->getSkin(),
'version' => $context->getVersion(),
];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a563c59efb267d8080161271513c0cc7d90d610
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] oojs/ui[master]: Really don't generate 'icons-alerts' for Apex

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343231 )

Change subject: Really don't generate 'icons-alerts' for Apex
..

Really don't generate 'icons-alerts' for Apex

The syntax here is brittle.

Change-Id: Ib610c189b3310a5a75a190d27fd3a7dfb3660a4d
---
M build/modules.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/31/343231/1

diff --git a/build/modules.yaml b/build/modules.yaml
index df434bc..0d3aea8 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -211,9 +211,9 @@
"src/themes/{theme}/icons-content.json"
]
},
-   "oojs-ui-{theme}-icons-alerts": {
+   "oojs-ui-mediawiki-icons-alerts": {
"styles": [
-   "src/themes/{theme}/icons-alerts.json"
+   "src/themes/mediawiki/icons-alerts.json"
],
"theme": "mediawiki"
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib610c189b3310a5a75a190d27fd3a7dfb3660a4d
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] oojs/ui[master]: Implement `grunt add-theme` task to ease theme creation

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343234 )

Change subject: Implement `grunt add-theme` task to ease theme creation
..

Implement `grunt add-theme` task to ease theme creation

I was going to document all of the copy-paste, search-replace steps needed
to add a new theme... and then I realized I could automate them instead.

Usage: grunt add-theme --name=FooBar --template=Blank

Rather than use the Blank theme, you can also start with Apex or MediaWiki.

Bug: T100896
Change-Id: I1ee323abedc8e5017bdc2f3887f7029593cbfe56
---
M Gruntfile.js
M demos/demo.js
M demos/demos.php
M demos/index.html
M package.json
5 files changed, 105 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/34/343234/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 562f9fd..0d88065 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,7 +6,7 @@
var modules = grunt.file.readYAML( 'build/modules.yaml' ),
pkg = grunt.file.readJSON( 'package.json' ),
themes = {
-   mediawiki: 'MediaWiki',
+   mediawiki: 'MediaWiki', // Do not change this line or 
you'll break `grunt add-theme`
apex: 'Apex'
},
lessFiles = {},
@@ -38,6 +38,7 @@
grunt.loadNpmTasks( 'grunt-svg2png' );
grunt.loadNpmTasks( 'grunt-tyops' );
grunt.loadNpmTasks( 'grunt-eslint' );
+   grunt.loadNpmTasks( 'grunt-string-replace' );
grunt.loadTasks( 'build/tasks' );
 
( function () {
@@ -184,6 +185,13 @@
return function ( dest, src ) {
return path.join( dest, src.replace( str, '' ) );
};
+   }
+
+   if ( !grunt.option( 'template' ) ) {
+   grunt.option( 'template', 'MISSING' );
+   }
+   if ( !grunt.option( 'name' ) ) {
+   grunt.option( 'name', 'MISSING' );
}
 
grunt.initConfig( {
@@ -443,6 +451,88 @@
'.{stylelintrc,eslintrc.json}'
],
tasks: 'quick-build'
+   },
+
+   // Adding new theme
+   'string-replace': {
+   newTheme: {
+   files: [
+   {
+   expand: true,
+   src: 'src/themes/<%= 
grunt.option( "template" ).toLowerCase() %>/**/*.{less,json,svg,gif}',
+   dest: 'src/themes/<%= 
grunt.option( "name" ).toLowerCase() %>/',
+   rename: strip( 'src/themes/' + 
grunt.option( "template" ).toLowerCase() + '/' )
+   },
+   {
+   src: 'src/themes/<%= 
grunt.option( "template" ).toLowerCase() %>/<%= grunt.option( "template" ) 
%>Theme.js',
+   dest: 'src/themes/<%= 
grunt.option( "name" ).toLowerCase() %>/<%= grunt.option( "name" ) %>Theme.js'
+   },
+   {
+   src: 'php/themes/<%= 
grunt.option( "template" ) %>Theme.php',
+   dest: 'php/themes/<%= 
grunt.option( "name" ) %>Theme.php'
+   }
+   ],
+   options: {
+   replacements: [
+   {
+   pattern: new RegExp( 
'\\b' + grunt.option( "template" ) + '\\b', 'g' ),
+   replacement: 
grunt.option( "name" )
+   },
+   {
+   pattern: new RegExp( 
'\\b' + grunt.option( "template" ) + 'Theme\\b', 'g' ),
+   replacement: 
grunt.option( "name" ) + 'Theme'
+   },
+   {
+   pattern: new RegExp( 
'\\b' + grunt.option( "template" ).toLowerCase() + '\\b', 'g' ),
+   replacement: 
grunt.option( "name" ).toLowerCase()
+   }
+   ]
+   }
+   },
+   updateGruntfile: {
+   files: {
+  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: errorpage: Document how the different files are used

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343227 )

Change subject: errorpage: Document how the different files are used
..


errorpage: Document how the different files are used

Literally each of these is configured in an entirely different way.

Bug: T113114
Change-Id: Ie5cf948bac5073464ce80acb1d6c51c7fcc31098
---
A errorpages/README
1 file changed, 35 insertions(+), 0 deletions(-)

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



diff --git a/errorpages/README b/errorpages/README
new file mode 100644
index 000..2e3b81c
--- /dev/null
+++ b/errorpages/README
@@ -0,0 +1,35 @@
+App server error pages
+--
+
+Files in this directory are used by PHP or Apache in the event
+of an error. Remember that this repository is deployed to app
+servers at '/srv/mediawiki'.
+
+404.html
+ Symlinked to "/404.html" in some docroots (e.g. 'secure') and configured via
+ individual site's Apache config in operations/puppet.git.
+
+404.php
+ Configured by class mediawiki::hhvm in operations/puppet.git as the
+ default 404-handler (error_document404) for HHVM.
+
+ Also symlinked to /w/404.php, which is the default 404-handler as
+ configured by 'apache/apache2.conf.erb', and various mediawiki sites
+ in operations/puppet.git.
+
+503.html
+ Symlinked to "/503.html" in most docroots, which is the default 503-handler
+ configured by 'apache/apache2.conf.erb' in operations/puppet.git.
+
+default.html
+ Symlinked to docroot/default/index.html.
+
+ The default DocumentRoot on app servers is /srv/mediawiki/docroot/default
+ as configured by 'apache/apache2.conf.erb', 'sites/nonexistent.conf' and
+ 'sites/redirects.conf' in the mediawiki module in operations/puppet.git.
+
+hhvm-fatal-error.php
+ Configured by class mediawiki::hhvm in operations/puppet.git.
+
+php-fatal-error.php
+ Configured by wmerrors.ini in operations/puppet.git.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5cf948bac5073464ce80acb1d6c51c7fcc31098
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Greg Grossmeier 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: readme: Update documentation about current directory structure

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343219 )

Change subject: readme: Update documentation about current directory structure
..


readme: Update documentation about current directory structure

* Update information about dblists/, images/, and db-*.php.
* Add information about errorpages/.
* Add information about static/.
* Fix indentation.

Change-Id: Id560622baeaf1c724f857fc92dd6ec0b5c7f9baf
---
M README
1 file changed, 19 insertions(+), 13 deletions(-)

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



diff --git a/README b/README
index 0d070e2..c7ef2fb 100644
--- a/README
+++ b/README
@@ -4,17 +4,18 @@
 Files in this repository are almost a mirror of the Wikimedia Foundation
 cluster configuration. Omitted files include passwords and security measures.
 
-*.dblist
- List of databases. To vary by realm (e.g. 'production', 'labs'), add the realm
-as a suffix before the extension, separated with a dash. Example:
-   "all-labs.dblist".
+dblists/
+ List of wiki databases.
+ For labs-only dblists, add "-labs" suffix before the file extension.
+
+errorpages/
+ Central management of error pages used by app servers at the PHP or Apache 
level.
 
 wikiversions.json, wikiversions.php
 wikiversions-labs.json, wikiversions-labs.php
  Let us associate a database with a specific copy of MediaWiki (generally a
-branch). The .cdb file is updated by editing wikiversions.json first and then
-running multiversion/refreshWikiversions. To vary by realm, add a suffix
-before the extension, e.g. "wikiversions-labs.json".
+ branch). The .php file is updated by editing wikiversions.json first and then
+ running multiversion/updateWikiversions.
 
 debug.json
  Configuration for X-Wikimedia-Debug. The browser extensions use this to
@@ -22,10 +23,15 @@
  backends. See .
 
 docroot/
- The Apache document root for several of our VirtualHosts.
+ The Apache document roots for most of our VirtualHosts.
+
+static/
+ Static files available under all docroots as /static.
+ Contains icons and images used by MediaWiki, such as project logos,
+ favicons, CentralAuth SUL icons and more.
 
 images/
- Shared pictures for the unified login system used by CentralAuth.
+ Deprecated aliases for a subset of files in /static/images.
 
 w/
  The "w/" directory in the docroot of any MediaWiki-serving VirtualHost.
@@ -34,17 +40,17 @@
  Hold some PHPUnit tests.
 
 wmf-config/
- The MediaWiki configuration for all database. Think of it like a huge
-LocalSettings.php.
+ The MediaWiki configuration for all database.
+ Think of it like a huge LocalSettings.php.
 
 wmf-config/CommonSettings.php
  Generic configuration such as including extensions or calling over piece
  of configuration. This is mostly shared among all wikis.
 
 wmf-config/InitialiseSettings.php
- Per wiki configuration.
+ Per-wiki configuration.
 
-wmf-config/db.php
+wmf-config/db-*.php
  Databases related configuration.
 
 wmf-config/mc.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id560622baeaf1c724f857fc92dd6ec0b5c7f9baf
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't show 404 status code for unregistered users unless the...

2017-03-16 Thread GeoffreyT2000 (Code Review)
GeoffreyT2000 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343230 )

Change subject: Don't show 404 status code for unregistered users unless there 
are actually no contribs listed at all
..

Don't show 404 status code for unregistered users unless there are actually no 
contribs listed at all

The 404 status code will not be shown for contribution pages of unregistered 
users unless they actually show no contribs at all.

Bug: T156554
Change-Id: Ie4a8e0d6726f6db36a0f460a9b68915b01347efc
---
M includes/specials/SpecialContributions.php
1 file changed, 16 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/343230/1

diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 1028002..20ebeb6 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -180,25 +180,26 @@
 
// Add RSS/atom links
$this->addFeedLinks( $feedParams );
+   
+   $pager = new ContribsPager( $this->getContext(), [
+   'target' => $target,
+   'contribs' => $this->opts['contribs'],
+   'namespace' => $this->opts['namespace'],
+   'tagfilter' => $this->opts['tagfilter'],
+   'year' => $this->opts['year'],
+   'month' => $this->opts['month'],
+   'deletedOnly' => $this->opts['deletedOnly'],
+   'topOnly' => $this->opts['topOnly'],
+   'newOnly' => $this->opts['newOnly'],
+   'hideMinor' => $this->opts['hideMinor'],
+   'nsInvert' => $this->opts['nsInvert'],
+   'associated' => $this->opts['associated'],
+   ] );
 
if ( Hooks::run( 'SpecialContributionsBeforeMainOutput', [ $id, 
$userObj, $this ] ) ) {
if ( !$this->including() ) {
$out->addHTML( $this->getForm() );
}
-   $pager = new ContribsPager( $this->getContext(), [
-   'target' => $target,
-   'contribs' => $this->opts['contribs'],
-   'namespace' => $this->opts['namespace'],
-   'tagfilter' => $this->opts['tagfilter'],
-   'year' => $this->opts['year'],
-   'month' => $this->opts['month'],
-   'deletedOnly' => $this->opts['deletedOnly'],
-   'topOnly' => $this->opts['topOnly'],
-   'newOnly' => $this->opts['newOnly'],
-   'hideMinor' => $this->opts['hideMinor'],
-   'nsInvert' => $this->opts['nsInvert'],
-   'associated' => $this->opts['associated'],
-   ] );
 
if ( !$pager->getNumRows() ) {
$out->addWikiMsg( 'nocontribs', $target );
@@ -261,7 +262,7 @@
wfEscapeWikiText( 
$userObj->getName() ),
]
);
-   if ( !$this->including() ) {
+   if ( !$this->including() & 
!$pager->getNumRows() ) {
$this->getOutput()->setStatusCode( 404 
);
}
}

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[wmf/1.29.0-wmf.16]: ve.ui.DesktopContext: Prevent hiding of the context popup

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343229 )

Change subject: ve.ui.DesktopContext: Prevent hiding of the context popup
..


ve.ui.DesktopContext: Prevent hiding of the context popup

* Something in here is not expecting the PopupWidget to spontaneously
  hide itself and doesn't show it back correctly, causing T160190.
* Even if we tracked that down and fixed it, we don't set the "anchor
  element" ($floatableContainer) of the popup to anything sensible
  anyway, so the popup would hide when it shouldn't. Especially
  embeddable context popups (e.g. for a large block image) seem to
  disappear for me all the time while their nodes are still visible.

Bug: T160190
Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
(cherry picked from commit 8dadf74f1705a3abd4ea9d1ec31f93940811e2d7)
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..ee44479 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -19,7 +19,10 @@
ve.ui.DesktopContext.super.apply( this, arguments );
 
// Properties
-   this.popup = new OO.ui.PopupWidget( { $container: this.surface.$element 
} );
+   this.popup = new OO.ui.PopupWidget( {
+   hideWhenOutOfView: false,
+   $container: this.surface.$element
+   } );
this.position = null;
this.embeddable = null;
this.boundingRect = null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
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] VisualEditor/VisualEditor[wmf/1.29.0-wmf.16]: DesktopContext: on destroy, tell our popup to stop positioning

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343228 )

Change subject: DesktopContext: on destroy, tell our popup to stop positioning
..


DesktopContext: on destroy, tell our popup to stop positioning

When a popup is in positioning-mode, it has a scroll event bound on its
context. This can cause issues, as we're removing everything it relies on from
the DOM and discarding it.

Bug: T160197
Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
(cherry picked from commit 96619eefbe73f5a47eb136901e2e35c8a43fd159)
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..baa21f0 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -430,6 +430,8 @@
resize: this.onWindowResizeHandler,
scroll: this.onWindowScrollDebounced
} );
+   // Popups bind scroll events if they're in positioning mode, so make 
sure that's disabled
+   this.popup.togglePositioning( false );
 
// Parent method
return ve.ui.DesktopContext.super.prototype.destroy.call( this );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: DLynch 
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] VisualEditor/VisualEditor[wmf/1.29.0-wmf.16]: DesktopContext: on destroy, tell our popup to stop positioning

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343228 )

Change subject: DesktopContext: on destroy, tell our popup to stop positioning
..

DesktopContext: on destroy, tell our popup to stop positioning

When a popup is in positioning-mode, it has a scroll event bound on its
context. This can cause issues, as we're removing everything it relies on from
the DOM and discarding it.

Bug: T160197
Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
(cherry picked from commit 96619eefbe73f5a47eb136901e2e35c8a43fd159)
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/28/343228/1

diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..baa21f0 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -430,6 +430,8 @@
resize: this.onWindowResizeHandler,
scroll: this.onWindowScrollDebounced
} );
+   // Popups bind scroll events if they're in positioning mode, so make 
sure that's disabled
+   this.popup.togglePositioning( false );
 
// Parent method
return ve.ui.DesktopContext.super.prototype.destroy.call( this );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: DLynch 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[wmf/1.29.0-wmf.16]: ve.ui.DesktopContext: Prevent hiding of the context popup

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343229 )

Change subject: ve.ui.DesktopContext: Prevent hiding of the context popup
..

ve.ui.DesktopContext: Prevent hiding of the context popup

* Something in here is not expecting the PopupWidget to spontaneously
  hide itself and doesn't show it back correctly, causing T160190.
* Even if we tracked that down and fixed it, we don't set the "anchor
  element" ($floatableContainer) of the popup to anything sensible
  anyway, so the popup would hide when it shouldn't. Especially
  embeddable context popups (e.g. for a large block image) seem to
  disappear for me all the time while their nodes are still visible.

Bug: T160190
Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
(cherry picked from commit 8dadf74f1705a3abd4ea9d1ec31f93940811e2d7)
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/29/343229/1

diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..ee44479 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -19,7 +19,10 @@
ve.ui.DesktopContext.super.apply( this, arguments );
 
// Properties
-   this.popup = new OO.ui.PopupWidget( { $container: this.surface.$element 
} );
+   this.popup = new OO.ui.PopupWidget( {
+   hideWhenOutOfView: false,
+   $container: this.surface.$element
+   } );
this.position = null;
this.embeddable = null;
this.boundingRect = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: errorpage: Document how the different files are used

2017-03-16 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343227 )

Change subject: errorpage: Document how the different files are used
..

errorpage: Document how the different files are used

Literally each of these is configured in an entirely different way.

Bug: T113114
Change-Id: Ie5cf948bac5073464ce80acb1d6c51c7fcc31098
---
A errorpages/README
1 file changed, 35 insertions(+), 0 deletions(-)


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

diff --git a/errorpages/README b/errorpages/README
new file mode 100644
index 000..2e3b81c
--- /dev/null
+++ b/errorpages/README
@@ -0,0 +1,35 @@
+App server error pages
+--
+
+Files in this directory are used by PHP or Apache in the event
+of an error. Remember that this repository is deployed to app
+servers at '/srv/mediawiki'.
+
+404.html
+ Symlinked to "/404.html" in some docroots (e.g. 'secure') and configured via
+ individual site's Apache config in operations/puppet.git.
+
+404.php
+ Configured by class mediawiki::hhvm in operations/puppet.git as the
+ default 404-handler (error_document404) for HHVM.
+
+ Also symlinked to /w/404.php, which is the default 404-handler as
+ configured by 'apache/apache2.conf.erb', and various mediawiki sites
+ in operations/puppet.git.
+
+503.html
+ Symlinked to "/503.html" in most docroots, which is the default 503-handler
+ configured by 'apache/apache2.conf.erb' in operations/puppet.git.
+
+default.html
+ Symlinked to docroot/default/index.html.
+
+ The default DocumentRoot on app servers is /srv/mediawiki/docroot/default
+ as configured by 'apache/apache2.conf.erb', 'sites/nonexistent.conf' and
+ 'sites/redirects.conf' in the mediawiki module in operations/puppet.git.
+
+hhvm-fatal-error.php
+ Configured by class mediawiki::hhvm in operations/puppet.git.
+
+php-fatal-error.php
+ Configured by wmerrors.ini in operations/puppet.git.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Register our modules as preload requirements for VisualEdito...

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343226 )

Change subject: Register our modules as preload requirements for VisualEditor 
if present
..

Register our modules as preload requirements for VisualEditor if present

Bug: T156899
Change-Id: Ib3232bc801a6aa68e208cf9b689340c482c2f9b2
Depends-On: I045c7b045ce28047298b28a05e77ef27749c1ee1
---
M extension.json
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7d19341..a23f496 100644
--- a/extension.json
+++ b/extension.json
@@ -41,6 +41,10 @@
"source": false
}
},
+   "VisualEditorPreloadModules": [
+   "ext.globalCssJs.site",
+   "ext.globalCssJs.user"
+   ],
"ExtensionFunctions": [
"GlobalCssJsHooks::onExtensionFunctions"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3232bc801a6aa68e208cf9b689340c482c2f9b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalCssJs
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] mediawiki/core[master]: RCFilters UI: Separate name from paramName in filters

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342295 )

Change subject: RCFilters UI: Separate name from paramName in filters
..


RCFilters UI: Separate name from paramName in filters

Represent filters, internally, with a unique name comprised
of their group and param name, and leave a reference to the
parameter (or value) they represent so the state can be
rebuilt.

Change-Id: I08b69a09463afa1cf08e1cdbf7aaec8dfc16fd2e
---
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js
5 files changed, 381 insertions(+), 301 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
index 22323e8..1070b98 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -208,6 +208,42 @@
};
 
/**
+* Get the parameter representation from this group
+*
+* @return {Object} Parameter representation
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.getParamRepresentation = function 
() {
+   var i, values,
+   result = {},
+   filterItems = this.getItems();
+
+   if ( this.getType() === 'send_unselected_if_any' ) {
+   // First, check if any of the items are selected at all.
+   // If none is selected, we're treating it as if they are
+   // all false
+
+   // Go over the items and define the correct values
+   for ( i = 0; i < filterItems.length; i++ ) {
+   result[ filterItems[ i ].getParamName() ] = 
this.areAnySelected() ?
+   Number( !filterItems[ i ].isSelected() 
) : 0;
+   }
+
+   } else if ( this.getType() === 'string_options' ) {
+   values = [];
+   for ( i = 0; i < filterItems.length; i++ ) {
+   if ( filterItems[ i ].isSelected() ) {
+   values.push( filterItems[ i 
].getParamName() );
+   }
+   }
+
+   result[ this.getName() ] = ( values.length === 
filterItems.length ) ?
+   'all' : values.join( this.getSeparator() );
+   }
+
+   return result;
+   };
+
+   /**
 * Get group type
 *
 * @return {string} Group type
@@ -217,6 +253,15 @@
};
 
/**
+* Get the prefix used for the filter names inside this group
+*
+* @return {string} Group prefix
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.getNamePrefix = function () {
+   return this.getName() + '__';
+   };
+
+   /**
 * Get group's title
 *
 * @return {string} Title
diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
index f162528..852b810 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
@@ -5,7 +5,7 @@
 * @mixins OO.EventEmitter
 *
 * @constructor
-* @param {string} name Filter name
+* @param {string} param Filter param name
 * @param {mw.rcfilters.dm.FilterGroup} groupModel Filter group model
 * @param {Object} config Configuration object
 * @cfg {string} [group] The group this item belongs to
@@ -19,14 +19,15 @@
 * @cfg {Object} [conflicts] Defines the conflicts for this filter
 * @cfg {string} [cssClass] The class identifying the results that 
match this filter
 */
-   mw.rcfilters.dm.FilterItem = function MwRcfiltersDmFilterItem( name, 
groupModel, config ) {
+   mw.rcfilters.dm.FilterItem = function MwRcfiltersDmFilterItem( param, 
groupModel, config ) {
config = config || {};
 
// Mixin constructor
OO.EventEmitter.call( this );
 
-   this.name = name;
+   this.param = param;
this.groupModel = groupModel;
+   this.name = this.groupModel.getNamePrefix() + param;
 
this.label = config.label || this.name;
  

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

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343224 )

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


Update VE core submodule to master (ac6d7031c)

New changes:
80b31eddb Update treeDiffer.js library
96619eefb DesktopContext: on destroy, tell our popup to stop positioning
8dadf74f1 ve.ui.DesktopContext: Prevent hiding of the context popup

Bug: T160190
Bug: T160197
Change-Id: I3a09d528aae15b1be008f27803211f4ecd70947a
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/ve b/lib/ve
index ef5dc96..ac6d703 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit ef5dc965f27ad0281d2b7ba4452ad85b8fadef42
+Subproject commit ac6d7031c6d831784bd842b7e0135c4f879b721c

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Remove maybebadfaith naming hack

2017-03-16 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343225 )

Change subject: Remove maybebadfaith naming hack
..

Remove maybebadfaith naming hack

We don't need it any more now that the front-end can handle
name collisions.

Depends-On: I08b69a09463afa1cf08e1cdbf7aaec8dfc16fd2e
Change-Id: Ic3dc3e94358ef59d729671121182a8ee0e461f4a
---
M includes/Hooks.php
1 file changed, 2 insertions(+), 7 deletions(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 530fc51..bd9c72c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -240,8 +240,7 @@
),
],
[
-   // HACK the front-end doesn't 
support StringOptionsFilters with the same name
-   'name' => 'maybebadfaith',
+   'name' => 'maybebad',
'label' => 
'ores-rcfilters-goodfaith-maybebad-label',
'description' => 
'ores-rcfilters-goodfaith-maybebad-desc',
'cssClassSuffix' => 
'goodfaith-maybebad',
@@ -265,10 +264,6 @@
'isFullCoverage' => false,
'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables, &$fields,
&$conds, &$query_options, 
&$join_conds, $selectedValues ) {
-   // HACK account for maybebadfaith 
rename hack
-   array_walk( $selectedValues, function ( 
&$v ) {
-   $v = $v === 'maybebadfaith' ? 
'maybebad' : $v;
-   } );
$condition = self::buildRangeFilter( 
'goodfaith', $selectedValues );
if ( $condition ) {
$conds[] = $condition;
@@ -279,7 +274,7 @@
}
},
] );
-   $goodfaithGroup->getFilter( 'maybebadfaith' 
)->setAsSupersetOf(
+   $goodfaithGroup->getFilter( 'maybebad' 
)->setAsSupersetOf(
$goodfaithGroup->getFilter( 'bad' )
);
 

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

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

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


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

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343224 )

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

Update VE core submodule to master (ac6d7031c)

New changes:
80b31eddb Update treeDiffer.js library
96619eefb DesktopContext: on destroy, tell our popup to stop positioning
8dadf74f1 ve.ui.DesktopContext: Prevent hiding of the context popup

Bug: T160190
Bug: T160197
Change-Id: I3a09d528aae15b1be008f27803211f4ecd70947a
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index ef5dc96..ac6d703 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit ef5dc965f27ad0281d2b7ba4452ad85b8fadef42
+Subproject commit ac6d7031c6d831784bd842b7e0135c4f879b721c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a09d528aae15b1be008f27803211f4ecd70947a
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] operations/puppet[production]: Enable mcrypt extension on CI slaves

2017-03-16 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343223 )

Change subject: Enable mcrypt extension on CI slaves
..

Enable mcrypt extension on CI slaves

This is required for the upstream version of civicrm-buildkit, which
fundraising uses to set up fresh Civi installs for each test. This
patch will allow fr-tech to stop using a fork of -buildkit.

Mcrypt is deprecated in PHP 7, so we'll see what the Civi folks are
planning around that.

Change-Id: Id21615d558a17048f008756592fda5674c1b7ec1
---
M modules/contint/manifests/packages/php.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/343223/1

diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index f438663..8a0057e 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -5,6 +5,8 @@
 'php5-dev',  # phpize
 'php5-ldap',  # OpenStackManager/LdapAuthentication T125158
 'php5-gd',
+# mcrypt is used by fundraising's CiviCRM setup, deprecated in PHP 7
+'php5-mcrypt',
 'php5-pgsql',
 'php5-sqlite',
 'php5-tidy',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.16]: Fixing search results percentage width

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342770 )

Change subject: Fixing search results percentage width
..


Fixing search results percentage width

The width of search results on SpecialSearch
page was set to 60% to accomodate the interwiki
results sidebar. As seen on:
https://phabricator.wikimedia.org/T149806

This modification should be moved to the
interwikiwidget.styles.less file so it doesn't
interfere with results when the intwiki
widget is not active.

Bug: T159806
Change-Id: Ib9bdc501c8b0eccbcc84abe399a38d10c9a5d20f
(cherry picked from commit e952ff32fbf411ea04254737d889d9de6ed93c07)
---
M 
resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
M resources/src/mediawiki.special/mediawiki.special.search.styles.css
2 files changed, 12 insertions(+), 39 deletions(-)

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



diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
index 04da3db..0b0f912 100644
--- 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
+++ 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
@@ -1,16 +1,6 @@
 /* interwiki search results */
 /*==*/
 
-#mw-interwiki-results {
-   width: 30%;
-   display: inline-block;
-   margin-left: 10%;
-}
-
-.searchresults .mw-search-createlink {
-   float: left;
-}
-
 .iw-headline {
font-weight: bold;
font-size: 1rem;
@@ -187,37 +177,20 @@
text-align: right;
 }
 
-/* no results
-span the interwiki results across the bottom of the page.
-*/
+/* desktop only */
 
-.mw-search-nonefound ~ #mw-search-interwiki {
-   width: 100%;
-}
+@media only screen and ( min-width: @deviceWidthTablet ) {
 
-.mw-search-nonefound ~ #mw-search-interwiki .iw-resultset {
-   width: 30%;
-   max-width: 300px;
-   margin-left: 0.5em;
-   margin-right: 0.5em;
-}
-
-/* mobile */
-/* stylelint-disable declaration-no-important */
-@media only screen and ( max-width: 768px ) {
#mw-interwiki-results {
-   width: 100%;
-   margin-left: 0;
+   width: 30%;
+   display: inline-block; /* used to align iw sidebar with the top 
of the main search results*/
+   margin-left: 10%;
}
-   .mw-search-results {
-   max-width: none !important;
-   }
-   .iw-resultset {
-   width: 100% !important;
-   margin-left: 0 !important;
-   margin-right: 0 !important;
-   max-width: none !important;
+   .searchresults .mw-search-createlink,
+   .searchresults .mw-search-nonefound,
+   .searchresults .mw-search-results {
+   float: left;
+   width: 60%;
}
 
 }
-/* stylelint-enable declaration-no-important */
diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.styles.css 
b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
index 89f5132..72ede97 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
@@ -32,9 +32,9 @@
 
 .mw-search-results {
margin: 0;
-   float: left;
-   max-width: 60%;
+   max-width: 38em;
 }
+
 .mw-search-visualclear {
clear: both;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9bdc501c8b0eccbcc84abe399a38d10c9a5d20f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.29.0-wmf.16]: Re-enable sistersearch AB test

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343104 )

Change subject: Re-enable sistersearch AB test
..


Re-enable sistersearch AB test

Enables sistersearch AB test for a eight different language wikis.
Sampling is setup to achievly roughly 2k sessions per bucket over
a week of testing.

This is the same code as the first run of the sistersearch AB test, but
with more wikis enabled.

Bug: T160004
Change-Id: I9954e71d9ad9e87172b72d11444ee85e9e1ba4e5
(cherry picked from commit c471eba5e62b43092a7158e3e70a930a4d2a0a6e)
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 76 insertions(+), 3 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 494ac8d..577624e 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -113,13 +113,54 @@
function initialize( session ) {
 
var sessionId = session.get( 'sessionId' ),
-   // No sub-tests currently running
-   validBuckets = [],
+   // List of valid sub-test buckets
+   validBuckets = [
+   'recall_sidebar_results',
+   'no_sidebar'
+   ],
+   // Sampling to use when choosing which users 
should participate in test
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
// Currently unused, but 
provides a place
// to handle wiki-specific 
sampling
subTests = {
+   arwiki: {
+   // 1 in 25 
users search sessions will be recorded
+   // by event 
logging
+   test: 25,
+   // 1 in 8 (of 
the 1 in 25) will be reserved for
+   // 
dashboarding. The other 7 in 8 are split equally
+   // into buckets.
+   subTest: 8
+   },
+   cawiki: {
+   test: 6,
+   subTest: 34
+   },
+   dewiki: {
+   test: 108,
+   subTest: 2
+   },
+   fawiki: {
+   test: 8,
+   subTest: 25
+   },
+   frwiki: {
+   test: 70,
+   subTest: 3
+   },
+   itwiki: {
+   test: 42,
+   subTest: 5
+   },
+   plwiki: {
+   test: 35,
+   subTest: 6
+   },
+   ruwiki: {
+   test: 71,
+   subTest: 3
+   }
};
 
if ( subTests[ dbName ] ) {
@@ -181,6 +222,8 @@
return;
  

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.29.0-wmf.16]: Add tracking of sister projects and positions

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343106 )

Change subject: Add tracking of sister projects and positions
..


Add tracking of sister projects and positions

Adds a list of sister results and their positions as extraParams
to SERP events so we can tell from TSS2 data which projects were
shown to the user without having to merge with search logs. For
example:

[{"result":"image","position":0},
 {"result":"book","position":1},
 {"result":"course","position":2}]

I'm not sure if this is the best approach and I'm probably
missing something important...

Bug: T160463
Change-Id: If0760769ce693da8162a207e18e84a5055cc7bca
(cherry picked from commit 17d63749f78092c415db5e10546864a3e20c6029)
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 494ac8d..8e2a099 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -531,7 +531,8 @@
 */
function setupSearchTest( session ) {
var params,
-   logEvent = genLogEventFn( 'fulltext', session );
+   logEvent = genLogEventFn( 'fulltext', session ),
+   iwResultSet;
 
if ( isSearchResultPage ) {
// When a new search is performed reset the session 
lifetime.
@@ -602,6 +603,18 @@
hitsReturned: $( '.mw-search-result-heading' 
).length
};
 
+   // Track which sister wiki results were shown in the 
sidebar and in what order
+   if ( session.has( 'subTest' ) ) {
+   iwResultSet = [];
+   $( 'li.iw-resultset' ).each( function () {
+   iwResultSet.push( {
+   result: $( this ).attr( 'class' 
).match( /(?:^|\s)iw-resultset--(\S+)/ )[ 1 ],
+   position: $( this ).data( 
'iw-resultset-pos' )
+   } );
+   } );
+   params.extraParams = JSON.stringify( 
iwResultSet );
+   }
+
// Track what did you mean suggestions were displayed 
on the page
if ( $( '#mw-search-DYM-suggestion' ).length ) {
params.didYouMeanVisible = 'yes';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0760769ce693da8162a207e18e84a5055cc7bca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Bearloga 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: DesktopContext: on destroy, tell our popup to stop positioning

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343217 )

Change subject: DesktopContext: on destroy, tell our popup to stop positioning
..


DesktopContext: on destroy, tell our popup to stop positioning

When a popup is in positioning-mode, it has a scroll event bound on its
context. This can cause issues, as we're removing everything it relies on from
the DOM and discarding it.

Bug: T160197
Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..baa21f0 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -430,6 +430,8 @@
resize: this.onWindowResizeHandler,
scroll: this.onWindowScrollDebounced
} );
+   // Popups bind scroll events if they're in positioning mode, so make 
sure that's disabled
+   this.popup.togglePositioning( false );
 
// Parent method
return ve.ui.DesktopContext.super.prototype.destroy.call( this );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: 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] VisualEditor/VisualEditor[master]: ve.ui.DesktopContext: Prevent hiding of the context popup

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343221 )

Change subject: ve.ui.DesktopContext: Prevent hiding of the context popup
..


ve.ui.DesktopContext: Prevent hiding of the context popup

* Something in here is not expecting the PopupWidget to spontaneously
  hide itself and doesn't show it back correctly, causing T160190.
* Even if we tracked that down and fixed it, we don't set the "anchor
  element" ($floatableContainer) of the popup to anything sensible
  anyway, so the popup would hide when it shouldn't. Especially
  embeddable context popups (e.g. for a large block image) seem to
  disappear for me all the time while their nodes are still visible.

Bug: T160190
Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..ee44479 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -19,7 +19,10 @@
ve.ui.DesktopContext.super.apply( this, arguments );
 
// Properties
-   this.popup = new OO.ui.PopupWidget( { $container: this.surface.$element 
} );
+   this.popup = new OO.ui.PopupWidget( {
+   hideWhenOutOfView: false,
+   $container: this.surface.$element
+   } );
this.position = null;
this.embeddable = null;
this.boundingRect = null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: DLynch 
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] mediawiki...VisualEditor[master]: Follow-up 335b56728: Reality doesn't run in perma-debug mode...

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343220 )

Change subject: Follow-up 335b56728: Reality doesn't run in perma-debug mode :-)
..


Follow-up 335b56728: Reality doesn't run in perma-debug mode :-)

Change-Id: I042b907263a5ec40a277803d73c6bbd5e161b0f0
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 71f4bbb..d00767f 100644
--- a/extension.json
+++ b/extension.json
@@ -1773,7 +1773,7 @@
]
},
"ext.visualEditor.diffing": {
-   "debugScripts": [
+   "scripts": [
"lib/ve/src/ve.DiffTreeNode.js",
"lib/ve/src/ve.DiffMatchPatch.js",
"lib/ve/src/dm/ve.dm.VisualDiff.js",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Add a 'what's this?' link to filter groups

2017-03-16 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343222 )

Change subject: RCFilters UI: Add a 'what's this?' link to filter groups
..

RCFilters UI: Add a 'what's this?' link to filter groups

Bug: T159186
Change-Id: I347c23fdabab2a1e1c52f5b10995bcbb2a316875
---
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js
7 files changed, 135 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/22/343222/1

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 2ef4f3a..c6fae8c 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1370,6 +1370,7 @@
"rcfilters-invalid-filter": "Invalid filter",
"rcfilters-empty-filter": "No active filters. All contributions are 
shown.",
"rcfilters-filterlist-title": "Filters",
+   "rcfilters-filterlist-whatsthis": "What's this?",
"rcfilters-filterlist-feedbacklink": "Provide feedback on the new 
(beta) filters",
"rcfilters-highlightbutton-title": "Highlight results",
"rcfilters-highlightmenu-title": "Select a color",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index c3a871f..ea7474d 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1558,6 +1558,7 @@
"rcfilters-empty-filter": "Placeholder for the filter list when no 
filters were chosen.",
"rcfilters-filterlist-title": "Title for the filters 
list.\n{{Identical|Filter}}",
"rcfilters-filterlist-feedbacklink": "Caption for the link to the 
feedback page about the filters beta feature.",
+   "rcfilters-filterlist-whatsthis": "Caption for the link that opens a 
popup with explanations about this filter group.",
"rcfilters-highlightbutton-title": "Title for the highlight button used 
to toggle the highlight feature on and off.",
"rcfilters-highlightmenu-title": "Title for the highlight menu used to 
select the highlight color for an individual filter.",
"rcfilters-highlightmenu-help": "Tooltip for the highlight menu for 
individual filters.",
diff --git a/resources/Resources.php b/resources/Resources.php
index 6d08c44..97808cd 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1806,6 +1806,7 @@
'rcfilters-filterlist-title',
'rcfilters-filterlist-feedbacklink',
'rcfilters-filterlist-noresults',
+   'rcfilters-filterlist-whatsthis',
'rcfilters-highlightbutton-title',
'rcfilters-highlightmenu-title',
'rcfilters-highlightmenu-help',
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
index 22323e8..1c46b85 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -14,6 +14,7 @@
 * @cfg {boolean} [active] Group is active
 * @cfg {boolean} [fullCoverage] This filters in this group 
collectively cover all results
 * @cfg {Object} [conflicts] Defines the conflicts for this filter group
+* @cfg {Object} [whatsThis] Defines the messages that should appear 
for the 'whats this' popup
 */
mw.rcfilters.dm.FilterGroup = function MwRcfiltersDmFilterGroup( name, 
config ) {
config = config || {};
@@ -29,6 +30,8 @@
 
this.active = !!config.active;
this.fullCoverage = !!config.fullCoverage;
+
+   this.whatsThis = config.whatsThis || {};
 
this.conflicts = config.conflicts || {};
 
@@ -85,6 +88,24 @@
};
 
/**
+* Get the messags defining the 'whats this' popup for this group
+*
+* @return {Object} What's this messages
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.getWhatsThis = function () {
+   return this.whatsThis;
+   };
+
+   /**
+* Check whether this group has a 'what's this' message
+*
+* @return {boolean} This group has a what's this message
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.hasWhatsThis = function () {
+   return !!this.whatsThis.body;
+   };
+
+   /**
 * Get the conflicts associated with the entire group.
 * Conflict object is set up by filter name keys and conflict
 * definition. For example:
diff --git 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ve.ui.DesktopContext: Prevent hiding of the context popup

2017-03-16 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343221 )

Change subject: ve.ui.DesktopContext: Prevent hiding of the context popup
..

ve.ui.DesktopContext: Prevent hiding of the context popup

* Something in here is not expecting the PopupWidget to spontaneously
  hide itself and doesn't show it back correctly, causing T160190.
* Even if we tracked that down and fixed it, we don't set the "anchor
  element" ($floatableContainer) of the popup to anything sensible
  anyway, so the popup would hide when it shouldn't. Especially
  embeddable context popups (e.g. for a large block image) seem to
  disappear for me all the time while their nodes are still visible.

Bug: T160190
Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/21/343221/1

diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..ee44479 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -19,7 +19,10 @@
ve.ui.DesktopContext.super.apply( this, arguments );
 
// Properties
-   this.popup = new OO.ui.PopupWidget( { $container: this.surface.$element 
} );
+   this.popup = new OO.ui.PopupWidget( {
+   hideWhenOutOfView: false,
+   $container: this.surface.$element
+   } );
this.position = null;
this.embeddable = null;
this.boundingRect = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc68849759d1815a836670b15bc94f403cdeb66c
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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] operations/puppet[production]: Update ruthenium nginx conf to handle updated parsoid test d...

2017-03-16 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343099 )

Change subject: Update ruthenium nginx conf to handle updated parsoid test 
domains
..


Update ruthenium nginx conf to handle updated parsoid test domains

* Split single server block into separate server blocks, one each
  for parsoid-rt-tests and parsoid-vd-tests.

* Retained the legacy parsoid-tests domain to default to
  parsoid-rt-tests for now.

Bug: T159995

Change-Id: Iddace17e3ef8a2afc6daad28ef2e546874517b4b
---
M modules/parsoid/templates/parsoid-testing.nginx.conf.erb
1 file changed, 27 insertions(+), 20 deletions(-)

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



diff --git a/modules/parsoid/templates/parsoid-testing.nginx.conf.erb 
b/modules/parsoid/templates/parsoid-testing.nginx.conf.erb
index 6cca999..45626d9 100644
--- a/modules/parsoid/templates/parsoid-testing.nginx.conf.erb
+++ b/modules/parsoid/templates/parsoid-testing.nginx.conf.erb
@@ -1,28 +1,11 @@
 server {
+server_name parsoid-tests.wikimedia.org;
+server_name parsoid-rt-tests.wikimedia.org;
+
 listen   8001; ## listen for ipv4; this line is default and implied
-#listen   [::]:80 default ipv6only=on; ## listen for ipv6
 
 root /usr/share/nginx/www;
 index index.html index.htm;
-
-# Make site accessible from http://localhost/
-server_name localhost;
-
-# testreduce web UI for visualdiffing
-location  /vd_testreduce {
-rewrite /vd_testreduce/(.*) /$1  break;
-proxy_pass http://localhost:8010;
-proxy_redirect off;
-proxy_set_header   Host $host;
-}
-
-# visual-diffing web UI (used for a specific test case above)
-location  /vd {
-rewrite /vd/(.*) /$1  break;
-proxy_pass http://localhost:8012;
-proxy_redirect off;
-proxy_set_header   Host $host;
-}
 
 # parsoid (used for a specific test case below)
 location  /parsoid {
@@ -39,3 +22,27 @@
 proxy_set_header   Host $host;
 }
 }
+
+server {
+server_name parsoid-vd-tests.wikimedia.org;
+
+listen   8001; ## listen for ipv4; this line is default and implied
+
+root /usr/share/nginx/www;
+index index.html index.htm;
+
+# visual-diffing web UI (used for a specific test case above)
+location  /vd {
+rewrite /vd/(.*) /$1  break;
+proxy_pass http://localhost:8012;
+proxy_redirect off;
+proxy_set_header   Host $host;
+}
+
+# testreduce web UI for visualdiffing
+location  / {
+proxy_pass http://localhost:8010;
+proxy_redirect off;
+proxy_set_header   Host $host;
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddace17e3ef8a2afc6daad28ef2e546874517b4b
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up 335b56728: Reality doesn't run in perma-debug mode...

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343220 )

Change subject: Follow-up 335b56728: Reality doesn't run in perma-debug mode :-)
..

Follow-up 335b56728: Reality doesn't run in perma-debug mode :-)

Change-Id: I042b907263a5ec40a277803d73c6bbd5e161b0f0
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 71f4bbb..d00767f 100644
--- a/extension.json
+++ b/extension.json
@@ -1773,7 +1773,7 @@
]
},
"ext.visualEditor.diffing": {
-   "debugScripts": [
+   "scripts": [
"lib/ve/src/ve.DiffTreeNode.js",
"lib/ve/src/ve.DiffMatchPatch.js",
"lib/ve/src/dm/ve.dm.VisualDiff.js",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I042b907263a5ec40a277803d73c6bbd5e161b0f0
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] operations/mediawiki-config[master]: readme: Update documentation about current directory structure

2017-03-16 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343219 )

Change subject: readme: Update documentation about current directory structure
..

readme: Update documentation about current directory structure

* Update information about dblists/, images/, and db-*.php.
* Add information about static/.
* Fix indentation.

Change-Id: Id560622baeaf1c724f857fc92dd6ec0b5c7f9baf
---
M README
1 file changed, 16 insertions(+), 13 deletions(-)


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

diff --git a/README b/README
index 0d070e2..e5fa32f 100644
--- a/README
+++ b/README
@@ -4,17 +4,15 @@
 Files in this repository are almost a mirror of the Wikimedia Foundation
 cluster configuration. Omitted files include passwords and security measures.
 
-*.dblist
- List of databases. To vary by realm (e.g. 'production', 'labs'), add the realm
-as a suffix before the extension, separated with a dash. Example:
-   "all-labs.dblist".
+dblists/
+ List of wiki databases.
+ For labs-only dblists, add "-labs" suffix before the file extension.
 
 wikiversions.json, wikiversions.php
 wikiversions-labs.json, wikiversions-labs.php
  Let us associate a database with a specific copy of MediaWiki (generally a
-branch). The .cdb file is updated by editing wikiversions.json first and then
-running multiversion/refreshWikiversions. To vary by realm, add a suffix
-before the extension, e.g. "wikiversions-labs.json".
+ branch). The .php file is updated by editing wikiversions.json first and then
+ running multiversion/updateWikiversions.
 
 debug.json
  Configuration for X-Wikimedia-Debug. The browser extensions use this to
@@ -22,10 +20,15 @@
  backends. See .
 
 docroot/
- The Apache document root for several of our VirtualHosts.
+ The Apache document roots for most of our VirtualHosts.
+
+static/
+ Static files available under all docroots as /static.
+ Contains icons and images used by MediaWiki, such as project logos,
+ favicons, CentralAuth SUL icons and more.
 
 images/
- Shared pictures for the unified login system used by CentralAuth.
+ Deprecated aliases for a subset of files in /static/images.
 
 w/
  The "w/" directory in the docroot of any MediaWiki-serving VirtualHost.
@@ -34,17 +37,17 @@
  Hold some PHPUnit tests.
 
 wmf-config/
- The MediaWiki configuration for all database. Think of it like a huge
-LocalSettings.php.
+ The MediaWiki configuration for all database.
+ Think of it like a huge LocalSettings.php.
 
 wmf-config/CommonSettings.php
  Generic configuration such as including extensions or calling over piece
  of configuration. This is mostly shared among all wikis.
 
 wmf-config/InitialiseSettings.php
- Per wiki configuration.
+ Per-wiki configuration.
 
-wmf-config/db.php
+wmf-config/db-*.php
  Databases related configuration.
 
 wmf-config/mc.php

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Test more fields on donation import

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340885 )

Change subject: Test more fields on donation import
..


Test more fields on donation import

Make sure we have things like the donor name!

Change-Id: I4d595f751866b3eb135d421ac21018b30a998d14
---
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
1 file changed, 43 insertions(+), 5 deletions(-)

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



diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index c1d2284..8038970 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -79,19 +79,57 @@
 $this->queueConsumer->processMessage( $message->getBody() );
 $this->queueConsumer->processMessage( $message2->getBody() );
 
+$campaignField = wmf_civicrm_get_custom_field_name('campaign');
+
+$expected = array(
+  'contact_type' => 'Individual',
+  'sort_name' => 'laast, firrst',
+  'display_name' => 'firrst laast',
+  'first_name' => 'firrst',
+  'last_name' => 'laast',
+  'currency' => 'USD',
+  'total_amount' => '400.00',
+  'fee_amount' => '0.00',
+  'net_amount' => '400.00',
+  'trxn_id' => 'GLOBALCOLLECT ' . $message->getGatewayTxnId(),
+  'contribution_source' => 'USD 400',
+  'financial_type' => 'Cash',
+  'contribution_status' => 'Completed',
+  'payment_instrument' => 'Credit Card: Visa',
+  $campaignField => '',
+);
+$returnFields = array_keys( $expected );
+
 $contribution = civicrm_api3('Contribution', 'getsingle', array(
   wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message->getGatewayTxnId(),
-  'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
+  'return' => $returnFields
 ));
-
$this->assertEmpty($contribution[wmf_civicrm_get_custom_field_name('campaign')] 
);
+
+$this->assertArraySubset( $expected, $contribution );
 
 $contribution2 = civicrm_api3('Contribution', 'getsingle', array(
   wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message2->getGatewayTxnId(),
-  'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
+  'return' => $returnFields
 ));
 
-$this->assertEquals('Benefactor Gift', 
$contribution2[wmf_civicrm_get_custom_field_name('campaign')] );
-
+$expected = array(
+  'contact_type' => 'Individual',
+  'sort_name' => 'laast, firrst',
+  'display_name' => 'firrst laast',
+  'first_name' => 'firrst',
+  'last_name' => 'laast',
+  'currency' => 'USD',
+  'total_amount' => '2857.02',
+  'fee_amount' => '0.00',
+  'net_amount' => '2857.02',
+  'trxn_id' => 'GLOBALCOLLECT ' . $message2->getGatewayTxnId(),
+  'contribution_source' => 'PLN 952.34',
+  'financial_type' => 'Cash',
+  'contribution_status' => 'Completed',
+  'payment_instrument' => 'Credit Card: Visa',
+  $campaignField => 'Benefactor Gift',
+);
+$this->assertArraySubset( $expected, $contribution2 );
 $this->assertNotEquals( $contribution['contact_id'], 
$contribution2['contact_id'] );
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: DesktopContext: on destroy, tell our popup to stop positioning

2017-03-16 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343217 )

Change subject: DesktopContext: on destroy, tell our popup to stop positioning
..

DesktopContext: on destroy, tell our popup to stop positioning

When a popup is in positioning-mode, it has a scroll event bound on its
context. This can cause issues, as we're removing everything it relies on from
the DOM and discarding it.

Bug: T160197
Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
---
M src/ui/contexts/ve.ui.DesktopContext.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/17/343217/1

diff --git a/src/ui/contexts/ve.ui.DesktopContext.js 
b/src/ui/contexts/ve.ui.DesktopContext.js
index 16b6da5..baa21f0 100644
--- a/src/ui/contexts/ve.ui.DesktopContext.js
+++ b/src/ui/contexts/ve.ui.DesktopContext.js
@@ -430,6 +430,8 @@
resize: this.onWindowResizeHandler,
scroll: this.onWindowScrollDebounced
} );
+   // Popups bind scroll events if they're in positioning mode, so make 
sure that's disabled
+   this.popup.togglePositioning( false );
 
// Parent method
return ve.ui.DesktopContext.super.prototype.destroy.call( this );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad4fd3462c38c8e0fc55fb51a9429d922fa21817
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: [WIP] Debian packaging

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343218 )

Change subject: [WIP] Debian packaging
..

[WIP] Debian packaging

Change-Id: Ib4a8481ecc40e72e39c4670bad93786505f8d0d1
TODO: Making empty packages at the moment.  copy README.
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/rules
A debian/source/format
A debian/upstream/metadata
7 files changed, 48 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/18/343218/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..46b6d21
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-process-control (0.0.1~rc1-1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Adam Roses Wight   Thu, 16 Mar 2017 00:12:17 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..767c468
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: python-process-control
+Maintainer: Adam Roses Wight 
+Section: admin
+Priority: optional
+Build-Depends: debhelper (>= 9), python-all, python-setuptools, python3-all, 
python3-setuptools
+Standards-Version: 3.9.8
+Homepage: https://github.com/adamwight/process-control
+Vcs-Browser: https://github.com/adamwight/process-control
+Vcs-Git: git://github.com/adamwight/process-control.git
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
+
+Package: python-process-control
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Tools for Wikimedia Foundation Fundraising job management
+ Control and schedule jobs using configuration files.
+
+Package: python3-process-control
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Tools for Wikimedia Foundation Fundraising job management
+ Control and schedule jobs using configuration files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..ebd8e4d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://github.com/adamwight/process-control
+
+Files: *.py *.md *.yaml debian/* .gitignore
+Copyright: 2017, Adam Roses Wight 
+License: GPL-2
+ /usr/share/common-licenses/GPL-2
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..5b2ea99
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+export PYBUILD_TEST_PLUGIN = nose
+
+%:
+   dh $@ --with python2,python3
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 000..2922586
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+Bug-Database: https://github.com/adamwight/process-control/issues
+Bug-Submit: https://github.com/adamwight/process-control/issues/new
+Contact: Adam Roses Wight 
+Repository: git://github.com/adamwight/process-control.git
+Repository-Browse: https://github.com/adamwight/process-control

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4a8481ecc40e72e39c4670bad93786505f8d0d1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: Complete plaintext section markers

2017-03-16 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343216 )

Change subject: Complete plaintext section markers
..

Complete plaintext section markers

The heading tags from getExtract is useful even in plaintext output
mode. These tags, scrambled to a special format by ExtractFormatter,
are used by doSection(), which looks for such tags and reformat them
into the format specified by sectionformat.

When truncated incorrectly, these markers will stay in the text and get
converted to U+FFFD characters, as noted in the bug below.

Bug: T92628
Change-Id: Ib91fab62601087c891fba0e7fadea7d249c7f18b
---
M includes/ApiQueryExtracts.php
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index f80b90b..ecedf27 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -318,13 +318,24 @@
}
 
/**
-* A simple wrapper around tidy
+* Runs tidy for HTML, completes section markers otherwise
 * @param string $text
 * @return string
 */
private function tidy( $text ) {
-   if ( $this->getConfig()->get( 'UseTidy' ) && 
!$this->params['plaintext'] ) {
-   $text = trim( MWTidy::tidy( $text ) );
+   if ( $this->getConfig()->get( 'UseTidy' ) ) {
+   if ( $this->params['plaintext'] ) {
+   // Find and complete truncated sections markers 
at the very end
+   $text = preg_replace(
+   // XXX: Assuming length of 
SECTION_MARKER_END stays at 2
+   // (don't want to write nested group 
generation [e.g. (a(b(c)?)?)?] for now)
+   "/\n\n" . 
ExtractFormatter::SECTION_MARKER_START . '(\d)' . 
ExtractFormatter::SECTION_MARKER_END[0] . "?$/D",
+   "\n\n" . self::SECTION_MARKER_START . 
'$1' . self::SECTION_MARKER_END,
+   $text
+   );
+   } else {
+   $text = trim( MWTidy::tidy( $text ) );
+   }
}
return $text;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib91fab62601087c891fba0e7fadea7d249c7f18b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Artoria2e5 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Plaster-over regex compilation failure

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341849 )

Change subject: Plaster-over regex compilation failure
..


Plaster-over regex compilation failure

Caused by 3e32d21210362b9a050862e28b75a11a52b6021e.

Bug: T159881
Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
---
M backend/CodeCommentLinker.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/backend/CodeCommentLinker.php b/backend/CodeCommentLinker.php
index abcb95b..f2fddd8 100644
--- a/backend/CodeCommentLinker.php
+++ b/backend/CodeCommentLinker.php
@@ -20,7 +20,9 @@
function link( $text ) {
# Catch links like 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245#c829
# Ended by space or brackets (like those pesky  tags)
-   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . Parser::EXT_LINK_URL_CLASS . '+)/',
+   $EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F\p{Zs}]';
+
+   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . $EXT_LINK_URL_CLASS . '+)/',
array( $this, 'generalLink' ), $text );
$text = preg_replace_callback( '/\br(\d+)\b/',
array( $this, 'messageRevLink' ), $text );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[wmf/1.29.0-wmf.16]: Plaster-over regex compilation failure

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343215 )

Change subject: Plaster-over regex compilation failure
..


Plaster-over regex compilation failure

Caused by 3e32d21210362b9a050862e28b75a11a52b6021e.

Bug: T159881
Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
---
M backend/CodeCommentLinker.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/backend/CodeCommentLinker.php b/backend/CodeCommentLinker.php
index abcb95b..f2fddd8 100644
--- a/backend/CodeCommentLinker.php
+++ b/backend/CodeCommentLinker.php
@@ -20,7 +20,9 @@
function link( $text ) {
# Catch links like 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245#c829
# Ended by space or brackets (like those pesky  tags)
-   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . Parser::EXT_LINK_URL_CLASS . '+)/',
+   $EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F\p{Zs}]';
+
+   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . $EXT_LINK_URL_CLASS . '+)/',
array( $this, 'generalLink' ), $text );
$text = preg_replace_callback( '/\br(\d+)\b/',
array( $this, 'messageRevLink' ), $text );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Reedy 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Add dir attribute to each language in the top10 section

2017-03-16 Thread JGirault (Code Review)
JGirault has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343214 )

Change subject: Add dir attribute to each language in the top10 section
..

Add dir attribute to each language in the top10 section

Ensures text for right-to-left languages is displayed RTL,
and text for left-to-right languages is displayed LTR.

Bug: T122053
Change-Id: I5b3156282a434a197f1ff14d61c1e83b992a0d61
---
M dev/wikipedia.org/assets/js/page-localized.js
M dev/wikipedia.org/assets/js/topten-localized.js
M dev/wikipedia.org/controller.js
M dev/wikipedia.org/index.handlebars
A dev/wikipedia.org/rtl-languages.json
M dev/wikipedia.org/templates/top10.handlebars
M hbs-helpers.global.js
7 files changed, 56 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/14/343214/1

diff --git a/dev/wikipedia.org/assets/js/page-localized.js 
b/dev/wikipedia.org/assets/js/page-localized.js
index 8ce8380..f42caba 100644
--- a/dev/wikipedia.org/assets/js/page-localized.js
+++ b/dev/wikipedia.org/assets/js/page-localized.js
@@ -11,42 +11,13 @@
  * If a translation value is missing, page will default to english.
  */
 
-( function ( wmTest, translationsHash, mw ) {
+( function ( wmTest, translationsHash, mw, rtlLangs ) {
 
var primaryLang = wmTest.userLangs[ 0 ],
storedTranslationHash,
storedTranslations,
l10nReq,
-   l10nInfo,
-   rtlLangs = [
-   'ar',
-   'arc',
-   'arz',
-   'bcc',
-   'bgn',
-   'bqi',
-   'ckb',
-   'dv',
-   'fa',
-   'glk',
-   'he',
-   'kk-cn',
-   'kk-arab',
-   'khw',
-   'ks',
-   'ku-arab',
-   'lki',
-   'lrc',
-   'luz',
-   'mzn',
-   'pnb',
-   'ps',
-   'sd',
-   'sdh',
-   'ug',
-   'ur',
-   'yi'
-   ];
+   l10nInfo;
 
/**
 * Helper function to safely parse JSON an return empty string on error.
@@ -216,4 +187,4 @@
replacel10nText( l10nInfo );
}
 
-}( wmTest, translationsHash, mw ) );
+}( wmTest, translationsHash, mw, rtlLangs ) );
diff --git a/dev/wikipedia.org/assets/js/topten-localized.js 
b/dev/wikipedia.org/assets/js/topten-localized.js
index d2f8637..162b63a 100644
--- a/dev/wikipedia.org/assets/js/topten-localized.js
+++ b/dev/wikipedia.org/assets/js/topten-localized.js
@@ -18,6 +18,7 @@
topLinkLangs,
storedTranslationHash = mw.storage.get( 'translationHash' ),
storedTranslations;
+
/**
 * Helper function to safely parse JSON an return empty string on error.
 *
@@ -260,6 +261,7 @@
localizeTopLink( repurposedTopLink, topLinkLang 
);
topLinksContainer.insertBefore( 
repurposedTopLink, topLinks[ i ] );
}
+   ( topLinkNode || repurposedTopLink ).setAttribute( 
'dir', rtlLangs.indexOf( topLinkLang ) >= 0 ? 'rtl' : 'ltr' );
}
}
 
diff --git a/dev/wikipedia.org/controller.js b/dev/wikipedia.org/controller.js
index 0d4c47a..a0070f5 100644
--- a/dev/wikipedia.org/controller.js
+++ b/dev/wikipedia.org/controller.js
@@ -6,6 +6,7 @@
stats = require( '../../data/stats' ),
otherProjects = require( './other-projects.json' ),
otherLanguages = require( './other-languages.json' ),
+   rtlLanguages = require( './rtl-languages.json' ),
crypto = require( 'crypto' ),
exec = require( 'child_process' ).execSync,
top10List,
@@ -112,6 +113,9 @@
top10Dropdown: top10Dropdown,
otherProjects: otherProjects,
otherLanguages: otherLanguages,
+   rtlLanguages: rtlLanguages,
+   // The only "advantage" to do this instead of JSON.stringify is to get 
single quotes.
+   rtlLanguagesStringified: '[\'' + rtlLanguages.join('\',\'') + '\']',
translationChecksum: cachebuster
 };
 
diff --git a/dev/wikipedia.org/index.handlebars 
b/dev/wikipedia.org/index.handlebars
index 4f0be4f..020be79 100644
--- a/dev/wikipedia.org/index.handlebars
+++ b/dev/wikipedia.org/index.handlebars
@@ -56,7 +56,8 @@
 }}
 
 

[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[wmf/1.29.0-wmf.16]: Plaster-over regex compilation failure

2017-03-16 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343215 )

Change subject: Plaster-over regex compilation failure
..

Plaster-over regex compilation failure

Caused by 3e32d21210362b9a050862e28b75a11a52b6021e.

Bug: T159881
Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
---
M backend/CodeCommentLinker.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/backend/CodeCommentLinker.php b/backend/CodeCommentLinker.php
index abcb95b..f2fddd8 100644
--- a/backend/CodeCommentLinker.php
+++ b/backend/CodeCommentLinker.php
@@ -20,7 +20,9 @@
function link( $text ) {
# Catch links like 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245#c829
# Ended by space or brackets (like those pesky  tags)
-   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . Parser::EXT_LINK_URL_CLASS . '+)/',
+   $EXT_LINK_URL_CLASS = '[^][<>"\\x00-\\x20\\x7F\p{Zs}]';
+
+   $text = preg_replace_callback( '/(^|[^\w[])(' . 
wfUrlProtocolsWithoutProtRel() . ')(' . $EXT_LINK_URL_CLASS . '+)/',
array( $this, 'generalLink' ), $text );
$text = preg_replace_callback( '/\br(\d+)\b/',
array( $this, 'messageRevLink' ), $text );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8504fdc7473710c2fed1663720784e1a355eaf19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: wmf/1.29.0-wmf.16
Gerrit-Owner: Reedy 
Gerrit-Reviewer: 20after4 

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: "disabled" flag

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343195 )

Change subject: "disabled" flag
..


"disabled" flag

Change-Id: I055c025544c8f194cd9cfe2d21d43efadb7b5c43
---
M README.md
M crontab.py
M job_wrapper.py
A tests/data/disabled.yaml
A tests/data/scheduled/disabled.yaml
M tests/test_crontab.py
6 files changed, 28 insertions(+), 4 deletions(-)

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



diff --git a/README.md b/README.md
index 9fa2527..d1653ec 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,14 @@
 
 command: /usr/local/bin/timecard --start 9:00 --end 5:30
 
+# Optional schedule, in Vixie cron format:
+# minute hour day-of-month month day-of-week
+schedule: */5 * * * *
+
+# Optional flag to prevent scheduled job execution.  The job
+# can still be run as a single-shot.
+disabled: true
+
 # Optional timeout in seconds, after which your job will be
 # aborted.  Defaults to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
 timeout: 30
@@ -52,3 +60,5 @@
 * Script to kill jobs.
 * Script to run a job one-off.
 * Job group tags.
+* Slow-start and monitoring.
+* Optional backoff.
diff --git a/crontab.py b/crontab.py
index f819d7e..566b573 100644
--- a/crontab.py
+++ b/crontab.py
@@ -34,7 +34,7 @@
 class JobCrontab(object):
 def __init__(self, job=None):
 self.job = job
-if "schedule" in job.config:
+if "schedule" in job.config and job.enabled:
 self.enabled = True
 else:
 self.enabled = False
diff --git a/job_wrapper.py b/job_wrapper.py
index e07de16..4813b3a 100644
--- a/job_wrapper.py
+++ b/job_wrapper.py
@@ -27,9 +27,15 @@
 else:
 self.timeout = DEFAULT_TIMEOUT
 
-def run(self):
-# if "disabled" in self.config and self.config["disabled"] in ["1", 
"true"]:
+if "disabled" in self.config and self.config["disabled"] is True:
+self.enabled = False
+else:
+self.enabled = True
 
+if "schedule" not in self.config:
+self.enabled = False
+
+def run(self):
 lock.begin(job_tag=self.name)
 
 command = shlex.split(self.config["command"])
diff --git a/tests/data/disabled.yaml b/tests/data/disabled.yaml
new file mode 100644
index 000..c9baf66
--- /dev/null
+++ b/tests/data/disabled.yaml
@@ -0,0 +1,3 @@
+name: Disabled job
+command: /bin/true
+disabled: true
diff --git a/tests/data/scheduled/disabled.yaml 
b/tests/data/scheduled/disabled.yaml
new file mode 100644
index 000..46de851
--- /dev/null
+++ b/tests/data/scheduled/disabled.yaml
@@ -0,0 +1,4 @@
+name: No cron
+command: /bin/true
+disabled: true
+schedule: "* * * * *"
diff --git a/tests/test_crontab.py b/tests/test_crontab.py
index a3178be..c0503ad 100644
--- a/tests/test_crontab.py
+++ b/tests/test_crontab.py
@@ -11,7 +11,8 @@
 tab = tab.replace(test_conf_dir, "X")
 tab = tab.replace(crontab.RUNNER_PATH, "Y")
 
-expected = """# Generated from X/schedule_2.yaml
+expected = """# Skipping disabled job X/disabled.yaml
+# Generated from X/schedule_2.yaml
 */10 * * * * jenkins Y X/schedule_2.yaml
 # Generated from X/schedule_good.yaml
 */5 * * * * jenkins Y X/schedule_good.yaml

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I055c025544c8f194cd9cfe2d21d43efadb7b5c43
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Note that you have to quote crontab due to its punctuation

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343212 )

Change subject: Note that you have to quote crontab due to its punctuation
..


Note that you have to quote crontab due to its punctuation

Change-Id: I23c8a540cb1f7af3118488a4bb6dcf5d1f657d07
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index d1653ec..10f2af5 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
 
 # Optional schedule, in Vixie cron format:
 # minute hour day-of-month month day-of-week
-schedule: */5 * * * *
+schedule: "*/5 * * * *"
 
 # Optional flag to prevent scheduled job execution.  The job
 # can still be run as a single-shot.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23c8a540cb1f7af3118488a4bb6dcf5d1f657d07
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Rough pass at crontab tweezer

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343171 )

Change subject: Rough pass at crontab tweezer
..


Rough pass at crontab tweezer

Change-Id: I200787ae2f86e3caacbc02db0f674f3c08755533
---
M README.md
A cron-generate
A crontab.py
M job_wrapper.py
A tests/data/scheduled/schedule_2.yaml
A tests/data/scheduled/schedule_good.yaml
A tests/data/scheduled/unscheduled.yaml
A tests/test_crontab.py
8 files changed, 115 insertions(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
index c5300d6..9fa2527 100644
--- a/README.md
+++ b/README.md
@@ -48,3 +48,7 @@
 * Prevent future job runs when unrecoverable failure conditions are detected.
 * Should we support commandline flags?
 * Fine-tuning of failure detection.
+* Script to tweeze crontab.
+* Script to kill jobs.
+* Script to run a job one-off.
+* Job group tags.
diff --git a/cron-generate b/cron-generate
new file mode 100755
index 000..6b093aa
--- /dev/null
+++ b/cron-generate
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+import sys
+
+import crontab
+import job_wrapper
+
+
+def usage():
+   print("Must give a job description directory as the only argument.")
+
+
+if __name__ == "__main__":
+# TODO: Parse CLI args.
+
+   if len(sys.argv) != 2:
+   usage()
+   sys.exit(-1)
+
+   config_dir = sys.argv[1]
+
+   print(crontab.make_cron(config_dir))
diff --git a/crontab.py b/crontab.py
new file mode 100644
index 000..f819d7e
--- /dev/null
+++ b/crontab.py
@@ -0,0 +1,56 @@
+import glob
+import os.path
+
+import job_wrapper
+
+
+# FIXME: global config
+DEFAULT_USER = "jenkins"
+
+CRON_TEMPLATE = """# Generated from {source}
+{schedule} {user} {command}
+"""
+
+RUNNER_PATH = os.path.dirname(__file__) + "/crash-override"
+
+
+def make_cron(config_dir):
+'''
+Read all files from the dir and output a crontab.
+'''
+out = ""
+
+config_files = sorted(glob.glob(config_dir + "/*.yaml"))
+
+for config_path in config_files:
+job = job_wrapper.JobWrapper(config_path=config_path)
+tab = JobCrontab(job)
+
+out += str(tab)
+
+return out
+
+
+class JobCrontab(object):
+def __init__(self, job=None):
+self.job = job
+if "schedule" in job.config:
+self.enabled = True
+else:
+self.enabled = False
+
+def __str__(self):
+if not self.enabled:
+return "# Skipping disabled job 
{path}\n".format(path=self.job.config_path)
+
+command = "{runner} {conf}".format(
+runner=RUNNER_PATH,
+conf=self.job.config_path)
+
+out = CRON_TEMPLATE.format(
+source=self.job.config_path,
+schedule=self.job.config["schedule"],
+user=DEFAULT_USER,
+command=command)
+
+return out
diff --git a/job_wrapper.py b/job_wrapper.py
index 9ae8512..e07de16 100644
--- a/job_wrapper.py
+++ b/job_wrapper.py
@@ -8,12 +8,14 @@
 
 import lock
 
+
 # TODO: Global config.
 DEFAULT_TIMEOUT = 600
 
 
 class JobWrapper(object):
 def __init__(self, config_path=None):
+self.config_path = config_path
 self.config = yaml.safe_load(open(config_path, "r"))
 self.validate_config()
 
@@ -26,6 +28,8 @@
 self.timeout = DEFAULT_TIMEOUT
 
 def run(self):
+# if "disabled" in self.config and self.config["disabled"] in ["1", 
"true"]:
+
 lock.begin(job_tag=self.name)
 
 command = shlex.split(self.config["command"])
diff --git a/tests/data/scheduled/schedule_2.yaml 
b/tests/data/scheduled/schedule_2.yaml
new file mode 100644
index 000..8d95ded
--- /dev/null
+++ b/tests/data/scheduled/schedule_2.yaml
@@ -0,0 +1,3 @@
+name: Another cronjob
+command: /bin/true
+schedule: "*/10 * * * *"
diff --git a/tests/data/scheduled/schedule_good.yaml 
b/tests/data/scheduled/schedule_good.yaml
new file mode 100644
index 000..5f4476e
--- /dev/null
+++ b/tests/data/scheduled/schedule_good.yaml
@@ -0,0 +1,3 @@
+name: Valid cron
+command: /bin/true
+schedule: "*/5 * * * *"
diff --git a/tests/data/scheduled/unscheduled.yaml 
b/tests/data/scheduled/unscheduled.yaml
new file mode 100644
index 000..7d8caa5
--- /dev/null
+++ b/tests/data/scheduled/unscheduled.yaml
@@ -0,0 +1,2 @@
+name: No cron
+command: /bin/true
diff --git a/tests/test_crontab.py b/tests/test_crontab.py
new file mode 100644
index 000..a3178be
--- /dev/null
+++ b/tests/test_crontab.py
@@ -0,0 +1,21 @@
+import os.path
+
+import crontab
+
+
+def test_crontab():
+test_conf_dir = os.path.dirname(__file__) + "/data/scheduled"
+tab = crontab.make_cron(test_conf_dir)
+
+# Strip regional variations.
+tab = tab.replace(test_conf_dir, "X")
+tab = tab.replace(crontab.RUNNER_PATH, "Y")
+
+expected = """# Generated from X/schedule_2.yaml
+*/10 * * * * 

[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: More docs

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343124 )

Change subject: More docs
..


More docs

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

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



diff --git a/README.md b/README.md
index 8bce9c0..c5300d6 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
 Job wrapper which does a bit of bookkeeping for a subprocess.
 
 * Prevents simultaneous runners by saving a lock file per job.
-* Configurable by commandline or config file parameters.
-* Captures stdout and stderr, and can do TBD things with the output.
-* Can prevent future job runs when unrecoverable failure conditions are 
detected.
+* Configurable by config file parameters.
+* Captures stdout and stderr.  We can redirect stdout to a
+file.  Any stderr is interpreted as a job failure.
+
+Running and configuration
+===
 
 To run a job, point at its description file:
 crash-override job-desc.yaml
@@ -15,13 +18,33 @@
 
 command: /usr/local/bin/timecard --start 9:00 --end 5:30
 
-# Optional timeout in seconds, after which your job will be aborted.  Defaults 
to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
+# Optional timeout in seconds, after which your job will be
+# aborted.  Defaults to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
 timeout: 30
 
-# Optional filename for the job output.  All output will be concatenated into 
this file, with a header for each job.
+# Optional filename for the job output.  All output will be
+# concatenated into this file, with a header for each job.
 stdout_destination: "/tmp/jobnuts.log"
 ```
 
-TODO:
+Failure detection
+==
+
+The following conditions will be interpreted as a job failure, after
+which we report the problem to stderr and exit with a non-zero return
+code.
+
+* Any output on stderr.  This output is relayed back to the calling
+process stderr, so may be included in failure email at the moment.
+* Non-zero subprocess exit code.
+* Timeout.
+
+
+TODO
+
+
 * Syslog actions, at least when tweezing new crontabs.
 * Log invocations.
+* Prevent future job runs when unrecoverable failure conditions are detected.
+* Should we support commandline flags?
+* Fine-tuning of failure detection.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id210abfa259c8f3bc2c9e62ba8fc2907554fc70a
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Config validation

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343120 )

Change subject: Config validation
..


Config validation

Change-Id: Id9783d59eb69c82a1552b6ef330dbed830cefe86
---
M README.md
M job_wrapper.py
A tests/data/missing_fields.yaml
A tests/data/schedule_assign.yaml
A tests/data/schedule_atsign.yaml
A tests/data/schedule_good.yaml
A tests/data/schedule_invalid.yaml
A tests/test_validation.py
8 files changed, 71 insertions(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
index 54583c8..8bce9c0 100644
--- a/README.md
+++ b/README.md
@@ -21,3 +21,7 @@
 # Optional filename for the job output.  All output will be concatenated into 
this file, with a header for each job.
 stdout_destination: "/tmp/jobnuts.log"
 ```
+
+TODO:
+* Syslog actions, at least when tweezing new crontabs.
+* Log invocations.
diff --git a/job_wrapper.py b/job_wrapper.py
index eb5d5cf..9ae8512 100644
--- a/job_wrapper.py
+++ b/job_wrapper.py
@@ -8,12 +8,15 @@
 
 import lock
 
+# TODO: Global config.
 DEFAULT_TIMEOUT = 600
 
 
 class JobWrapper(object):
 def __init__(self, config_path=None):
 self.config = yaml.safe_load(open(config_path, "r"))
+self.validate_config()
+
 self.name = self.config["name"]
 self.start_time = datetime.datetime.utcnow().isoformat()
 
@@ -75,3 +78,16 @@
 print(header, file=out)
 
 out.write(stdout_data.decode("utf-8"))
+
+def validate_config(self):
+assert "name" in self.config
+assert "command" in self.config
+if "schedule" in self.config:
+# No tricky assignments.
+assert "=" not in self.config["schedule"]
+# Legal cron, but I don't want to deal with it.
+assert "@" not in self.config["schedule"]
+
+# Be sure the schedule is valid.
+terms = self.config["schedule"].split()
+assert len(terms) == 5
diff --git a/tests/data/missing_fields.yaml b/tests/data/missing_fields.yaml
new file mode 100644
index 000..f52d584
--- /dev/null
+++ b/tests/data/missing_fields.yaml
@@ -0,0 +1 @@
+command: /bin/true
diff --git a/tests/data/schedule_assign.yaml b/tests/data/schedule_assign.yaml
new file mode 100644
index 000..4a881a5
--- /dev/null
+++ b/tests/data/schedule_assign.yaml
@@ -0,0 +1,3 @@
+name: Bad assignment job
+command: /bin/true
+schedule: USER=root a b c d
diff --git a/tests/data/schedule_atsign.yaml b/tests/data/schedule_atsign.yaml
new file mode 100644
index 000..c55c51c
--- /dev/null
+++ b/tests/data/schedule_atsign.yaml
@@ -0,0 +1,3 @@
+name: Bad schedule job
+command: /bin/true
+schedule: "@daily root a b c"
diff --git a/tests/data/schedule_good.yaml b/tests/data/schedule_good.yaml
new file mode 100644
index 000..5f4476e
--- /dev/null
+++ b/tests/data/schedule_good.yaml
@@ -0,0 +1,3 @@
+name: Valid cron
+command: /bin/true
+schedule: "*/5 * * * *"
diff --git a/tests/data/schedule_invalid.yaml b/tests/data/schedule_invalid.yaml
new file mode 100644
index 000..9bfbe2a
--- /dev/null
+++ b/tests/data/schedule_invalid.yaml
@@ -0,0 +1,3 @@
+name: Invalid cron
+command: /bin/true
+schedule: "*/5 * * *"
diff --git a/tests/test_validation.py b/tests/test_validation.py
new file mode 100644
index 000..2cee3e5
--- /dev/null
+++ b/tests/test_validation.py
@@ -0,0 +1,38 @@
+import nose
+import os
+
+import job_wrapper
+
+
+data_dir = os.path.dirname(__file__) + "/data"
+
+
+def load_job(filename):
+path = data_dir + "/" + filename
+job = job_wrapper.JobWrapper(config_path=path)
+return job
+
+
+@nose.tools.raises(AssertionError)
+def test_missing_fields():
+load_job("missing_fields.yaml")
+
+
+@nose.tools.raises(AssertionError)
+def test_schedule_atsign():
+load_job("schedule_atsign.yaml")
+
+
+@nose.tools.raises(AssertionError)
+def test_schedule_assign():
+load_job("schedule_assign.yaml")
+
+
+@nose.tools.raises(AssertionError)
+def test_schedule_invalid():
+load_job("schedule_invalid.yaml")
+
+
+def test_schedule_good():
+job = load_job("schedule_good.yaml")
+assert job.config["schedule"]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9783d59eb69c82a1552b6ef330dbed830cefe86
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow up ec559041: abort notices display early if no notices

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343194 )

Change subject: Follow up ec559041: abort notices display early if no notices
..


Follow up ec559041: abort notices display early if no notices

This avoids attempting to toggle after a destroy call has been made.

Change-Id: Ia756ff6436ec0590639dbbff216cdaf684ec
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 799fd68..7759cf9 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -75,6 +75,7 @@
 
if ( !count ) {
this.destroy();
+   return;
}
 
this.popup.setLabel( ve.msg(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia756ff6436ec0590639dbbff216cdaf684ec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: DLynch 
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] mediawiki...ORES[master]: Add ORES conflicts and What's This?

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343205 )

Change subject: Add ORES conflicts and What's This?
..


Add ORES conflicts and What's This?

Bug: T158459
Bug: T156427
Change-Id: Id6a778eb7cdfe8a8c75f2e37631d5226480fa301
---
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
3 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 2c798ed..69b2d44 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,13 @@
"ores-help-damaging-pref": "This threshold determines how sensitive 
ORES is when flagging edits needing review",
"ores-hide-nondamaging-filter": "Hide probably good edits",
"ores-pref-damaging": "ORES sensitivity",
+   "ores-rcfilters-whats-this-link-text": "Learn more",
+   "ores-rcfilters-ores-conflicts-logactions-global": "The \"Logged 
actions\" filter is conflicting with one or more \"Contribution quality\" or 
\"User intent\" filters. Quality and Intent predictions are not available for 
logged actions. The conflicting filters are marked as inactive above.",
+   "ores-rcfilters-logactions-conflicts-ores": "This filter is conflicting 
with one or more Contribution Quality or User Intent filters. Quality and 
Intent predictions are not available for logged actions.",
"ores-rcfilters-damaging-title": "Contribution quality predictions",
+   "ores-rcfilters-damaging-whats-this-header": "About contribution 
quality predictions",
+   "ores-rcfilters-damaging-whats-this-body": "Filter edits based on how 
likely they are to contain problems using predictions made by ORES, a 
machine-learning service trained on a large set of edits previously scored by 
human editors.\n\nFilters with different levels of accuracy are provided. 
Stricter, more accurate filters find fewer false positives but miss more of 
their targets. Less accurate filters find more of their targets, but they also 
find more false positives.",
+   "ores-rcfilters-damaging-conflicts-logactions": "Contribution Quality 
predictions are not available for certain types of change. This filter is 
inactive because it is in conflict with the following Type of Change 
{{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-damaging-likelygood-label": "Very likely good",
"ores-rcfilters-damaging-likelygood-desc": "Highly accurate at finding 
almost all problem-free edits.",
"ores-rcfilters-damaging-maybebad-label": "May have problems",
@@ -25,6 +31,9 @@
"ores-rcfilters-damaging-verylikelybad-label": "Very likely have 
problems",
"ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious 10% of flawed or damaging edits.",
"ores-rcfilters-goodfaith-title": "User intent predictions",
+   "ores-rcfilters-goodfaith-whats-this-header": "About user intent 
predictions",
+   "ores-rcfilters-goodfaith-whats-this-body": "Filter edits based on 
whether they were, or weren't, made in good faith using predictions generated 
by ORES, a machine-learning service trained on a large set of edits previously 
scored by human editors.\n\nFilters with different levels of accuracy are 
provided. Stricter, more accurate filters find fewer false positives but miss 
more of their targets. Less accurate filters find more of their targets, but 
they also find more false positives.",
+   "ores-rcfilters-goodfaith-conflicts-logactions": "User Intent 
predictions are not available for certain types of change. This filter is 
inactive because it is in conflict with the following Type of Change 
{{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-goodfaith-good-label": "Very likely good faith",
"ores-rcfilters-goodfaith-good-desc": "Highly accurate at finding 
almost all good-faith edits.",
"ores-rcfilters-goodfaith-maybebad-label": "May be bad faith",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a478506..d7eae12 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,7 +19,13 @@
"ores-help-damaging-pref": "Help text for \"ORES sensitivity\" in 
preferences",
"ores-hide-nondamaging-filter": "Label for Contributions filter, 'only 
show'",
"ores-pref-damaging": "Part asking for damaging threshold",
+   "ores-rcfilters-whats-this-link-text": "Text of a link to more 
information about either Contribution Quality Predictions or User Intent 
Predictions",
+   "ores-rcfilters-ores-conflicts-logactions-global": "Message shown in 
the result area when both an ORES filter and the 'Logged actions' filter are 
selected.  This indicates that no results will be shown because log actions are 
never scored by ORES.\n\n\"Logged actions\" is 
{{msg-mw|rcfilters-filter-logactions-label}}.",
+   "ores-rcfilters-logactions-conflicts-ores": "Tooltip shown when 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: RT: convert to profile/role-model

2017-03-16 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342771 )

Change subject: RT: convert to profile/role-model
..


RT: convert to profile/role-model

RT (Request Tracker): Convert puppet code to profile/role-structure.

Change-Id: Id8c2d00fadaf06be84b8f5253ea2421b982767f4
---
R hieradata/role/common/requesttracker_server.yaml
M manifests/site.pp
R modules/profile/manifests/requesttracker/server.pp
A modules/role/manifests/requesttracker_server.pp
4 files changed, 17 insertions(+), 11 deletions(-)

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



diff --git a/hieradata/role/common/requesttracker/server.yaml 
b/hieradata/role/common/requesttracker_server.yaml
similarity index 100%
rename from hieradata/role/common/requesttracker/server.yaml
rename to hieradata/role/common/requesttracker_server.yaml
diff --git a/manifests/site.pp b/manifests/site.pp
index 91436fa..d56e0a6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2729,12 +2729,7 @@
 
 # replaced magnesium (RT) (T119112 T123713)
 node 'ununpentium.wikimedia.org' {
-role(requesttracker::server)
-
-interface::add_ip6_mapped { 'main':
-interface => 'eth0',
-}
-
+role('requesttracker_server')
 }
 
 # Ganglia Web UI
diff --git a/modules/role/manifests/requesttracker/server.pp 
b/modules/profile/manifests/requesttracker/server.pp
similarity index 80%
rename from modules/role/manifests/requesttracker/server.pp
rename to modules/profile/manifests/requesttracker/server.pp
index 427bded..1a87ff3 100644
--- a/modules/role/manifests/requesttracker/server.pp
+++ b/modules/profile/manifests/requesttracker/server.pp
@@ -1,10 +1,12 @@
-#  Production RT
-class role::requesttracker::server {
+# server running "Request Tracker"
+# https://bestpractical.com/request-tracker
+class profile::requesttracker::server {
+
 system::role { 'requesttracker::server': description => 'RT server' }
 
-include passwords::misc::rt
-include ::standard
-include ::base::firewall
+interface::add_ip6_mapped { 'main': interface => 'eth0', }
+
+include ::passwords::misc::rt
 
 class { '::requesttracker':
 apache_site => 'rt.wikimedia.org',
@@ -19,8 +21,11 @@
 config  => template('role/exim/exim4.conf.rt.erb'),
 filter  => template('role/exim/system_filter.conf.erb'),
 }
+
 include exim4::ganglia
 
+include ::base::firewall
+
 # allow RT to receive mail from mail smarthosts
 ferm::service { 'rt-smtp':
 port   => '25',
diff --git a/modules/role/manifests/requesttracker_server.pp 
b/modules/role/manifests/requesttracker_server.pp
new file mode 100644
index 000..fdcc604
--- /dev/null
+++ b/modules/role/manifests/requesttracker_server.pp
@@ -0,0 +1,6 @@
+# https://wikitech.wikimedia.org/wiki/RT
+class role::requesttracker_server {
+
+include ::standard
+include ::profile::requesttracker::server
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8c2d00fadaf06be84b8f5253ea2421b982767f4
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Deploy PageViewInfo to group2

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342685 )

Change subject: Deploy PageViewInfo to group2
..


Deploy PageViewInfo to group2

Bug: T125917
Change-Id: I7befebe0f2b9c068d81ae74f816fbeb6a9cce927
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c2e9caf..107300e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18342,9 +18342,11 @@
 ],
 
 'wmgUsePageViewInfo' => [
-   'default' => false,
-   'group0' => true,
-   'group1' => true,
+   'default' => true,
+   'private' => false,
+   'fishbowl' => false,
+   'nonglobal' => false,
+   'foundationwiki' => true,
 ],
 
 ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7befebe0f2b9c068d81ae74f816fbeb6a9cce927
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: DO NOT MERGE: instrument the damn test

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343213 )

Change subject: DO NOT MERGE: instrument the damn test
..

DO NOT MERGE: instrument the damn test

Change-Id: I8976df22a1e2a396a6f48f2c455b946b864ddfa5
---
M tests/test_crontab.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/13/343213/1

diff --git a/tests/test_crontab.py b/tests/test_crontab.py
index a3178be..b16c8af 100644
--- a/tests/test_crontab.py
+++ b/tests/test_crontab.py
@@ -1,4 +1,6 @@
+from __future__ import print_function
 import os.path
+import sys
 
 import crontab
 
@@ -18,4 +20,5 @@
 # Skipping disabled job X/unscheduled.yaml
 """
 
+print(tab, file=sys.stderr)
 assert expected == tab

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8976df22a1e2a396a6f48f2c455b946b864ddfa5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Note that you have to quote crontab due to its punctuation

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343212 )

Change subject: Note that you have to quote crontab due to its punctuation
..

Note that you have to quote crontab due to its punctuation

Change-Id: I23c8a540cb1f7af3118488a4bb6dcf5d1f657d07
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/12/343212/1

diff --git a/README.md b/README.md
index d1653ec..10f2af5 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
 
 # Optional schedule, in Vixie cron format:
 # minute hour day-of-month month day-of-week
-schedule: */5 * * * *
+schedule: "*/5 * * * *"
 
 # Optional flag to prevent scheduled job execution.  The job
 # can still be run as a single-shot.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23c8a540cb1f7af3118488a4bb6dcf5d1f657d07
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: 100% test coverage

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342971 )

Change subject: 100% test coverage
..


100% test coverage

Change-Id: I80fc8f0abf20ec0d0f971f4da3762e4f7a41b448
---
M .gitignore
M lock.py
D tests/data/boot.yaml
A tests/data/which_out.yaml
M tests/test_job_wrapper.py
M tests/test_lock.py
6 files changed, 23 insertions(+), 8 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 1a0929d..d503969 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 *.pyc
 .cache
+cover
+.coverage
 .tox
diff --git a/lock.py b/lock.py
index 67e2cdd..6c91863 100644
--- a/lock.py
+++ b/lock.py
@@ -8,8 +8,6 @@
 import os.path
 import sys
 
-from logging import Logger as log
-
 lockfile = None
 
 
diff --git a/tests/data/boot.yaml b/tests/data/boot.yaml
deleted file mode 100644
index 8ae5294..000
--- a/tests/data/boot.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-name: Boots
-command: ls
-timeout: 100
-stdout_destination: "/tmp/a"
diff --git a/tests/data/which_out.yaml b/tests/data/which_out.yaml
new file mode 100644
index 000..75b403e
--- /dev/null
+++ b/tests/data/which_out.yaml
@@ -0,0 +1,3 @@
+name: Which job
+command: /bin/which bash
+stdout_destination: /tmp/which_out.log
diff --git a/tests/test_job_wrapper.py b/tests/test_job_wrapper.py
index cea8ef6..730ca2c 100644
--- a/tests/test_job_wrapper.py
+++ b/tests/test_job_wrapper.py
@@ -1,4 +1,3 @@
-import datetime
 import iocapture
 import nose
 import os
@@ -55,3 +54,20 @@
 "grep: Invalid regular expression\n\n"
 "Job Bad grep job failed with code 2\n"
 )
+
+
+def test_store_output():
+path = "/tmp/which_out.log"
+
+if os.path.exists(path):
+os.unlink(path)
+
+run_job("which_out.yaml")
+
+contents = open(path, "r").read()
+lines = contents.split("\n")
+
+assert len(lines) == 6
+assert lines[4] == "/bin/bash"
+
+os.unlink(path)
diff --git a/tests/test_lock.py b/tests/test_lock.py
index 6c4c55b..59ebe97 100644
--- a/tests/test_lock.py
+++ b/tests/test_lock.py
@@ -6,7 +6,7 @@
 
 def tearDown():
 # Clean up any old lockfiles.
-if lock.lockfile != None:
+if lock.lockfile is not None:
 if os.path.exists(lock.lockfile):
 os.unlink(lock.lockfile)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80fc8f0abf20ec0d0f971f4da3762e4f7a41b448
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Allow us to install php7.1 for testing on labs.

2017-03-16 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343211 )

Change subject: Phabricator: Allow us to install php7.1 for testing on labs.
..

Phabricator: Allow us to install php7.1 for testing on labs.

Change-Id: Iac5adc1875c2336bae099fdc5ad2e854ff54588b
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/343211/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destr...

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343206 )

Change subject: Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destroyed
..


Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destroyed

Change-Id: I9f26d252db8069e514dddf00f6f42194fe0a1c15
---
M modules/ve-mw/i18n/qqq.json
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index dec79f8..29b4bc7 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -89,6 +89,7 @@
"visualeditor-ca-ve-edit": "Link text of the dedicated VisualEditor 
{{msg-mw|Edit}} tab.\n{{Identical|VisualEditor}}",
"visualeditor-ca-ve-edit-section": "{{Identical|VisualEditor}}",
"visualeditor-categories-tool": "Tool for opening the categories 
section of the meta dialog.\n{{Identical|Category}}",
+   "visualeditor-changedesc-mwtransclusion": "Generic description of a 
template that has had some parameters changed",
"visualeditor-desc": 
"{{desc|name=VisualEditor|url=https://www.mediawiki.org/wiki/Extension:VisualEditor}};,
"visualeditor-descriptionpagelink": "{{doc-important|Do not translate 
\"Project\"; it is automatically converted to the wiki's project 
namespace.}}\nName of a page describing the use of VisualEditor in this 
project.\n\nUsed in:\n* {{msg-mw|Tag-visualeditor}}\n* 
{{msg-mw|Tag-visualeditor-description}}\n* 
{{msg-mw|Tag-visualeditor-needcheck}}\n* 
{{msg-mw|Tag-visualeditor-needcheck-description}}",
"visualeditor-dialog-media-alttext-section": "Label for the image 
alternative text sub-section.",
@@ -372,6 +373,9 @@
"visualeditor-savedialog-label-review-good": "Label for button to go 
back to a page in order to save form",
"visualeditor-savedialog-label-save-short": "Short label text for save 
button on private wikis for use on width-restricted devices like mobile phones. 
This should be as short as possible.\n{{Identical|Save}}",
"visualeditor-savedialog-label-warning": "Label in front of a save 
dialog warning sentence, separated by 
{{msg-mw|colon-separator}}.\n{{Identical|Warning}}",
+   "visualeditor-savedialog-review-nosummary": "Message shown when no edit 
summary was provided.",
+   "visualeditor-savedialog-review-visual": "Label for button to select 
visual diff mode.",
+   "visualeditor-savedialog-review-wikitext": "Label for button to select 
wikitext diff mode.",
"visualeditor-savedialog-title-conflict": "Title for save dialog slide 
if there is an edit conflict\n{{Identical|Conflict}}",
"visualeditor-savedialog-title-nochanges": "Title for save dialog slide 
for the wikitext diff if there are no changes",
"visualeditor-savedialog-title-preview": "Title for save dialog slide 
for the HTML preview from wikitext mode",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f26d252db8069e514dddf00f6f42194fe0a1c15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: DLynch 
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] mediawiki...CirrusSearch[master]: Make mapping dump return all mappings, not just page mapping

2017-03-16 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343210 )

Change subject: Make mapping dump return all mappings, not just page mapping
..

Make mapping dump return all mappings, not just page mapping

Change-Id: I4fc24116c4afcf6f2b01e6477fb77e28fad29ce9
---
M includes/Api/MappingDump.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/Api/MappingDump.php b/includes/Api/MappingDump.php
index 76c23c5..93d962b 100644
--- a/includes/Api/MappingDump.php
+++ b/includes/Api/MappingDump.php
@@ -27,9 +27,9 @@
$conn = $this->getCirrusConnection();
$indexPrefix = $this->getSearchConfig()->get( 
SearchConfig::INDEX_BASE_NAME );
foreach( $conn->getAllIndexTypes() as $index ) {
-   $mapping = $conn->getPageType( $indexPrefix, $index 
)->getMapping();
+   $mapping = $conn->getIndex( $indexPrefix, $index 
)->getMapping();
$this->getResult()->addValue( null, $index, $mapping );
-   $this->getResult()->addPreserveKeysList( [ $index, 
'page' ], '_all' );
+   $this->getResult()->addPreserveKeysList( [ $index ], 
'_all' );
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CI: Install php7.1

2017-03-16 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343209 )

Change subject: CI: Install php7.1
..

CI: Install php7.1

Change-Id: I54cef7d0441a955a8d8af31f8e1992549763f28d
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/343209/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Bootstrapvz: Simplify and update

2017-03-16 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343208 )

Change subject: Bootstrapvz: Simplify and update
..

Bootstrapvz: Simplify and update

- Remove cloud-init entirely
- Simplify the sudo-ldap commandline
- Remove some obsolete settings

Change-Id: I06344494b443ce924b70fdfacf1a853e77170e21
---
D modules/labs_bootstrapvz/files/cloud.cfg
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
3 files changed, 2 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/343208/1

diff --git a/modules/labs_bootstrapvz/files/cloud.cfg 
b/modules/labs_bootstrapvz/files/cloud.cfg
deleted file mode 100644
index 915967b..000
--- a/modules/labs_bootstrapvz/files/cloud.cfg
+++ /dev/null
@@ -1,90 +0,0 @@
-# The top level settings are used as module
-# and system configuration.
-
-# A set of users which may be applied and/or used by various modules
-# when a 'default' entry is found it will reference the 'default_user'
-# from the distro configuration specified below
-users:
-
-# If this is set, 'root' will not be able to ssh in and they 
-# will get a message to login instead as the above $user (ubuntu)
-disable_root: true
-
-# This will cause the set+update hostname module to not operate (if true)
-preserve_hostname: false
-
-# Example datasource config
-# datasource: 
-#Ec2: 
-#  metadata_urls: [ 'blah.com' ]
-#  timeout: 5 # (defaults to 50 seconds)
-#  max_wait: 10 # (defaults to 120 seconds)
-
-# The modules that run in the 'init' stage
-cloud_init_modules:
- - migrator
- - bootcmd
- - write-files
- - resizefs
- - set_hostname
- - update_hostname
- - update_etc_hosts
- - ca-certs
- - rsyslog
- - users-groups
- - ssh
-
-# The modules that run in the 'config' stage
-cloud_config_modules:
-# Emit the cloud config ready event
-# this can be used by upstart jobs for 'start on cloud-config'.
- - emit_upstart
- - mounts
- - locale
- - set-passwords
- - grub-dpkg
- - apt-pipelining
- - apt-configure
- - package-update-upgrade-install
- - landscape
- - timezone
- - mcollective
- - disable-ec2-metadata
- - runcmd
- - byobu
-
-# The modules that run in the 'final' stage
-cloud_final_modules:
- - rightscale_userdata
- - scripts-per-once
- - scripts-per-boot
- - scripts-per-instance
- - scripts-user
- - ssh-authkey-fingerprints
- - keys-to-console
- - phone-home
- - final-message
- - power-state-change
-
-# System and/or distro specific settings
-# (not accessible to handlers/transforms)
-system_info:
-   # This will affect which distro class gets used
-   distro: debian
-   # Default user name + that default users groups (if added/used)
-   default_user:
- name: admin
- sudo: ALL=(ALL) NOPASSWD:ALL
- shell: /bin/bash
- lock_passwd: True
- gecos: Debian
- groups: [adm, audio, cdrom, dialout, floppy, video, plugdev, dip]
-   # Other config here will be given to the distro class and/or path classes
-   paths:
-  cloud_dir: /var/lib/cloud/
-  templates_dir: /etc/cloud/templates/
-  upstart_dir: /etc/init/
-   package_mirrors:
- - arches: [default]
-   failsafe:
- primary: http://ftp.debian.org/debian
diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 3eee822..8349be2 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -2,12 +2,6 @@
 
 set -x
 
-# Don't do anything until cloud-init has finished.
-while [ ! -f /var/lib/cloud/instance/boot-finished ]
-do
-  sleep 1
-done
-
 echo 'Enabling console logging for puppet while it does the initial run'
 echo 'daemon.* |/dev/console' > /etc/rsyslog.d/60-puppet.conf
 systemctl restart rsyslog.service
diff --git a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml 
b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
index a48d83e..52e8b59 100644
--- a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
+++ b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml
@@ -4,9 +4,6 @@
   name: kvm
 bootstrapper:
   workspace: /target
-image:
-  name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d}
-  description: Debian {system.release} {system.architecture}
 system:
   release: jessie
   architecture: amd64
@@ -134,13 +131,9 @@
 #  it in a raw image causes it to send spam mails.
 #- mpt-status
 plugins:
-  root_password:
-password: test
-  cloud_init:
-username: admin
-metadata_sources: ConfigDrive
   puppet:
 assets: /etc/bootstrap-vz/puppet
+enable_agent: false
   file_copy:
 files:
   -
@@ -153,9 +146,6 @@
 dst: /etc/rc.local
 permissions: "755"
 owner: root
-  -
-src: /etc/bootstrap-vz/cloud.cfg
-dst: /etc/cloud/cloud.cfg
   -
 src: /etc/ldap.conf
 dst: /etc/ldap.conf

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Nova fullstack test: Switch to a testing image, temporarily

2017-03-16 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343207 )

Change subject: Nova fullstack test:  Switch to a testing image, temporarily
..

Nova fullstack test:  Switch to a testing image, temporarily

Change-Id: I5f513d3bbd93b7eb8cafd1cffce73b5aa76a4c0f
---
M modules/openstack/templates/initscripts/nova-fullstack.upstart.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/343207/1

diff --git a/modules/openstack/templates/initscripts/nova-fullstack.upstart.erb 
b/modules/openstack/templates/initscripts/nova-fullstack.upstart.erb
index 0ceccee..60a3a80 100644
--- a/modules/openstack/templates/initscripts/nova-fullstack.upstart.erb
+++ b/modules/openstack/templates/initscripts/nova-fullstack.upstart.erb
@@ -25,6 +25,7 @@
--max-pool <%= @max_pool %>  \
--project admin-monitoring \
--prepend fullstackd \
+   --image debian-jessie-fullstack-test \
--flavor m1.small \
--keyfile <%= @keyfile %> \
--statsd statsd.eqiad.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destr...

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343206 )

Change subject: Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destroyed
..

Follow-up 7a8cc04f0: Re-set qqq messages that i18n bot destroyed

Change-Id: I9f26d252db8069e514dddf00f6f42194fe0a1c15
---
M modules/ve-mw/i18n/qqq.json
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index dec79f8..29b4bc7 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -89,6 +89,7 @@
"visualeditor-ca-ve-edit": "Link text of the dedicated VisualEditor 
{{msg-mw|Edit}} tab.\n{{Identical|VisualEditor}}",
"visualeditor-ca-ve-edit-section": "{{Identical|VisualEditor}}",
"visualeditor-categories-tool": "Tool for opening the categories 
section of the meta dialog.\n{{Identical|Category}}",
+   "visualeditor-changedesc-mwtransclusion": "Generic description of a 
template that has had some parameters changed",
"visualeditor-desc": 
"{{desc|name=VisualEditor|url=https://www.mediawiki.org/wiki/Extension:VisualEditor}};,
"visualeditor-descriptionpagelink": "{{doc-important|Do not translate 
\"Project\"; it is automatically converted to the wiki's project 
namespace.}}\nName of a page describing the use of VisualEditor in this 
project.\n\nUsed in:\n* {{msg-mw|Tag-visualeditor}}\n* 
{{msg-mw|Tag-visualeditor-description}}\n* 
{{msg-mw|Tag-visualeditor-needcheck}}\n* 
{{msg-mw|Tag-visualeditor-needcheck-description}}",
"visualeditor-dialog-media-alttext-section": "Label for the image 
alternative text sub-section.",
@@ -372,6 +373,9 @@
"visualeditor-savedialog-label-review-good": "Label for button to go 
back to a page in order to save form",
"visualeditor-savedialog-label-save-short": "Short label text for save 
button on private wikis for use on width-restricted devices like mobile phones. 
This should be as short as possible.\n{{Identical|Save}}",
"visualeditor-savedialog-label-warning": "Label in front of a save 
dialog warning sentence, separated by 
{{msg-mw|colon-separator}}.\n{{Identical|Warning}}",
+   "visualeditor-savedialog-review-nosummary": "Message shown when no edit 
summary was provided.",
+   "visualeditor-savedialog-review-visual": "Label for button to select 
visual diff mode.",
+   "visualeditor-savedialog-review-wikitext": "Label for button to select 
wikitext diff mode.",
"visualeditor-savedialog-title-conflict": "Title for save dialog slide 
if there is an edit conflict\n{{Identical|Conflict}}",
"visualeditor-savedialog-title-nochanges": "Title for save dialog slide 
for the wikitext diff if there are no changes",
"visualeditor-savedialog-title-preview": "Title for save dialog slide 
for the HTML preview from wikitext mode",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f26d252db8069e514dddf00f6f42194fe0a1c15
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] mediawiki...ORES[master]: Add ORES conflicts and What's This?

2017-03-16 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343205 )

Change subject: Add ORES conflicts and What's This?
..

Add ORES conflicts and What's This?

Bug: T158459
Bug: T156427
Change-Id: Id6a778eb7cdfe8a8c75f2e37631d5226480fa301
---
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
3 files changed, 54 insertions(+), 0 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 8cdf211..b7c961d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,15 @@
"ores-help-damaging-pref": "This threshold determines how sensitive 
ORES is when flagging edits needing review",
"ores-hide-nondamaging-filter": "Hide probably good edits",
"ores-pref-damaging": "ORES sensitivity",
+   "ores-rcfilters-whats-this-link-text": "Learn more",
+   "ores-rcfilters-ores-conflicts-logactions-global": "The \"Logged 
actions\" filter is conflicting with one or more \"Contribution quality\" or 
\"User intent\" filters. Quality and Intent predictions are not available for 
logged actions. The conflicting filters are marked as inactive above.",
+   "ores-rcfilters-logactions-conflicts-ores": "This filter is conflicting 
with one or more Contribution Quality or User Intent filters. Quality and 
Intent predictions are not available for logged actions.",
"ores-rcfilters-damaging-title": "Contribution quality predictions",
+   "ores-rcfilters-damaging-whats-this-header": "About Contribution 
Quality Predictions",
+   "ores-rcfilters-damaging-whats-this-body": "Filter edits based on how 
likely they are to contain problems using predictions made by ORES, a 
machine-learning service trained on a large set of edits previously scored by 
human editors.
+
+Filters with different levels of accuracy are provided. Stricter, more 
accurate filters find fewer false positives but miss more of their targets. 
Less accurate filters find more of their targets, but they also find more false 
positives.",
+   "ores-rcfilters-damaging-conflicts-logactions": "Contribution Quality 
predictions are not available for certain types of change. This filter is 
inactive because it is in conflict with the following Type of Change 
{{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-damaging-likelygood-label": "Very likely good",
"ores-rcfilters-damaging-likelygood-desc": "Highly accurate at finding 
almost all problem-free edits.",
"ores-rcfilters-damaging-maybebad-label": "May have problems",
@@ -25,6 +33,11 @@
"ores-rcfilters-damaging-verylikelybad-label": "Very likely have 
problems",
"ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious 10% of flawed or damaging edits.",
"ores-rcfilters-goodfaith-title": "User intent predictions",
+   "ores-rcfilters-goodfaith-whats-this-header": "About User Intent 
Predictions",
+   "ores-rcfilters-goodfaith-whats-this-body": "Filter edits based on 
whether they were, or weren't, made in good faith using predictions generated 
by ORES, a machine-learning service trained on a large set of edits previously 
scored by human editors.
+
+Filters with different levels of accuracy are provided. Stricter, more 
accurate filters find fewer false positives but miss more of their targets. 
Less accurate filters find more of their targets, but they also find more false 
positives.",
+   "ores-rcfilters-goodfaith-conflicts-logactions": "User Intent 
predictions are not available for certain types of change. This filter is 
inactive because it is in conflict with the following Type of Change 
{{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-goodfaith-good-label": "Very likely good faith",
"ores-rcfilters-goodfaith-good-desc": "Highly accurate at finding 
almost all good-faith edits.",
"ores-rcfilters-goodfaith-maybebad-label": "May be bad faith",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5615b1a..9711a37 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -22,7 +22,13 @@
"ores-pref-highlight": "Display message for user preference to enable 
highlighting of damaging edits.",
"ores-pref-rc-hidenondamaging": "Display message for user preferences 
to make hidenondamaging default in recent changes",
"ores-pref-watchlist-hidenondamaging": "Display message for user 
preferences to make hidenondamaging default in the watchlist",
+   "ores-rcfilters-whats-this-link-text": "Text of a link to more 
information about either Contribution Quality Predictions or User Intent 
Predictions",
+   "ores-rcfilters-ores-conflicts-logactions-global": "Message shown in 
the result area when both an ORES filter and the 'Logged actions' filter are 
selected.  This indicates that no results will be shown because log actions are 
never scored by 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Linker: Render selflinks as classed s, not s

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343204 )

Change subject: [WIP] Linker: Render selflinks as classed s, not s
..

[WIP] Linker: Render selflinks as classed s, not s

Self-links are still semantically links, and representing them as s
is inelegant and more important a real pain to work with, especially in
contexts where they may change state (like inside an editor).

Instead, render them as  but with a class to style them as before,
named 'mw-selflink' to go with 'mw-redirect'. This allows much easier
adjustment later.

Bug: T160480
Change-Id: If058843924c3b30c116df2520aef93a004d98a5d
---
M includes/Linker.php
M resources/src/mediawiki.legacy/shared.css
2 files changed, 16 insertions(+), 6 deletions(-)


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

diff --git a/includes/Linker.php b/includes/Linker.php
index 0c8d1c6..82735cc 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -164,10 +164,10 @@
}
 
/**
-* Make appropriate markup for a link to the current article. This is
-* currently rendered as the bold link text. The calling sequence is the
-* same as the other make*LinkObj static functions, despite $query not
-* being used.
+* Make appropriate markup for a link to the current article. This is 
since
+* MediaWiki 1.29.0 rendered as an a tag with a class showing the link 
text.
+* The calling sequence is the same as the other make*LinkObj static
+* functions, but $query is not used.
 *
 * @since 1.16.3
 * @param Title $nt
@@ -179,7 +179,7 @@
 * @return string
 */
public static function makeSelfLinkObj( $nt, $html = '', $query = '', 
$trail = '', $prefix = '' ) {
-   $ret = "{$prefix}{$html}{$trail}";
+   $ret = "{$prefix}{$html}{$trail}";
if ( !Hooks::run( 'SelfLinkBegin', [ $nt, &$html, &$trail, 
&$prefix, &$ret ] ) ) {
return $ret;
}
@@ -188,7 +188,7 @@
$html = htmlspecialchars( $nt->getPrefixedText() );
}
list( $inside, $trail ) = self::splitTrail( $trail );
-   return "{$prefix}{$html}{$inside}{$trail}";
+   return "{$prefix}{$html}{$inside}{$trail}";
}
 
/**
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index ff0c0e3..239746c 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -322,6 +322,16 @@
color: #ba;
 }
 
+/* self links */
+a.mw-selflink {
+   color: inherit;
+   font-weight: bold;
+}
+a.mw-selflink:hover {
+   cursor: inherit;
+   text-decoration: inherit;
+}
+
 /* Plainlinks - this can be used to switch
  * off special external link styling */
 .plainlinks a.external {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If058843924c3b30c116df2520aef93a004d98a5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] wikimedia...process-control[master]: "disabled" flag

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343195 )

Change subject: "disabled" flag
..

"disabled" flag

Change-Id: I055c025544c8f194cd9cfe2d21d43efadb7b5c43
---
M README.md
M crontab.py
M job_wrapper.py
A tests/data/disabled.yaml
A tests/data/scheduled/disabled.yaml
M tests/test_crontab.py
6 files changed, 28 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/95/343195/1

diff --git a/README.md b/README.md
index 9fa2527..d1653ec 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,14 @@
 
 command: /usr/local/bin/timecard --start 9:00 --end 5:30
 
+# Optional schedule, in Vixie cron format:
+# minute hour day-of-month month day-of-week
+schedule: */5 * * * *
+
+# Optional flag to prevent scheduled job execution.  The job
+# can still be run as a single-shot.
+disabled: true
+
 # Optional timeout in seconds, after which your job will be
 # aborted.  Defaults to 10 minutes, JobWrapper.DEFAULT_TIMEOUT
 timeout: 30
@@ -52,3 +60,5 @@
 * Script to kill jobs.
 * Script to run a job one-off.
 * Job group tags.
+* Slow-start and monitoring.
+* Optional backoff.
diff --git a/crontab.py b/crontab.py
index 0f1d399..90e8908 100644
--- a/crontab.py
+++ b/crontab.py
@@ -34,7 +34,7 @@
 class JobCrontab(object):
 def __init__(self, job=None):
 self.job = job
-if "schedule" in job.config:
+if "schedule" in job.config and job.enabled:
 self.enabled = True
 else:
 self.enabled = False
diff --git a/job_wrapper.py b/job_wrapper.py
index e07de16..4813b3a 100644
--- a/job_wrapper.py
+++ b/job_wrapper.py
@@ -27,9 +27,15 @@
 else:
 self.timeout = DEFAULT_TIMEOUT
 
-def run(self):
-# if "disabled" in self.config and self.config["disabled"] in ["1", 
"true"]:
+if "disabled" in self.config and self.config["disabled"] is True:
+self.enabled = False
+else:
+self.enabled = True
 
+if "schedule" not in self.config:
+self.enabled = False
+
+def run(self):
 lock.begin(job_tag=self.name)
 
 command = shlex.split(self.config["command"])
diff --git a/tests/data/disabled.yaml b/tests/data/disabled.yaml
new file mode 100644
index 000..c9baf66
--- /dev/null
+++ b/tests/data/disabled.yaml
@@ -0,0 +1,3 @@
+name: Disabled job
+command: /bin/true
+disabled: true
diff --git a/tests/data/scheduled/disabled.yaml 
b/tests/data/scheduled/disabled.yaml
new file mode 100644
index 000..46de851
--- /dev/null
+++ b/tests/data/scheduled/disabled.yaml
@@ -0,0 +1,4 @@
+name: No cron
+command: /bin/true
+disabled: true
+schedule: "* * * * *"
diff --git a/tests/test_crontab.py b/tests/test_crontab.py
index a3178be..c0503ad 100644
--- a/tests/test_crontab.py
+++ b/tests/test_crontab.py
@@ -11,7 +11,8 @@
 tab = tab.replace(test_conf_dir, "X")
 tab = tab.replace(crontab.RUNNER_PATH, "Y")
 
-expected = """# Generated from X/schedule_2.yaml
+expected = """# Skipping disabled job X/disabled.yaml
+# Generated from X/schedule_2.yaml
 */10 * * * * jenkins Y X/schedule_2.yaml
 # Generated from X/schedule_good.yaml
 */5 * * * * jenkins Y X/schedule_good.yaml

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I055c025544c8f194cd9cfe2d21d43efadb7b5c43
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow up ec559041: abort notices display early if no notices

2017-03-16 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343194 )

Change subject: Follow up ec559041: abort notices display early if no notices
..

Follow up ec559041: abort notices display early if no notices

This avoids attempting to toggle after a destroy call has been made.

Change-Id: Ia756ff6436ec0590639dbbff216cdaf684ec
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 799fd68..7759cf9 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -75,6 +75,7 @@
 
if ( !count ) {
this.destroy();
+   return;
}
 
this.popup.setLabel( ve.msg(

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Follow-up 4a892c8fb: also apply maybebadfaith hack in queryC...

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343185 )

Change subject: Follow-up 4a892c8fb: also apply maybebadfaith hack in 
queryCallable
..


Follow-up 4a892c8fb: also apply maybebadfaith hack in queryCallable

Bug: T160493
Change-Id: I1700a177fa8b8c8856561fd60b20c83f3b7daf34
---
M includes/Hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index 14149ce..55178f9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -239,6 +239,10 @@
'isFullCoverage' => false,
'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables, &$fields,
&$conds, &$query_options, 
&$join_conds, $selectedValues ) {
+   // HACK account for maybebadfaith 
rename hack
+   array_walk( $selectedValues, function ( 
&$v ) {
+   $v = $v === 'maybebadfaith' ? 
'maybebad' : $v;
+   } );
$condition = self::buildRangeFilter( 
'goodfaith', $selectedValues );
if ( $condition ) {
$conds[] = $condition;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1700a177fa8b8c8856561fd60b20c83f3b7daf34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add support for PHP7 random_bytes in favor of mcrypt_create_iv

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324897 )

Change subject: Add support for PHP7 random_bytes in favor of mcrypt_create_iv
..


Add support for PHP7 random_bytes in favor of mcrypt_create_iv

Bug: T143788
Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
---
M includes/libs/CryptRand.php
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php
index 10088f2..0d3613a 100644
--- a/includes/libs/CryptRand.php
+++ b/includes/libs/CryptRand.php
@@ -243,6 +243,21 @@
}
 
if ( strlen( $buffer ) < $bytes ) {
+   // If available make use of PHP 7's random_bytes
+   // On Linux, getrandom syscall will be used if 
available.
+   // On Windows CryptGenRandom will always be used
+   // On other platforms, /dev/urandom will be used.
+   // All error situations will throw Exceptions and or 
Errors
+   if ( function_exists( 'random_bytes' ) ) {
+   $rem = $bytes - strlen( $buffer );
+   $buffer .= random_bytes( $rem );
+   }
+   if ( strlen( $buffer ) >= $bytes ) {
+   $this->strong = true;
+   }
+   }
+
+   if ( strlen( $buffer ) < $bytes ) {
// If available make use of mcrypt_create_iv URANDOM 
source to generate randomness
// On unix-like systems this reads from /dev/urandom 
but does it without any buffering
// and bypasses openbasedir restrictions, so it's 
preferable to reading directly

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib49eab7983a82966d167f03761e32461f9b9f602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Follow-up 4a892c8fb: also apply maybebadfaith hack in queryC...

2017-03-16 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343185 )

Change subject: Follow-up 4a892c8fb: also apply maybebadfaith hack in 
queryCallable
..

Follow-up 4a892c8fb: also apply maybebadfaith hack in queryCallable

Bug: T160493
Change-Id: I1700a177fa8b8c8856561fd60b20c83f3b7daf34
---
M includes/Hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 14149ce..55178f9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -239,6 +239,10 @@
'isFullCoverage' => false,
'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables, &$fields,
&$conds, &$query_options, 
&$join_conds, $selectedValues ) {
+   // HACK account for maybebadfaith 
rename hack
+   array_walk( $selectedValues, function ( 
&$v ) {
+   $v = $v === 'maybebadfaith' ? 
'maybebad' : $v;
+   } );
$condition = self::buildRangeFilter( 
'goodfaith', $selectedValues );
if ( $condition ) {
$conds[] = $condition;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update treeDiffer.js library

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343136 )

Change subject: Update treeDiffer.js library
..


Update treeDiffer.js library

https://github.com/Tchanders/treeDiffer.js/commit/c0aa2c6

Change-Id: I9ce8148512b06004ca87d5749a5f165d731559a3
---
M lib/treeDiffer/treeDiffer-dist.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/lib/treeDiffer/treeDiffer-dist.js 
b/lib/treeDiffer/treeDiffer-dist.js
index 4240dcd..0333ed3 100644
--- a/lib/treeDiffer/treeDiffer-dist.js
+++ b/lib/treeDiffer/treeDiffer-dist.js
@@ -173,6 +173,10 @@
  * Released under the MIT license
  */
 
+// eslint-disable dot-notation
+// We use [ 'null' ] as an index, but for consistencty with
+// variable indicies [ i ][ j ] we prefer not to use dot notation
+
 /**
  * Differ
  *
@@ -462,7 +466,7 @@
remove.sort( function ( a, b ) { return a - b; } );
insert.sort( function ( a, b ) { return a - b; } );
 
-   for ( i = 0, j = 0; i < ilen, j < jlen; i++, j++ ) {
+   for ( i = 0, j = 0; i < ilen && j < jlen; i++, j++ ) {
if ( i === remove[ 0 ] ) {
// Old node is a remove
remove.shift();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ce8148512b06004ca87d5749a5f165d731559a3
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCfilters UI: Change mute display for included filters

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343137 )

Change subject: RCfilters UI: Change mute display for included filters
..


RCfilters UI: Change mute display for included filters

Bug: T156861
Bug: T149452
Change-Id: I64d84f0d84ff5e79da34f4897670102625c667cc
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
index 4ea284b..7e6d776 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
@@ -136,12 +136,13 @@
this.$element.toggleClass(
'mw-rcfilters-ui-filterItemWidget-muted',
this.model.isConflicted() ||
-   this.model.isIncluded() ||
(
// Item is also muted when any of the items in 
its group is active
this.model.getGroupModel().isActive() &&
// But it isn't selected
-   !this.model.isSelected()
+   !this.model.isSelected() &&
+   // And also not included
+   !this.model.isIncluded()
)
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64d84f0d84ff5e79da34f4897670102625c667cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Rough pass at crontab tweezer

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343171 )

Change subject: Rough pass at crontab tweezer
..

Rough pass at crontab tweezer

Change-Id: I200787ae2f86e3caacbc02db0f674f3c08755533
---
M README.md
A cron-generate
A crontab.py
M job_wrapper.py
A tests/data/scheduled/schedule_2.yaml
A tests/data/scheduled/schedule_good.yaml
A tests/data/scheduled/unscheduled.yaml
A tests/test_crontab.py
M tests/test_lock.py
9 files changed, 116 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/71/343171/1

diff --git a/README.md b/README.md
index c5300d6..9fa2527 100644
--- a/README.md
+++ b/README.md
@@ -48,3 +48,7 @@
 * Prevent future job runs when unrecoverable failure conditions are detected.
 * Should we support commandline flags?
 * Fine-tuning of failure detection.
+* Script to tweeze crontab.
+* Script to kill jobs.
+* Script to run a job one-off.
+* Job group tags.
diff --git a/cron-generate b/cron-generate
new file mode 100755
index 000..6b093aa
--- /dev/null
+++ b/cron-generate
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+import sys
+
+import crontab
+import job_wrapper
+
+
+def usage():
+   print("Must give a job description directory as the only argument.")
+
+
+if __name__ == "__main__":
+# TODO: Parse CLI args.
+
+   if len(sys.argv) != 2:
+   usage()
+   sys.exit(-1)
+
+   config_dir = sys.argv[1]
+
+   print(crontab.make_cron(config_dir))
diff --git a/crontab.py b/crontab.py
new file mode 100644
index 000..0f1d399
--- /dev/null
+++ b/crontab.py
@@ -0,0 +1,56 @@
+import glob
+import os.path
+
+import job_wrapper
+
+
+# FIXME: global config
+DEFAULT_USER = "jenkins"
+
+CRON_TEMPLATE = """# Generated from {source}
+{schedule} {user} {command}
+"""
+
+RUNNER_PATH = os.path.dirname(__file__) + "/crash-override"
+
+
+def make_cron(config_dir):
+'''
+Read all files from the dir and output a crontab.
+'''
+out = ""
+
+config_files = glob.glob(config_dir + "/*.yaml")
+
+for config_path in config_files:
+job = job_wrapper.JobWrapper(config_path=config_path)
+tab = JobCrontab(job)
+
+out += str(tab)
+
+return out
+
+
+class JobCrontab(object):
+def __init__(self, job=None):
+self.job = job
+if "schedule" in job.config:
+self.enabled = True
+else:
+self.enabled = False
+
+def __str__(self):
+if not self.enabled:
+return "# Skipping disabled job 
{path}\n".format(path=self.job.config_path)
+
+command = "{runner} {conf}".format(
+runner=RUNNER_PATH,
+conf=self.job.config_path)
+
+out = CRON_TEMPLATE.format(
+source=self.job.config_path,
+schedule=self.job.config["schedule"],
+user=DEFAULT_USER,
+command=command)
+
+return out
diff --git a/job_wrapper.py b/job_wrapper.py
index 9ae8512..e07de16 100644
--- a/job_wrapper.py
+++ b/job_wrapper.py
@@ -8,12 +8,14 @@
 
 import lock
 
+
 # TODO: Global config.
 DEFAULT_TIMEOUT = 600
 
 
 class JobWrapper(object):
 def __init__(self, config_path=None):
+self.config_path = config_path
 self.config = yaml.safe_load(open(config_path, "r"))
 self.validate_config()
 
@@ -26,6 +28,8 @@
 self.timeout = DEFAULT_TIMEOUT
 
 def run(self):
+# if "disabled" in self.config and self.config["disabled"] in ["1", 
"true"]:
+
 lock.begin(job_tag=self.name)
 
 command = shlex.split(self.config["command"])
diff --git a/tests/data/scheduled/schedule_2.yaml 
b/tests/data/scheduled/schedule_2.yaml
new file mode 100644
index 000..8d95ded
--- /dev/null
+++ b/tests/data/scheduled/schedule_2.yaml
@@ -0,0 +1,3 @@
+name: Another cronjob
+command: /bin/true
+schedule: "*/10 * * * *"
diff --git a/tests/data/scheduled/schedule_good.yaml 
b/tests/data/scheduled/schedule_good.yaml
new file mode 100644
index 000..5f4476e
--- /dev/null
+++ b/tests/data/scheduled/schedule_good.yaml
@@ -0,0 +1,3 @@
+name: Valid cron
+command: /bin/true
+schedule: "*/5 * * * *"
diff --git a/tests/data/scheduled/unscheduled.yaml 
b/tests/data/scheduled/unscheduled.yaml
new file mode 100644
index 000..7d8caa5
--- /dev/null
+++ b/tests/data/scheduled/unscheduled.yaml
@@ -0,0 +1,2 @@
+name: No cron
+command: /bin/true
diff --git a/tests/test_crontab.py b/tests/test_crontab.py
new file mode 100644
index 000..a3178be
--- /dev/null
+++ b/tests/test_crontab.py
@@ -0,0 +1,21 @@
+import os.path
+
+import crontab
+
+
+def test_crontab():
+test_conf_dir = os.path.dirname(__file__) + "/data/scheduled"
+tab = crontab.make_cron(test_conf_dir)
+
+# Strip regional variations.
+tab = tab.replace(test_conf_dir, "X")
+tab = tab.replace(crontab.RUNNER_PATH, "Y")
+
+expected = """# Generated from 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: microsites: convert to profile/role-structure

2017-03-16 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342164 )

Change subject: microsites: convert to profile/role-structure
..


microsites: convert to profile/role-structure

These are the roles for misc. static websites
used on bromine, a ganeti VM with Apache.

Convert code to profile/role-structure and
follow the new Puppet coding style on

https://wikitech.wikimedia.org/wiki/Puppet_coding#Profiles

Change-Id: Id29e32021e41fbff4ac6e3dfe7618a3d09fde720
---
R hieradata/role/common/webserver_misc_static.yaml
M manifests/site.pp
R modules/profile/manifests/microsites/annualreport.pp
R modules/profile/manifests/microsites/endowment.pp
R modules/profile/manifests/microsites/releases.pp
R modules/profile/manifests/microsites/static_bugzilla.pp
R modules/profile/manifests/microsites/transparency.pp
A modules/role/manifests/webserver_misc_static.pp
8 files changed, 35 insertions(+), 24 deletions(-)

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



diff --git a/hieradata/role/common/microsites/releases.yaml 
b/hieradata/role/common/webserver_misc_static.yaml
similarity index 100%
rename from hieradata/role/common/microsites/releases.yaml
rename to hieradata/role/common/webserver_misc_static.yaml
diff --git a/manifests/site.pp b/manifests/site.pp
index 7fedd93..91436fa 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -191,11 +191,9 @@
 include ::standard
 }
 
-# virtual machine for static misc. services
+# VM with webserver for misc. static sites
 node 'bromine.eqiad.wmnet' {
-role(bugzilla::static, microsites::annualreport, microsites::transparency,
-microsites::releases, microsites::endowment)
-include ::standard
+role('webserver_misc_static')
 }
 
 # Californium hosts openstack-dashboard AKA horizon
diff --git a/modules/role/manifests/microsites/annualreport.pp 
b/modules/profile/manifests/microsites/annualreport.pp
similarity index 90%
rename from modules/role/manifests/microsites/annualreport.pp
rename to modules/profile/manifests/microsites/annualreport.pp
index 93a43e5..02501bd 100644
--- a/modules/role/manifests/microsites/annualreport.pp
+++ b/modules/profile/manifests/microsites/annualreport.pp
@@ -1,11 +1,12 @@
 # https://annual.wikimedia.org/
 # microsite for the WMF annual report
 # http://wikimediafoundation.org/wiki/Annual_Report
-class role::microsites::annualreport {
+class profile::microsites::annualreport {
 
 system::role { 'role::microsites::annualreport': description => 'WMF 
Annual report server - annual.wikimedia.org' }
 
 include ::annualreport
+
 include ::base::firewall
 
 ferm::service { 'annualreport_http':
diff --git a/modules/role/manifests/microsites/endowment.pp 
b/modules/profile/manifests/microsites/endowment.pp
similarity index 88%
rename from modules/role/manifests/microsites/endowment.pp
rename to modules/profile/manifests/microsites/endowment.pp
index 5f1de03..f160ebd 100644
--- a/modules/role/manifests/microsites/endowment.pp
+++ b/modules/profile/manifests/microsites/endowment.pp
@@ -1,10 +1,11 @@
 # https://endowment.wikimedia.org/
 # https://meta.wikimedia.org/wiki/Endowment
-class role::microsites::endowment {
+class profile::microsites::endowment {
 
 system::role { 'role::microsites::endowment': description => 
'endowment.wikimedia.org' }
 
 include ::endowment
+
 include ::base::firewall
 
 ferm::service { 'endowment_http':
diff --git a/modules/role/manifests/microsites/releases.pp 
b/modules/profile/manifests/microsites/releases.pp
similarity index 94%
rename from modules/role/manifests/microsites/releases.pp
rename to modules/profile/manifests/microsites/releases.pp
index 1de4aec..0d78ca6 100644
--- a/modules/role/manifests/microsites/releases.pp
+++ b/modules/profile/manifests/microsites/releases.pp
@@ -1,4 +1,4 @@
-class role::microsites::releases {
+class profile::microsites::releases {
 system::role { 'releases': description => 'Releases webserver' }
 
 include ::base::firewall
diff --git a/modules/role/manifests/bugzilla/static.pp 
b/modules/profile/manifests/microsites/static_bugzilla.pp
similarity index 85%
rename from modules/role/manifests/bugzilla/static.pp
rename to modules/profile/manifests/microsites/static_bugzilla.pp
index c09cf96..0de6ffd 100644
--- a/modules/role/manifests/bugzilla/static.pp
+++ b/modules/profile/manifests/microsites/static_bugzilla.pp
@@ -1,9 +1,11 @@
-# manifests/role/bugzilla.pp
-# role for a Bugzilla server
-class role::bugzilla::static {
+# static HTML archive of old Bugzilla tickets
+class profile::microsites::static_bugzilla {
+
+system::role { 'role::bugzilla_static': description => 'Static HTML 
Bugzilla server' }
+
+include ::bugzilla_static
 
 include ::base::firewall
-system::role { 'role::bugzilla_static': description => 'Static HTML 
Bugzilla server' }
 
 ferm::service { 'bugzilla_static_http':

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCfilters UI: Change mute display for included filters

2017-03-16 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343137 )

Change subject: RCfilters UI: Change mute display for included filters
..

RCfilters UI: Change mute display for included filters

Bug: T156861
Bug: T149452
Change-Id: I64d84f0d84ff5e79da34f4897670102625c667cc
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/343137/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
index 4ea284b..7e6d776 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
@@ -136,12 +136,13 @@
this.$element.toggleClass(
'mw-rcfilters-ui-filterItemWidget-muted',
this.model.isConflicted() ||
-   this.model.isIncluded() ||
(
// Item is also muted when any of the items in 
its group is active
this.model.getGroupModel().isActive() &&
// But it isn't selected
-   !this.model.isSelected()
+   !this.model.isSelected() &&
+   // And also not included
+   !this.model.isIncluded()
)
);
 

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update treeDiffer.js library

2017-03-16 Thread Tchanders (Code Review)
Tchanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343136 )

Change subject: Update treeDiffer.js library
..

Update treeDiffer.js library

https://github.com/Tchanders/treeDiffer.js/commit/c0aa2c6

Change-Id: I9ce8148512b06004ca87d5749a5f165d731559a3
---
M lib/treeDiffer/treeDiffer-dist.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/36/343136/1

diff --git a/lib/treeDiffer/treeDiffer-dist.js 
b/lib/treeDiffer/treeDiffer-dist.js
index 4240dcd..0333ed3 100644
--- a/lib/treeDiffer/treeDiffer-dist.js
+++ b/lib/treeDiffer/treeDiffer-dist.js
@@ -173,6 +173,10 @@
  * Released under the MIT license
  */
 
+// eslint-disable dot-notation
+// We use [ 'null' ] as an index, but for consistencty with
+// variable indicies [ i ][ j ] we prefer not to use dot notation
+
 /**
  * Differ
  *
@@ -462,7 +466,7 @@
remove.sort( function ( a, b ) { return a - b; } );
insert.sort( function ( a, b ) { return a - b; } );
 
-   for ( i = 0, j = 0; i < ilen, j < jlen; i++, j++ ) {
+   for ( i = 0, j = 0; i < ilen && j < jlen; i++, j++ ) {
if ( i === remove[ 0 ] ) {
// Old node is a remove
remove.shift();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ce8148512b06004ca87d5749a5f165d731559a3
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: [WIP] Describe group changes for references and references l...

2017-03-16 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343134 )

Change subject: [WIP] Describe group changes for references and references lists
..

[WIP] Describe group changes for references and references lists

Bug: T160589
Change-Id: Ifccafdf08704f67027dae2703ff2ded809fb6ab7
---
M modules/ve-cite/i18n/en.json
M modules/ve-cite/i18n/qqq.json
M modules/ve-cite/ve.dm.MWReferenceNode.js
M modules/ve-cite/ve.dm.MWReferencesListNode.js
4 files changed, 43 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-cite/i18n/en.json b/modules/ve-cite/i18n/en.json
index f3a57bd..6e6f7ae 100644
--- a/modules/ve-cite/i18n/en.json
+++ b/modules/ve-cite/i18n/en.json
@@ -22,6 +22,12 @@
"visualeditor-cite-tool-name-news": "News",
"visualeditor-cite-tool-name-web": "Website",
"cite-tool-definition.json": "null",
+   "cite-ve-changedesc-ref-group-both": "Reference group changed from 
\"$1\" to \"$2\"",
+   "cite-ve-changedesc-ref-group-from": "Reference group changed from 
\"$1\" to the general group",
+   "cite-ve-changedesc-ref-group-to": "Reference group changed from the 
general group to \"$1\"",
+   "cite-ve-changedesc-reflist-group-both": "References list group changed 
from \"$1\" to \"$2\"",
+   "cite-ve-changedesc-reflist-group-from": "References list group changed 
from \"$1\" to the general group",
+   "cite-ve-changedesc-reflist-group-to": "References list group changed 
from the general group to \"$1\"",
"cite-ve-dialog-reference-editing-reused": "This reference is used $1 
{{PLURAL:$1|times}} on this page.",
"cite-ve-dialog-reference-options-group-label": "Use this group",
"cite-ve-dialog-reference-options-group-placeholder": "General 
references",
@@ -46,4 +52,4 @@
"cite-ve-referenceslist-missingref": "This reference is defined in a 
template or other generated block, and for now can only be edited in source 
mode.",
"cite-ve-toolbar-group-label": "Cite",
"cite-ve-othergroup-item": "$1 reference"
-}
\ No newline at end of file
+}
diff --git a/modules/ve-cite/i18n/qqq.json b/modules/ve-cite/i18n/qqq.json
index 59efd59..ae99ba8 100644
--- a/modules/ve-cite/i18n/qqq.json
+++ b/modules/ve-cite/i18n/qqq.json
@@ -33,6 +33,12 @@
"visualeditor-cite-tool-name-news": "Title of tool that inserts a 
citation for a news.\n{{Identical|News}}",
"visualeditor-cite-tool-name-web": "Title of tool that inserts a 
citation for a website.\n{{Identical|Website}}",
"cite-tool-definition.json": "{{ignored}}\nJSON list of objects 
detailing each citation with name (key referring to a 
visualeditor-cite-tool-name-x message), icon ('ref-cite-book', 
'ref-cite-journal', 'ref-cite-news', 'ref-cite-web'), and template 
name\n{{Identical|Null}}",
+   "cite-ve-changedesc-ref-group-both": "Description of a reference 
changing group\n\nParameters:\n* $1 – the name of the group it was before\n* $2 
– the name of the group it is now",
+   "cite-ve-changedesc-ref-group-from": "Description of a reference 
changing group to the general group\n\nParameters:\n* $1 – the name of the 
group it was before",
+   "cite-ve-changedesc-ref-group-to": "Description of a reference changing 
group from the general group\n\nParameters:\n* $1 – the name of the group it is 
now",
+   "cite-ve-changedesc-reflist-group-both": "Description of a references 
list changing group\n\nParameters:\n* $1 – the name of the group it was 
before\n* $2 – the name of the group it is now",
+   "cite-ve-changedesc-reflist-group-from": "Description of a references 
list changing group to the general group\n\nParameters:\n* $1 – the name of the 
group it was before",
+   "cite-ve-changedesc-reflist-group-to": "Description of a references 
list changing group from the general group\n\nParameters:\n* $1 – the name of 
the group it is now",
"cite-ve-dialog-reference-editing-reused": "Text shown at the top of 
the reference dialog when editing a reference that is used multiple 
times.\n\nParameters:\n* $1 - Number of times used. This is always greater than 
1.",
"cite-ve-dialog-reference-options-group-label": "Label for the 
reference group input",
"cite-ve-dialog-reference-options-group-placeholder": "Placeholder for 
the reference group input",
diff --git a/modules/ve-cite/ve.dm.MWReferenceNode.js 
b/modules/ve-cite/ve.dm.MWReferenceNode.js
index 950390e..551841a 100644
--- a/modules/ve-cite/ve.dm.MWReferenceNode.js
+++ b/modules/ve-cite/ve.dm.MWReferenceNode.js
@@ -306,6 +306,21 @@
return clone;
 };
 
+ve.dm.MWReferenceNode.static.describeChange = function ( key, change ) {
+   if ( key === 'refGroup' ) {
+   if ( change.from ) {
+   if ( change.to ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update to support php 7.1

2017-03-16 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343133 )

Change subject: Update to support php 7.1
..

Update to support php 7.1

Use  random_bytes() over mcrypt_create_iv()  if you use php 7.0+

Bug: T143788
Change-Id: I095455975587e636005857a1f492fe02bab5619d
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/343133/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: VisualDiff: Add custom messages for change descriptions

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342949 )

Change subject: VisualDiff: Add custom messages for change descriptions
..


VisualDiff: Add custom messages for change descriptions

Bug: T151403
Change-Id: I469a3c7897f2417c1850364f65da51c0deca2386
---
M extension.json
M modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
M modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
M modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js
M modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
8 files changed, 96 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index fc0df1c..6985359 100644
--- a/extension.json
+++ b/extension.json
@@ -1323,7 +1323,7 @@
"ext.visualEditor.mwtransclusion",
"ext.visualEditor.mwgallery",
"ext.visualEditor.mwalienextension",
-   "ext.visualEditor.diffing",
+   "ext.visualEditor.mwdiffing",
"ext.visualEditor.language",
"ext.visualEditor.icons"
],
@@ -1756,6 +1756,18 @@
"mobile"
]
},
+   "ext.visualEditor.mwdiffing": {
+   "dependencies": [
+   "ext.visualEditor.diffing"
+   ],
+   "messages": [
+   "visualeditor-changedesc-mwtransclusion"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
"ext.visualEditor.diffing": {
"debugScripts": [
"lib/ve/src/ve.DiffTreeNode.js",
diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
index 5790ea2..8c2fc69 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
@@ -64,6 +64,13 @@
return domElements;
 };
 
+ve.dm.MWExternalLinkAnnotation.static.describeChange = function ( key, change 
) {
+   if ( key === 'href' ) {
+   return ve.msg( 'visualeditor-changedesc-link-href', 
change.from, change.to );
+   }
+   return null;
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
index e364816..90a7021 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
@@ -193,6 +193,13 @@
return title.getPrefixedText();
 };
 
+ve.dm.MWInternalLinkAnnotation.static.describeChange = function ( key, change 
) {
+   if ( key === 'title' ) {
+   return ve.msg( 'visualeditor-changedesc-link-href', 
change.from, change.to );
+   }
+   return null;
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js
index 395c671..b8b28ff 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWExtensionNode.js
@@ -141,6 +141,19 @@
return this.extensionName;
 };
 
+ve.dm.MWExtensionNode.static.describeChanges = function ( attributeChanges, 
change, element ) {
+   // HACK: Try to generate an ' has changed' message using 
associated tool's title
+   // Extensions should provide more detailed change descriptions
+   var tools = ve.ui.toolFactory.getRelatedItems( [ 
ve.dm.nodeFactory.createFromElement( element ) ] );
+   if ( tools.length ) {
+   return [ ve.msg( 'visualeditor-changedesc-unknown',
+   OO.ui.resolveMsg( ve.ui.toolFactory.lookup( tools[ 0 
].name ).static.title )
+   ) ];
+   }
+   // Parent method
+   ve.dm.MWExtensionNode.super.static.describeChange.apply( this, 
arguments );
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
index 31fc0a2..1314bde 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
@@ -60,6 +60,55 @@
};
 };
 
+ve.dm.MWImageNode.static.describeChanges = function ( attributeChanges, 
attributes ) {
+   var key, sizeFrom, sizeTo, change,
+   customKeys = [ 'width', 'height', 

[MediaWiki-commits] [Gerrit] integration/config[master]: Run tox for new repo

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343113 )

Change subject: Run tox for new repo
..


Run tox for new repo

Change-Id: Iaa04f8cf6bc6dac0c9efc3109b3badea938d2fa8
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 8e4a35d..d0edef9 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2420,6 +2420,10 @@
   # Depends on node-syslog@1.1.7 which does not work on Node 4.3
   - name: npm-node-0.10
 
+  - name: wikimedia/fundraising/process-control
+template:
+  - name: tox-jessie
+
   - name: wikimedia/fundraising/stats
 gate-and-submit:
   - noop

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa04f8cf6bc6dac0c9efc3109b3badea938d2fa8
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Rework conflicts to be objects in filter or gr...

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342284 )

Change subject: RCFilters UI: Rework conflicts to be objects in filter or group 
context
..


RCFilters UI: Rework conflicts to be objects in filter or group context

Allow conflicts to be defined in either the filter or the group context
and represent a whole object rather than an array of filter names.

Bug: T160453
Bug: T152754
Bug: T156427
Change-Id: I2423eb2618aa64bf30395b1a1912589e0c71f283
---
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js
5 files changed, 295 insertions(+), 65 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
index 14a610b..22323e8 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -13,6 +13,7 @@
 * @cfg {string} [separator='|'] Value separator for 'string_options' 
groups
 * @cfg {boolean} [active] Group is active
 * @cfg {boolean} [fullCoverage] This filters in this group 
collectively cover all results
+* @cfg {Object} [conflicts] Defines the conflicts for this filter group
 */
mw.rcfilters.dm.FilterGroup = function MwRcfiltersDmFilterGroup( name, 
config ) {
config = config || {};
@@ -28,6 +29,8 @@
 
this.active = !!config.active;
this.fullCoverage = !!config.fullCoverage;
+
+   this.conflicts = config.conflicts || {};
 
this.aggregate( { update: 'filterItemUpdate' } );
this.connect( this, { filterItemUpdate: 'onFilterItemUpdate' } 
);
@@ -82,6 +85,54 @@
};
 
/**
+* Get the conflicts associated with the entire group.
+* Conflict object is set up by filter name keys and conflict
+* definition. For example:
+* [
+*  {
+*  filterName: {
+*  filter: filterName,
+*  group: group1
+*  }
+*  },
+*  {
+*  filterName2: {
+*  filter: filterName2,
+*  group: group2
+*  }
+*  }
+* ]
+* @return {Object} Conflict definition
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.getConflicts = function () {
+   return this.conflicts;
+   };
+
+   /**
+* Set conflicts for this group. See #getConflicts for the expected
+* structure of the definition.
+*
+* @param {Object} conflicts Conflicts for this group
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.setConflicts = function ( 
conflicts ) {
+   this.conflicts = conflicts;
+   };
+
+   /**
+* Check whether this item has a potential conflict with the given item
+*
+* This checks whether the given item is in the list of conflicts of
+* the current item, but makes no judgment about whether the conflict
+* is currently at play (either one of the items may not be selected)
+*
+* @param {mw.rcfilters.dm.FilterItem} filterItem Filter item
+* @return {boolean} This item has a conflict with the given item
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.existsInConflicts = function ( 
filterItem ) {
+   return Object.prototype.hasOwnProperty.call( 
this.getConflicts(), filterItem.getName() );
+   };
+
+   /**
 * Check whether there are any items selected
 *
 * @return {boolean} Any items in the group are selected
@@ -126,9 +177,15 @@
mw.rcfilters.dm.FilterGroup.prototype.areAllSelectedInConflictWith = 
function ( filterItem ) {
var selectedItems = this.getSelectedItems( filterItem );
 
-   return selectedItems.length > 0 && selectedItems.every( 
function ( selectedFilter ) {
-   return selectedFilter.existsInConflicts( filterItem );
-   } );
+   return selectedItems.length > 0 &&
+   (
+   // The group as a whole is in conflict with 
this item
+   this.existsInConflicts( filterItem ) ||
+   

[MediaWiki-commits] [Gerrit] wikimedia...process-control[debian-packaging]: [WIP] Debian packaging

2017-03-16 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343129 )

Change subject: [WIP] Debian packaging
..

[WIP] Debian packaging

Change-Id: Ib4a8481ecc40e72e39c4670bad93786505f8d0d1
TODO: Making empty packages at the moment.  copy README.
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/rules
A debian/source/format
A debian/upstream/metadata
7 files changed, 48 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/29/343129/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..46b6d21
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-process-control (0.0.1~rc1-1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Adam Roses Wight   Thu, 16 Mar 2017 00:12:17 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..767c468
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: python-process-control
+Maintainer: Adam Roses Wight 
+Section: admin
+Priority: optional
+Build-Depends: debhelper (>= 9), python-all, python-setuptools, python3-all, 
python3-setuptools
+Standards-Version: 3.9.8
+Homepage: https://github.com/adamwight/process-control
+Vcs-Browser: https://github.com/adamwight/process-control
+Vcs-Git: git://github.com/adamwight/process-control.git
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
+
+Package: python-process-control
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Tools for Wikimedia Foundation Fundraising job management
+ Control and schedule jobs using configuration files.
+
+Package: python3-process-control
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Tools for Wikimedia Foundation Fundraising job management
+ Control and schedule jobs using configuration files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..ebd8e4d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://github.com/adamwight/process-control
+
+Files: *.py *.md *.yaml debian/* .gitignore
+Copyright: 2017, Adam Roses Wight 
+License: GPL-2
+ /usr/share/common-licenses/GPL-2
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..5b2ea99
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+export PYBUILD_TEST_PLUGIN = nose
+
+%:
+   dh $@ --with python2,python3
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 000..2922586
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+Bug-Database: https://github.com/adamwight/process-control/issues
+Bug-Submit: https://github.com/adamwight/process-control/issues/new
+Contact: Adam Roses Wight 
+Repository: git://github.com/adamwight/process-control.git
+Repository-Browse: https://github.com/adamwight/process-control

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4a8481ecc40e72e39c4670bad93786505f8d0d1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: debian-packaging
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Introduce visual differ in the save dialog

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/338101 )

Change subject: Introduce visual differ in the save dialog
..


Introduce visual differ in the save dialog

Bug: T143350
Change-Id: I1297d0f4bb87e69be3b50220c1830a22dac1bbae
---
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMobileSaveDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
A modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css
M modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css
8 files changed, 173 insertions(+), 15 deletions(-)

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



diff --git a/extension.json b/extension.json
index cc5b54b..fc0df1c 100644
--- a/extension.json
+++ b/extension.json
@@ -403,7 +403,8 @@

"modules/ve-mw/ui/tools/ve.ui.MWMobileLinkInspectorTool.js"
],
"styles": [
-   
"modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css"
+   
"modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css",
+   
"modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css"
],
"dependencies": [
"ext.visualEditor.base",
@@ -513,7 +514,8 @@
"ext.visualEditor.mediawiki",
"ext.visualEditor.core",
"ext.visualEditor.mwcore",
-   "ext.visualEditor.mwextensions"
+   "ext.visualEditor.mwextensions",
+   "oojs-ui.styles.icons-alerts"
],
"messages": [
"accesskey-diff",
@@ -1283,6 +1285,9 @@
"visualeditor-savedialog-label-review-good",
"visualeditor-savedialog-label-save-short",
"visualeditor-savedialog-label-warning",
+   "visualeditor-savedialog-review-nosummary",
+   "visualeditor-savedialog-review-visual",
+   "visualeditor-savedialog-review-wikitext",
"visualeditor-savedialog-title-conflict",
"visualeditor-savedialog-title-nochanges",
"visualeditor-savedialog-title-preview",
@@ -1318,6 +1323,7 @@
"ext.visualEditor.mwtransclusion",
"ext.visualEditor.mwgallery",
"ext.visualEditor.mwalienextension",
+   "ext.visualEditor.diffing",
"ext.visualEditor.language",
"ext.visualEditor.icons"
],
@@ -1732,6 +1738,56 @@
"mobile"
]
},
+   "treeDiffer": {
+   "scripts": [
+   "lib/ve/lib/treeDiffer/treeDiffer-dist.js"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
+   "diffMatchPatch": {
+   "scripts": [
+   
"lib/ve/lib/diff-match-patch/diff_match_patch_uncompressed.js"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
+   "ext.visualEditor.diffing": {
+   "debugScripts": [
+   "lib/ve/src/ve.DiffTreeNode.js",
+   "lib/ve/src/ve.DiffMatchPatch.js",
+   "lib/ve/src/dm/ve.dm.VisualDiff.js",
+   "lib/ve/src/ui/elements/ve.ui.DiffElement.js",
+   
"lib/ve/src/ui/widgets/ve.ui.ChangeDescriptionsSelectWidget.js"
+   ],
+   "styles": [
+   
"lib/ve/src/ui/styles/elements/ve.ui.DiffElement.css"
+   ],
+   "dependencies": [
+   "ext.visualEditor.core",
+   "treeDiffer",
+   "diffMatchPatch"
+   ],
+   "messages": [
+   "visualeditor-changedesc-changed",
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: wdqs - remove unneeded puppet dependency

2017-03-16 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343128 )

Change subject: wdqs - remove unneeded puppet dependency
..

wdqs - remove unneeded puppet dependency

wdqs and wdqs::gui classes don't actually have any intrisic dependency

Change-Id: Iee2ba979882a03fd6644666bab031208a61c4735
---
M modules/role/manifests/wdqs.pp
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/role/manifests/wdqs.pp b/modules/role/manifests/wdqs.pp
index 64bd844..53e19ab 100644
--- a/modules/role/manifests/wdqs.pp
+++ b/modules/role/manifests/wdqs.pp
@@ -19,8 +19,6 @@
 }
 
 
-Class['::wdqs'] -> Class['::wdqs::gui']
-
 # Install services - both blazegraph and the updater
 include ::wdqs
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Popups doesnt need to depend on EventLogging

2017-03-16 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343127 )

Change subject: Popups doesnt need to depend on EventLogging
..

Popups doesnt need to depend on EventLogging

Use EventLoggingRegisterSchemas hook to register schema
This has the same effect as ResourceLoader but doesn't require the
hard dependency to EventLogging

When EventLogging is unavailable schema returns a interface which
is has a no operation log method to avoid exceptions being thrown
when attempts to log are made.

Bug: T158999
Change-Id: I7ed7f00d52279151ece23e5aced4f2adb0f7fdc3
---
M extension.json
M includes/PopupsHooks.php
M resources/dist/index.js
M resources/dist/index.js.map
M src/schema.js
M tests/node-qunit/schema.test.js
6 files changed, 56 insertions(+), 12 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ed7f00d52279151ece23e5aced4f2adb0f7fdc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
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] operations/puppet[production]: Enable (optional) Cassandra client encryption in RESTBase pr...

2017-03-16 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342898 )

Change subject: Enable (optional) Cassandra client encryption in RESTBase 
production
..


Enable (optional) Cassandra client encryption in RESTBase production

Bug: T13
Change-Id: I383dcba4d688c3b0934e45af122556d0d7115af1
---
M hieradata/role/common/cassandra.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/cassandra.yaml 
b/hieradata/role/common/cassandra.yaml
index 0cc9b2b..3af4531 100644
--- a/hieradata/role/common/cassandra.yaml
+++ b/hieradata/role/common/cassandra.yaml
@@ -157,3 +157,4 @@
 cassandra::trickle_fsync: false
 cassandra::extra_classpath:
 - 
/srv/deployment/cassandra/twcs/lib/cassandra-v2.2/TimeWindowCompactionStrategy-2.2.5.jar
+cassandra::client_encryption_enabled: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I383dcba4d688c3b0934e45af122556d0d7115af1
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] performance/docroot[master]: lib: Remove unused jquery.min.js

2017-03-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343098 )

Change subject: lib: Remove unused jquery.min.js
..


lib: Remove unused jquery.min.js

Not loaded anywhere. The only reference to jQuery (not this file specifically)
is in metricsgraphics.js, which, if enabled, can add nicer tipsy-style tooltips.
However that is an option for a feature of metricsgraphics.js we don't use.

Change-Id: Ided735570a91e7600d4ffe03f0e145b4b32f4749
---
D lib/jquery.min.js
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/lib/jquery.min.js b/lib/jquery.min.js
deleted file mode 100644
index 49990d6..000
--- a/lib/jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | 
jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof 
module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw
 new Error("jQuery requires a window with a document");return 
b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var 
c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return
 new 
n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return
 
b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return
 d.call(this)},get:function(a){return 
null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var 
b=n.merge(this.constructor(),a);return 
b.prevObject=this,b.context=this.context,b},each:function(a,b){return 
n.each(this,a,b)},map:function(a){return 
this.pushStack(n.map(this,function(b,c){return 
a.call(b,c,b)}))},slice:function(){return 
this.pushStack(d.apply(this,arguments))},first:function(){return 
this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var 
b=this.length,c=+a+(0>a?b:0);return 
this.pushStack(c>=0&>c?[this[c]]:[])},end:function(){return 
this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var
 
a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof
 g&&(j=g,g=arguments[h]||{},h++),"object"==typeof 
g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b
 in 
a)c=g[b],d=a[b],g!==d&&(j&&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&(c)?c:[]):f=c&(c)?c:{},g[b]=n.extend(j,f,d)):void
 0!==d&&(g[b]=d));return 
g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw
 new 
Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return
 
null!=a&===a.window},isNumeric:function(a){return!n.isArray(a)&(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var
 b;for(b in a)return!1;return!0},type:function(a){return 
null==a?a+"":"object"==typeof a||"function"==typeof 
a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var 
b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use 
strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return
 a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return 
a.nodeName&()===b.toLowerCase()},each:function(a,b,c){var
 
d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else
 for(e in a)if(d=b.apply(a[e],c),d===!1)break}else 
if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in 
a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return 
null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return 
null!=a&&(s(Object(a))?n.merge(c,"string"==typeof 
a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return 
null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var 
c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return 
a.length=e,a},grep:function(a,b,c){for(var 
d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&(a[f]);return 
e},map:function(a,b,c){var 
d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&(d);else
 for(f in a)d=b(a[f],f,c),null!=d&(d);return 
e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof 
b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return 
a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void
 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date 
RegExp Object Error".split(" "),function(a,b){h["[object 
"+b+"]"]=b.toLowerCase()});function s(a){var b="length"in 

  1   2   3   4   >