[MediaWiki-commits] [Gerrit] Add notifications for summary changes - change (mediawiki...Flow)

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

Change subject: Add notifications for summary changes
..


Add notifications for summary changes

Bug: T125119
Change-Id: I627bd79abeb453491039292cf57d6b51451c659f
---
M autoload.php
M i18n/en.json
M i18n/qqq.json
M includes/Notifications/Controller.php
M includes/Notifications/Notifications.php
A includes/Notifications/SummaryEditedPresentationModel.php
6 files changed, 157 insertions(+), 2 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 70a88ee..29188d1 100644
--- a/autoload.php
+++ b/autoload.php
@@ -309,6 +309,7 @@
'Flow\\Specials\\SpecialEnableFlow' => __DIR__ . 
'/includes/Specials/SpecialEnableFlow.php',
'Flow\\Specials\\SpecialFlow' => __DIR__ . 
'/includes/Specials/SpecialFlow.php',
'Flow\\SubmissionHandler' => __DIR__ . 
'/includes/SubmissionHandler.php',
+   'Flow\\SummaryEditedPresentationModel' => __DIR__ . 
'/includes/Notifications/SummaryEditedPresentationModel.php',
'Flow\\TalkpageManager' => __DIR__ . '/includes/TalkpageManager.php',
'Flow\\TemplateHelper' => __DIR__ . '/includes/TemplateHelper.php',
'Flow\\Templating' => __DIR__ . '/includes/Templating.php',
diff --git a/i18n/en.json b/i18n/en.json
index 8316fb2..74f0904 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -290,6 +290,17 @@
"notification-body-flow-post-edited-user-talk": "$1",
"notification-header-flow-topic-renamed-v2": "The topic \"'''$1'''\" 
was renamed to \"'''$2'''\".",
"notification-header-flow-topic-renamed-user-talk": "The topic 
\"'''$1'''\" was renamed to \"'''$2'''\" on '''your talk page'''.",
+   "notification-header-flow-summary-edited": "The summary for 
\"'''$1'''\" was updated.",
+   "notification-header-flow-summary-edited-first": "The topic 
\"'''$1'''\" was summarized.",
+   "notification-bundle-header-flow-summary-edited": "The summary for 
\"'''$1'''\" was updated multiple times.",
+   "notification-body-flow-summary-edited": "$1",
+   "notification-header-flow-summary-edited-user-talk": "The summary for 
\"'''$1'''\" was updated on '''{{GENDER:$2|your}} talk page'''.",
+   "notification-header-flow-summary-edited-first-user-talk": "The topic 
\"'''$1'''\" was summarized on '''{{GENDER:$2|your}} talk page'''.",
+   "notification-bundle-header-flow-summary-edited-user-talk": "The 
summary for \"'''$1'''\" was updated multiple times on '''{{GENDER:$2|your}} 
talk page'''.",
+   "notification-body-flow-summary-edited-user-talk": "$1",
+   "notification-email-subject-flow-summary-edited": "$1 
{{GENDER:$1|updated}} the summary on $2.",
+   "notification-email-batch-body-flow-summary-edited": "$1 
{{GENDER:$1|updated}} the summary on $2.",
+   "notification-email-batch-bundle-body-flow-summary-edited": "$1 and $3 
{{PLURAL:$4|other|others}} {{GENDER:$1|updated}} the summary on $2",
"notification-header-flow-mention-post": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$4|you}} in \"'''$5'''\".",
"notification-header-flow-mention-header": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$4|you}} in the description of '''$3'''.",
"notification-header-flow-mention-post-summary": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$4|you}} in \"$5\".",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1d416a6..b53b9d7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -300,6 +300,17 @@
"notification-body-flow-post-edited-user-talk": "Notification body text 
for when a post on a user's talk page is edited. Parameters:\n$1 - snippet of 
the post\n{{notranslate}}",
"notification-header-flow-topic-renamed-v2": "Notification header text 
for when a topic is renamed. Parameters:\n$1 - old title of the topic\n* $2 - 
new title of the topic\n* $3 - username of the person who receives the 
notification, can be used for GENDER\n{{Related|Notification-header-flow}}",
"notification-header-flow-topic-renamed-user-talk": "Notification 
header text for when a topic is renamed on a user's talk page . Parameters:\n$1 
- old title of the topic\n* $2 - new title of the topic\n* $3 - username of the 
person who receives the notification, can be used for 
GENDER\n{{Related|Notification-header-flow}}",
+   "notification-header-flow-summary-edited": "Notification header text 
for when a topic summary is edited. Parameters:\n* $1 - title of the topic.\n* 
$2 - name of the user viewing the notification, can be used for 
GENDER.\n{{Related|Notification-header-flow}}",
+   "notification-header-flow-summary-edited-first": "Notification header 
text for when a topic is summarized for the first time. Parameters:\n* $1 - 
title of the topic.\n* $2 - name of the user viewing the notification, can be 
used for GENDER.\n{{Related|Notification-header-flow}}"

[MediaWiki-commits] [Gerrit] [WIP] In cross-wiki notifications, sort wikis by timestamp o... - change (mediawiki...Echo)

2016-02-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: [WIP] In cross-wiki notifications, sort wikis by timestamp of 
most recent notification
..

[WIP] In cross-wiki notifications, sort wikis by timestamp of most recent 
notification

Also make the wiki mentioned in the message be the one with the
most recent notification.

ForeignNotifications tracks timestamps per wiki per section,
and exposes these through getWikiTimestamp(). ApiEchoNotifications
adds these timestamps to the sources manifest, and also sorts
the list of wikis by timestamp (it'd be nicer to do this in
ForeignPresentationModel instead, but then we'd have to create a new
ForeignNotifications instance which causes a duplicated DB query).

NotificationsModel receives the timestamp for its wiki as its
fallback timestamp, and makes getTimestamp() return this value
during the pre-population phase. This causes its parent to
automatically sort it correctly.

Change-Id: Ie083fbb1ccaf74fbe804633d87ef03c9e71b120f
---
M includes/ForeignNotifications.php
M includes/api/ApiEchoNotifications.php
M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
4 files changed, 44 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/69/273569/1

diff --git a/includes/ForeignNotifications.php 
b/includes/ForeignNotifications.php
index d75fcba..ccf18ab 100644
--- a/includes/ForeignNotifications.php
+++ b/includes/ForeignNotifications.php
@@ -22,6 +22,11 @@
protected $timestamps = array( EchoAttributeManager::ALERT => false, 
EchoAttributeManager::MESSAGE => false );
 
/**
+* @var array [(str) wiki => [ (str) section => (MWTimestamp) 
timestamp, ...], ...]
+*/
+   protected $wikiTimestamps = array();
+
+   /**
 * @var bool
 */
protected $populated = false;
@@ -92,6 +97,25 @@
return isset( $this->wikis[$section] ) ? $this->wikis[$section] 
: array();
}
 
+   public function getWikiTimestamp( $wiki, $section = null ) {
+   $this->populate();
+   if ( !isset( $this->wikiTimestamps[$wiki] ) ) {
+   return false;
+   }
+   if ( $section === null ) {
+   $max = false;
+   foreach ( $this->wikiTimestamps[$wiki] as $section => 
$ts ) {
+   // $ts < $max = invert 0
+   // $ts > $max = invert 1
+   if ( $max === false || $ts->diff( $max 
)->invert === 1 ) {
+   $max = $ts;
+   }
+   }
+   return $max;
+   }
+   return isset( $this->wikiTimestamps[$wiki][$section] ) ? 
$this->wikiTimestamps[$wiki][$section] : false;
+   }
+
protected function populate() {
if ( $this->populated ) {
return;
@@ -118,6 +142,8 @@
$this->wikis[$section][] = $wiki;
 
$timestamp = new MWTimestamp( 
$data['ts'] );
+   $this->wikiTimestamps[$wiki][$section] 
= $timestamp;
+
// We need $this->timestamp[$section] 
to be the max timestamp
// across all wikis.
// $timestamp < 
$this->timestamps[$section] = invert 0
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index 4353134..33d08a3 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -89,6 +89,11 @@
// can be queried from
if ( $foreignNotifications ) {
$result['sources'] = 
$foreignNotifications->getApiEndpoints( $foreignNotifications->getWikis() );
+   // Add timestamp information
+   foreach ( $result['sources'] as $wiki => &$data 
) {
+   // FIXME: getWikiTimestamp() needs 
$section but we don't have that here
+   $data['ts'] = 
$foreignNotifications->getWikiTimestamp( $wiki )->getTimestamp( TS_MW );
+   }
}
}
 
@@ -285,6 +290,13 @@
$wikis = $foreignNotifications->getWikis( $section );
$count = $foreignNotifications->getCount( $section );
 
+   // Sort wikis by timestamp, in descending order (newest first)
+   usort( $wikis, function ( $a, $b ) use ( $foreignNotifications, 
$section ) {
+   $aTimestamp = 

[MediaWiki-commits] [Gerrit] TidyUpBug37714: Remove array dereferencing workaround - change (mediawiki/core)

2016-02-26 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: TidyUpBug37714: Remove array dereferencing workaround
..

TidyUpBug37714: Remove array dereferencing workaround

Change-Id: Ic4d7876575cf60f31c85d9288a30fd7055b93376
---
M maintenance/tidyUpBug37714.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/273568/1

diff --git a/maintenance/tidyUpBug37714.php b/maintenance/tidyUpBug37714.php
index e9c006e..803d943 100644
--- a/maintenance/tidyUpBug37714.php
+++ b/maintenance/tidyUpBug37714.php
@@ -20,8 +20,8 @@
);
 
foreach ( $result as $row ) {
-   $paramLines = explode( "\n", $row->log_params );
-   $ids = explode( ',', $paramLines[0] ); // Array 
dereferencing is PHP >= 5.4 :(
+   $paramLines = explode( "\n", $row->log_params )[0];
+   $ids = explode( ',', $paramLines );
$result = $this->getDB( DB_SLAVE )->select( // Work out 
what log entries were changed here.
'logging',
'log_type',

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

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

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


[MediaWiki-commits] [Gerrit] Remove useless PHP version comparison from wfDebugBacktrace() - change (mediawiki/core)

2016-02-26 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: Remove useless PHP version comparison from wfDebugBacktrace()
..

Remove useless PHP version comparison from wfDebugBacktrace()

MediaWiki 1.27 only supports PHP 5.5.9 and above, therefore
it is no more necessary to check that the running PHP version
is equal to or greater than 5.4.0.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/273567/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index eb174f2..5138018 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1557,7 +1557,7 @@
return [];
}
 
-   if ( $limit && version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
+   if ( $limit ) {
return array_slice( debug_backtrace( 
DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit + 1 ), 1 );
} else {
return array_slice( debug_backtrace(), 1 );

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

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

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


[MediaWiki-commits] [Gerrit] WIP: Pipe stop was overloaded - change (mediawiki...parsoid)

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

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

Change subject: WIP: Pipe stop was overloaded
..

WIP: Pipe stop was overloaded

 * Permitting pipes in extlinks in template params that was introduced
   in 26e1a21c looks like it was wrong from the beginning.

 * As is, fixes the regression from rt,
   frwiki/Liste_des_commanderies_templières_dans_la_région_Centre
   how still some more work to be done for the test case committed in
   2291f85e.

 * Questions: Does this need to be applied to HTML  as well? Yes!
   Also, why is  special cases in the tokenizer? Isn't it an
   extension tag that we just handle natively? That probably needs a
   refactoring unless there's a compelling reason not to that I'm
   missing?

Change-Id: I222c79ced95d3b6801684cdb37033ad11bb1bd22
---
M lib/wt2html/pegTokenizer.pegjs.txt
M lib/wt2html/tokenizer.utils.js
2 files changed, 24 insertions(+), 20 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index 9a3806e..8d6d7b8 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -429,13 +429,7 @@
 }
 sp:$( space / unispace )*
 targetOff:( "" { return endOffset(); })
-content:(
-t1:(
-& { return stops.push('pipe', false); }
-t:inlineline { stops.pop('pipe'); return t; }
-/ ! { return stops.pop('pipe'); }
-) { return t1; }
-  )?
+content:inlineline?
 "]" {
 stops.pop('extlink');
 return [
@@ -826,20 +820,20 @@
   }
 
 link_text
-  = & { return stops.inc('linkdesc'); }
+  = & { return stops.push('linkdesc', true); }
 h:link_text_fragment
 // 'equal' syntaxFlag is set for links in template parameters. Consume the
 // '=' here.
 hs:( '=' link_text_fragment )?
 {
-stops.dec('linkdesc');
+stops.pop('linkdesc');
 if (hs !== null) {
 return h.concat(hs);
 } else {
 return h;
 }
 }
-  / & { return stops.dec('linkdesc'); }
+  / & { return stops.pop('linkdesc'); }
 
 
 /* Generic quote rule for italic and bold, further processed in a token
@@ -1188,13 +1182,22 @@
 tag_name = $([A-Za-z] tag_name_chars*)
 
 generic_tag
-  = "<"
+  = & {
+  // By the time we get to `doTableStuff` in the php parser, we've already
+  // safely encoded element attributes. See 55313f4e in core.
+  // FIXME: Also need to handle the || case here, which probably means
+  // pushing 'table'. See the failing test, "! and || in element attributes
+  // should not be parsed as /".
+  return stops.push('tableCellArg', false);
+}
+"<"
 end:"/"? name:tag_name
 attribs:generic_newline_attributes
 space_or_newline* // No need to preserve this -- canonicalize on RT via 
dirty diff
 selfclose:"/"?
 bad_ws:space* // No need to preserve this -- canonicalize on RT via dirty 
diff
 ">" {
+stops.pop('tableCellArg');
 var lcName = name.toLowerCase();
 var isVoidElt = Util.isVoidElement(lcName) ? true : null;
 // Support 
@@ -1217,6 +1220,7 @@
 }
 return res;
 }
+/ & { return stops.pop('tableCellArg'); }
 
 // A generic attribute that can span multiple lines.
 generic_newline_attribute
@@ -1727,13 +1731,12 @@
  * match if followed by double pipe (row-based syntax).
  */
 row_syntax_table_args
-  = & { stops.push('pipe', true); stops.push('tableCellArg', true); return 
true; }
+  = & { return stops.push('tableCellArg', true); }
 as:table_attributes s:space* p:pipe !pipe {
 stops.pop('tableCellArg');
-stops.pop('pipe');
 return [as, s, p];
 }
-/ & { stops.pop('tableCellArg'); stops.pop('pipe'); return false; }
+/ & { return stops.pop('tableCellArg'); }
 
 
 /***
diff --git a/lib/wt2html/tokenizer.utils.js b/lib/wt2html/tokenizer.utils.js
index e746129..e4f6720 100644
--- a/lib/wt2html/tokenizer.utils.js
+++ b/lib/wt2html/tokenizer.utils.js
@@ -190,7 +190,8 @@
);
case '|':
return stops.onStack('pipe') ||
-   counters.linkdesc ||
+   stops.onStack('tableCellArg') ||
+   stops.onStack('linkdesc') ||
(stops.onStack('table') && (
pos < input.length - 1 &&
/[}|]/.test(input[pos + 1])));
@@ -200,20 +201,20 @@
input[pos + 1]

[MediaWiki-commits] [Gerrit] [WIP] PHP counterpart to DateInputWidget - change (mediawiki/core)

2016-02-26 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review.

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

Change subject: [WIP] PHP counterpart to DateInputWidget
..

[WIP] PHP counterpart to DateInputWidget

Depends-on: I42caf8ac056eeaa5b4f055e333d5fa406b823836

Bug: T120733
Change-Id: I8f80e27304a916bba16ed255c8e78073f9da3813
---
M autoload.php
A includes/widget/DateInputWidget.php
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/273565/1

diff --git a/autoload.php b/autoload.php
index 5ec6218..ed46792 100644
--- a/autoload.php
+++ b/autoload.php
@@ -820,6 +820,7 @@
'MediaWiki\\Tidy\\TidyDriverBase' => __DIR__ . 
'/includes/tidy/TidyDriverBase.php',
'MediaWiki\\Widget\\ComplexNamespaceInputWidget' => __DIR__ . 
'/includes/widget/ComplexNamespaceInputWidget.php',
'MediaWiki\\Widget\\ComplexTitleInputWidget' => __DIR__ . 
'/includes/widget/ComplexTitleInputWidget.php',
+   'MediaWiki\\Widget\\DateInputWidget' => __DIR__ . 
'/includes/widget/DateInputWidget.php',
'MediaWiki\\Widget\\NamespaceInputWidget' => __DIR__ . 
'/includes/widget/NamespaceInputWidget.php',
'MediaWiki\\Widget\\TitleInputWidget' => __DIR__ . 
'/includes/widget/TitleInputWidget.php',
'MediaWiki\\Widget\\UserInputWidget' => __DIR__ . 
'/includes/widget/UserInputWidget.php',
diff --git a/includes/widget/DateInputWidget.php 
b/includes/widget/DateInputWidget.php
new file mode 100644
index 000..1b1463e
--- /dev/null
+++ b/includes/widget/DateInputWidget.php
@@ -0,0 +1,37 @@
+ true, 'type' => 'date' ], 
$config )
+   );
+
+   // Initialization
+   $this->addClasses( [ 'mw-widget-dateInputWidget' ] );
+   }
+
+   protected function getJavaScriptClassName() {
+   return 'mw.widgets.DateInputWidget';
+   }
+
+   public function getConfig( &$config ) {
+   return parent::getConfig( $config );
+   }
+}
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Allow type="date" for TextInputWidgets - change (oojs/ui)

2016-02-26 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review.

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

Change subject: Allow type="date" for TextInputWidgets
..

Allow type="date" for TextInputWidgets

 to be used as the PHP counterpart to DateInputWidget.
If it isn't supported in the browser, it should be appear as a plain text box.

Bug: T120733
Change-Id: I42caf8ac056eeaa5b4f055e333d5fa406b823836
---
M php/widgets/TextInputWidget.php
M src/widgets/TextInputWidget.js
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/64/273564/1

diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index 6b4b078..f76697d 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -32,8 +32,8 @@
 
/**
 * @param array $config Configuration options
-* @param string $config['type'] HTML tag `type` attribute: 'text', 
'password', 'search', 'email'
-*   or 'url'. Ignored if `multiline` is true. (default: 'text')
+* @param string $config['type'] HTML tag `type` attribute: 'text', 
'password', 'search', 'email',
+*   'url' or 'date'. Ignored if `multiline` is true. (default: 'text')
 *
 *   Some values of `type` result in additional behaviors:
 *   - `search`: implies `icon: 'search'` and `indicator: 'clear'`; 
when clicked, the indicator
@@ -144,7 +144,7 @@
if ( isset( $config['multiline'] ) && $config['multiline'] ) {
return 'multiline';
} else {
-   $type = in_array( $config['type'], [ 'text', 
'password', 'search', 'email', 'url' ] ) ?
+   $type = in_array( $config['type'], [ 'text', 
'password', 'search', 'email', 'url', 'date' ] ) ?
$config['type'] :
'text';
return $type;
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index b85e146..0b48240 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -27,7 +27,7 @@
  * @constructor
  * @param {Object} [config] Configuration options
  * @cfg {string} [type='text'] The value of the HTML `type` attribute: 'text', 
'password', 'search',
- *  'email' or 'url'. Ignored if `multiline` is true.
+ *  'email', 'url' or 'date'. Ignored if `multiline` is true.
  *
  *  Some values of `type` result in additional behaviors:
  *
@@ -483,7 +483,7 @@
  * @private
  */
 OO.ui.TextInputWidget.prototype.getSaneType = function ( config ) {
-   var type = [ 'text', 'password', 'search', 'email', 'url' ].indexOf( 
config.type ) !== -1 ?
+   var type = [ 'text', 'password', 'search', 'email', 'url', 'date' 
].indexOf( config.type ) !== -1 ?
config.type :
'text';
return config.multiline ? 'multiline' : type;

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

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

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


[MediaWiki-commits] [Gerrit] Pass through deletion reason parameters to talk page notif t... - change (mediawiki...PageTriage)

2016-02-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Pass through deletion reason parameters to talk page notif 
templates as well
..

Pass through deletion reason parameters to talk page notif templates as well

These were previously only passed to tag templates, but the
talk page notif template for A10 on enwiki tries to use
the {{{article}}} parameter, which breaks.

Bug: T128024
Change-Id: I65c6b521bd27e61b1d1c08996fd80f4002a79965
---
M modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/63/273563/1

diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js 
b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js
index 34d56f9..e0c3169 100644
--- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js
+++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.delete.js
@@ -752,6 +752,7 @@
 */
notifyUser: function ( count, key ) {
var template,
+   paramsText = '',
that = this;
 
if ( count === 0 || !this.selectedTag[ key ] ) {
@@ -759,8 +760,13 @@
}
 
// use generic template for multiple deletion tag
-   template = ( count > 1 ) ? 
$.pageTriageDeletionTagsMultiple.talkpagenotiftpl : this.selectedTag[ key 
].talkpagenotiftpl;
-   template = '{{subst:' + template + '|' + pageName + 
'}}';
+   if ( count > 1 ) {
+   template = 
$.pageTriageDeletionTagsMultiple.talkpagenotiftpl;
+   } else {
+   template = this.selectedTag[ key 
].talkpagenotiftpl;
+   paramsText = this.buildParams( 
this.selectedTag[ key ] );
+   }
+   template = '{{subst:' + template + '|' + pageName + 
paramsText + '}}';
// Appending signature
template += ' ';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65c6b521bd27e61b1d1c08996fd80f4002a79965
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
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] Give a useful message in the temporary blank edit screen - change (mediawiki...VisualEditor)

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

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

Change subject: Give a useful message in the temporary blank edit screen
..

Give a useful message in the temporary blank edit screen

Bug: T128028
Change-Id: Ife0a9de96965a9848f362696fc403708fd344825
---
M VisualEditor.hooks.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
3 files changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 753f969..94bbf67 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -165,6 +165,7 @@
 
$titleMsg = $title->exists() ? 'editing' : 'creating';
$out->setPageTitle( wfMessage( $titleMsg, 
$title->getPrefixedText() ) );
+   $out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( 
$url ) );
}
$out->addScript( Html::inlineScript(
"(window.NORLQ=window.NORLQ||[]).push(" .
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 2a20cbc..a2520ea 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -312,6 +312,7 @@
"visualeditor-shortcuts-insert": "Insert",
"visualeditor-special-characters-group-other": "Often used",
"visualeditor-timeout":"It looks like this editor is currently 
unavailable. Would you like to edit in source mode instead?",
+   "visualeditor-toload": "The editor will now load. If you still see this 
message after a few seconds, please [$1 click here to re-load].",
"visualeditor-toolbar-savedialog": "Save page",
"visualeditor-toolbar-savedialog-short": "Save",
"visualeditor-usernamespacepagelink": "Project:User namespace",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index a3bc331..3e3b335 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -323,6 +323,7 @@
"visualeditor-shortcuts-insert": "Heading for insertion 
shortcuts\n{{Identical|Insert}}",
"visualeditor-special-characters-group-other": "Label of the special 
character group shown if the wiki has visualeditor-quick-access-characters.json 
set up.",
"visualeditor-timeout": "Text (JavaScript confirm()) shown when the 
editor fails to load properly due to a 504 Gateway Timeout error.",
+   "visualeditor-toload": "Text shown to the user in place of the wikitext 
editor on action=edit/submit when VisualEditor is expected to 
load.\n\nParameters\n* $1 is the URL which points to a page with a fallback to 
the wikitext editor if necessary.",
"visualeditor-toolbar-savedialog": "Label text for button to open save 
dialog.\n\nUsed in:\n* 
{{msg-mw|Guidedtour-tour-gettingstartedtasktoolbarve-click-save-description}}.\n{{Identical|Save
 page}}",
"visualeditor-toolbar-savedialog-short": "Short label text for button 
to open save dialog on width-restricted devices\n{{Identical|Save}}",
"visualeditor-usernamespacepagelink": "Name of a page describing the 
user namespace (NS2) in this project.\n{{doc-important|Do not translate 
\"Project\"; it is automatically converted to the wiki's project namespace.}}",

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

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

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


[MediaWiki-commits] [Gerrit] Allow FSFile objects for src in FileBackend::do*Operations - change (mediawiki/core)

2016-02-26 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Allow FSFile objects for src in FileBackend::do*Operations
..

Allow FSFile objects for src in FileBackend::do*Operations

Convenience aside, this lets multiwrite backends do async replication for
"store" operations safely, buy keeping a handle to the source file that
prevents it from getting prematurely deleted before the post-send writes
to the secondary backends can happen.

Change-Id: I1254de527c47835c35fed6e526b42953c1b2b2ca
---
M includes/filebackend/FileBackend.php
M includes/filebackend/FileBackendMultiWrite.php
M includes/filerepo/FileRepo.php
3 files changed, 52 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/273561/1

diff --git a/includes/filebackend/FileBackend.php 
b/includes/filebackend/FileBackend.php
index fd9c8de..03974f7 100644
--- a/includes/filebackend/FileBackend.php
+++ b/includes/filebackend/FileBackend.php
@@ -237,6 +237,8 @@
 *  - describe (since 1.21)
 *  - null
 *
+* FSFile/TempFSFile object support was added in 1.27.
+*
 * a) Create a new file in storage with the contents of a string
 * @code
 * array(
@@ -253,7 +255,7 @@
 * @code
 * array(
 * 'op'  => 'store',
-* 'src' => ,
+* 'src' => ,
 * 'dst' => ,
 * 'overwrite'   => ,
 * 'overwriteSame'   => ,
@@ -372,11 +374,15 @@
if ( !count( $ops ) ) {
return Status::newGood(); // nothing to do
}
+
+   $ops = $this->resolveFSFileObjects( $ops );
if ( empty( $opts['force'] ) ) { // sanity
unset( $opts['nonLocking'] );
}
+
/** @noinspection PhpUnusedLocalVariableInspection */
$scope = $this->getScopedPHPBehaviorForOps(); // try to ignore 
client aborts
+
return $this->doOperationsInternal( $ops, $opts );
}
 
@@ -503,6 +509,8 @@
 *  - describe (since 1.21)
 *  - null
 *
+* FSFile/TempFSFile object support was added in 1.27.
+*
 * a) Create a new file in storage with the contents of a string
 * @code
 * array(
@@ -517,7 +525,7 @@
 * @code
 * array(
 * 'op'  => 'store',
-* 'src' => ,
+* 'src' => ,
 * 'dst' => ,
 * 'headers' =>  # 
since 1.21
 * )
@@ -604,11 +612,15 @@
if ( !count( $ops ) ) {
return Status::newGood(); // nothing to do
}
+
+   $ops = $this->resolveFSFileObjects( $ops );
foreach ( $ops as &$op ) {
$op['overwrite'] = true; // avoids RTTs in key/value 
stores
}
+
/** @noinspection PhpUnusedLocalVariableInspection */
$scope = $this->getScopedPHPBehaviorForOps(); // try to ignore 
client aborts
+
return $this->doQuickOperationsInternal( $ops );
}
 
@@ -1331,6 +1343,28 @@
}
 
/**
+* Convert FSFile 'src' paths to string paths (with an 'srcRef' field 
set to the FSFile)
+*
+* The 'srcRef' field keeps any TempFSFile objects in scope for the 
backend to have it
+* around as long it needs (which may vary greatly depending on 
configuration)
+*
+* @param array $ops File operation batch for 
FileBaclend::doOperations()
+* @return array File operation batch
+*/
+   protected function resolveFSFileObjects( array $ops ) {
+   foreach ( $ops as &$op ) {
+   $src = isset( $op['src'] ) ? $op['src'] : null;
+   if ( $src instanceof FSFile ) {
+   $op['srcRef'] = $src;
+   $op['src'] = $src->getPath();
+   }
+   }
+   unset( $op );
+
+   return $ops;
+   }
+
+   /**
 * Check if a given path is a "mwstore://" path.
 * This does not do any further validation or any existence checks.
 *
diff --git a/includes/filebackend/FileBackendMultiWrite.php 
b/includes/filebackend/FileBackendMultiWrite.php
index 2d27450..5a103c6 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -199,7 +199,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, 
$backend );
-

[MediaWiki-commits] [Gerrit] Add a short abbreviation for timestamps in notifications - change (mediawiki...Echo)

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

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

Change subject: Add a short abbreviation for timestamps in notifications
..

Add a short abbreviation for timestamps in notifications

Use 'm' instead of 'minutes', 's' instead of 'seconds', etc, for
shorter timestamp rendering in the notification list.

Bug: T125970
Change-Id: I9479c5406a4bf44ef560bef2c8f204a9f60cafc6
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/ext.echo.init.js
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
5 files changed, 50 insertions(+), 3 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index b66f558..f1f07b1 100644
--- a/Resources.php
+++ b/Resources.php
@@ -99,6 +99,12 @@
"notification-link-text-expand-alert-count",
"notification-link-text-expand-message-count",
"notification-link-text-expand-all-count",
+   "notification-timestamp-ago-seconds",
+   "notification-timestamp-ago-minutes",
+   "notification-timestamp-ago-hours",
+   "notification-timestamp-ago-days",
+   "notification-timestamp-ago-months",
+   "notification-timestamp-ago-years",
'echo-notification-markasread',
'echo-notification-alert-text-only',
'echo-notification-message-text-only',
diff --git a/i18n/en.json b/i18n/en.json
index 8c74bdb..a4b81a9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -127,6 +127,12 @@
"notification-mention-nosection-email-batch-body": "$1 
{{GENDER:$1|mentioned}} you on the $2 talk page.",
"notification-user-rights-email-subject": "Your user rights have 
changed on {{SITENAME}}",
"notification-user-rights-email-batch-body": "Your user rights were 
{{GENDER:$1|changed}} by $1. $2.",
+   "notification-timestamp-ago-seconds": "{{PLURAL:$1|$1s}}",
+   "notification-timestamp-ago-minutes": "{{PLURAL:$1|$1m}}",
+   "notification-timestamp-ago-hours": "{{PLURAL:$1|$1h}}",
+   "notification-timestamp-ago-days": "{{PLURAL:$1|$1d}}",
+   "notification-timestamp-ago-months": "{{PLURAL:$1|$1mo}}",
+   "notification-timestamp-ago-years": "{{PLURAL:$1|$1yr}}",
"echo-notification-count": "$1+",
"echo-email-subject-default": "New notification at {{SITENAME}}",
"echo-email-body-default": "You have a new notification at 
{{SITENAME}}:\n\n$1",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3bdc8d7..19592d5d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -148,6 +148,12 @@
"notification-mention-nosection-email-batch-body": "E-mail notification 
batch body.  Parameters:\n* $1 - a username, plaintext.  Can be used for gender 
support\n* $2 - the title text without namespace (a page title in any 
namespace)\n* $3 - name of the user viewing the notification, can be used for 
GENDER\n\nSee also:\n* {{msg-mw|Notification-mention-nosection}}\n* 
{{msg-mw|Notification-mention-nosection-flyout}}\n* 
{{msg-mw|Notification-mention-email-subject}}",
"notification-user-rights-email-subject": "E-mail subject for user 
rights notification\n\nSee also:\n* {{msg-mw|Notification-user-rights}}\n* 
{{msg-mw|Notification-user-rights-email-batch-body}}",
"notification-user-rights-email-batch-body": "Email notification batch 
body. Parameters:\n* $1 - a user name, plaintext. Can be used for gender 
support.\n* $2 - a semicolon separated list of 
{{msg-mw|notification-user-rights-add}}, 
{{msg-mw|notification-user-rights-remove}}",
+   "notification-timestamp-ago-seconds": "Label for the amount of time 
since a notification has arrived in the case where it is under a minute. $1 - 
Number of seconds",
+   "notification-timestamp-ago-minutes": "Label for the amount of time 
since a notification has arrived in the case where it is in order of minutes. 
$1 - Number of minutes",
+   "notification-timestamp-ago-hours": "Label for the amount of time since 
a notification has arrived in the case where it is in order of hours. $1 - 
Number of hours",
+   "notification-timestamp-ago-days": "Label for the amount of time since 
a notification has arrived in the case where it is in order of days. $1 - 
Number of days",
+   "notification-timestamp-ago-months": "Label for the amount of time 
since a notification has arrived in the case where it is in order of months. $1 
- Number of months",
+   "notification-timestamp-ago-years": "Label for the amount of time since 
a notification has arrived in the case where it is in order of years. $1 - 
Number of years",
"echo-notification-count": "{{optional}}\nThe new notification count 
next to notification link, for example: 99+\n\nParam

[MediaWiki-commits] [Gerrit] Logging: Add ApiRequest kafka logging - change (operations/mediawiki-config)

2016-02-26 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Logging: Add ApiRequest kafka logging
..

Logging: Add ApiRequest kafka logging

Log 1 in 5000 Action API requests to a Kafka topic as Avro encoded data.

Bug: T108618
Depends-On: I94c730f196bb8629cac9408e61139fab79a34f8d
Depends-On: I694a3000bab0d569dfe41d711f05121b917e6104
Depends-On: I07f36b678633bc6bc33169049606e69ca2bbb72a
Depends-On: Ie5a402018b347a6fbcd08fb25ebdf59e7ca2bdf4
Depends-On: I13553099498cd351047f6ff18d37cc0b3504782d
Change-Id: Id03cb0a2359add88571d809083bfcc97fd1074d6
---
M wmf-config/InitialiseSettings.php
M wmf-config/event-schemas
2 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 79ad31c..16f470b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4428,6 +4428,10 @@
'schema' => file_get_contents( __DIR__ . 
'/event-schemas/avro/mediawiki/CirrusSearchRequestSet/111448028943.avsc' ),
'revision' => 111448028943,
),
+   'ApiRequest' => array(
+   'schema' => file_get_contents( __DIR__ . 
'/event-schemas/avro/mediawiki/ApiRequest/101453221640.avsc' ),
+   'revision' => 101453221640,
+   ),
),
 ),
 # @} end of wmgAvroSchemas
@@ -4448,6 +4452,13 @@
'antispoof' => 'debug',
'api' => array( 'logstash' => false ),
'api-feature-usage' => 'debug',
+   'ApiRequest' => array(
+   'udp2log' => false,
+   'logstash' => false,
+   'kafka' => 'debug',
+   'buffer' => true,
+   'sample' => 5000,
+   ),
'badpass' => 'debug',
'BounceHandler' => 'debug',
'Bug58676' => 'debug', # Invalid message parameter
diff --git a/wmf-config/event-schemas b/wmf-config/event-schemas
index 3ae2974..c9456af 16
--- a/wmf-config/event-schemas
+++ b/wmf-config/event-schemas
-Subproject commit 3ae2974957d160ed11173252c4ddc4c4a26d5255
+Subproject commit c9456af43d26a6e20df958530bed68b99898ad7d

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

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

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


[MediaWiki-commits] [Gerrit] Camus: specify latest schema for ApiAction - change (operations/puppet)

2016-02-26 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Camus: specify latest schema for ApiAction
..

Camus: specify latest schema for ApiAction

Bug: T108618
Change-Id: I13553099498cd351047f6ff18d37cc0b3504782d
---
M modules/camus/templates/mediawiki.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/273558/1

diff --git a/modules/camus/templates/mediawiki.erb 
b/modules/camus/templates/mediawiki.erb
index 060b03d..4ab62c5 100644
--- a/modules/camus/templates/mediawiki.erb
+++ b/modules/camus/templates/mediawiki.erb
@@ -22,6 +22,7 @@
 # AvroRecordWriterProvider does not support writing a record with multiple
 # schema rev and won't generate a new file if the schema changes.
 org.wikimedia.analytics.schemas.CirrusSearchRequestSet.latestRev=111448028943
+org.wikimedia.analytics.schemas.ApiAction.latestRev=101453221640
 
 # Used by avro-based Decoders to use as their schema registry.
 
kafka.message.coder.schema.registry.class=org.wikimedia.analytics.refinery.camus.schemaregistry.KafkaTopicSchemaRegistry

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

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

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


[MediaWiki-commits] [Gerrit] Add initial oozie job for ApiAction - change (analytics/refinery)

2016-02-26 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Add initial oozie job for ApiAction
..

Add initial oozie job for ApiAction

Add a preliminary oozie job for ApiAction:
* create partitions
* added a python script to delete old partitions

These changes are mostly a copy with search & replace of
I4c1436f5062f66f76971feea4ba16597ad4159f7 which added
CirrusSearchRequestSet

Bug: T108618
Change-Id: Ie5a402018b347a6fbcd08fb25ebdf59e7ca2bdf4
---
A bin/refinery-drop-api-action-partitions
A hive/mediawiki/api-action/create_ApiAction_table.hql
A oozie/mediawiki/api-action/README.md
A oozie/mediawiki/api-action/datasets_raw.xml
A oozie/mediawiki/api-action/load/coordinator.properties
A oozie/mediawiki/api-action/load/coordinator.xml
A oozie/mediawiki/api-action/load/workflow.xml
7 files changed, 525 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/57/273557/1

diff --git a/bin/refinery-drop-api-action-partitions 
b/bin/refinery-drop-api-action-partitions
new file mode 100755
index 000..27656d1
--- /dev/null
+++ b/bin/refinery-drop-api-action-partitions
@@ -0,0 +1,173 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Note: You should make sure to put refinery/python on your PYTHONPATH.
+#   export PYTHONPATH=$PYTHONPATH:/path/to/refinery/python
+
+"""
+Automatically drops old Hive partitions from the ApiAction table
+and deletes the hourly time bucketed directory from HDFS.
+
+Usage: refinery-drop-cirrus-searchrequest-set-partitions [options]
+
+Options:
+-h --help   Show this help message and exit.
+-d --older-than-days= Drop data older than this number of 
days.  [default: 60]
+-D --database=  Hive database name.  [default: default]
+-t --table=  Name of ApiAction table.  [default: 
ApiAction]
+-l --location=Base HDFS location path of the 
ApiAction table.  If not
+specified, this will be inferred from 
the table schema metadata.
+-o --hive-options= Any valid Hive CLI options you want to 
pass to Hive commands.
+Example: '--auxpath 
/path/to/hive-serdes-1.0-SNAPSHOT.jar'
+-v --verboseTurn on verbose debug logging.
+-n --dry-runDon't actually drop any partitions, 
just output the Hive queries to drop partitions.
+"""
+__author__ = 'Andrew Otto '
+
+import datetime
+from   docopt   import docopt
+import logging
+import re
+import os
+import sys
+from refinery.util import HiveUtils, HdfsUtils
+
+# from pprint import pprint as pp
+
+
+
+
+if __name__ == '__main__':
+# parse arguments
+arguments = docopt(__doc__)
+# pp(arguments)
+days= int(arguments['--older-than-days'])
+database= arguments['--database']
+table   = arguments['--table']
+table_location  = arguments['--location']
+hive_options= arguments['--hive-options']
+verbose = arguments['--verbose']
+dry_run = arguments['--dry-run']
+
+# Only raw for now
+partition_type  = 'raw';
+
+log_level = logging.INFO
+if verbose:
+log_level = logging.DEBUG
+
+logging.basicConfig(level=log_level,
+format='%(asctime)s %(levelname)-6s %(message)s',
+datefmt='%Y-%m-%dT%H:%M:%S')
+
+
+if not HdfsUtils.validate_path(table_location):
+logging.error('{0} table location \'{1}\' is not a valid HDFS path.  
Path must start with \'/\' or \'hdfs://\'.  Aborting.'
+.format(table, table_location))
+sys.exit(1)
+
+
+# Instantiate HiveUtils.
+hive = HiveUtils(database, hive_options)
+
+# The base location of this ApiAction table in HDFS.
+# If it was not provided via the CLI, then attempt to
+# infer if from the table metadata.
+if table_location == None:
+table_location = hive.table_location(table)
+
+
+# Allows easy extraction of partition fields from the partition spec.
+# This regex is used with HiveUtils partition_datetime_from_spec.
+# and could be used with HDFS partition paths that match the default
+# Hive partition layout (I.e. key1=val1/key2=val2, etc.)
+partition_sp

[MediaWiki-commits] [Gerrit] Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngin... - change (integration/jenkins)

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

Change subject: Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine 
for speed""
..


Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine for speed""

This reverts commit 65a0c26972b097a4484327d5fe2790d486744599.

Change-Id: I114b9ed7f05df369da52375c392d0232f90f9cbc
---
A mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php 
b/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
new file mode 100644
index 000..541aa41
--- /dev/null
+++ b/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
@@ -0,0 +1,10 @@
+https://gerrit.wikimedia.org/r/273554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I114b9ed7f05df369da52375c392d0232f90f9cbc
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use sync writes for replication of 'store' operations - change (mediawiki/core)

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

Change subject: Use sync writes for replication of 'store' operations
..


Use sync writes for replication of 'store' operations

The local temporary file might not live long enough to be
copied into storage during post-send.

Bug: T128124
Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
---
M includes/filebackend/FileBackendMultiWrite.php
1 file changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/includes/filebackend/FileBackendMultiWrite.php 
b/includes/filebackend/FileBackendMultiWrite.php
index 3841f2e..edb4059 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -199,7 +199,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, 
$backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && 
!$this->hasStoreOperation( $ops ) ) {
// Bind $scopeLock to the callback to 
preserve locks
DeferredUpdates::addCallableUpdate(
function() use ( $backend, 
$realOps, $opts, $scopeLock ) {
@@ -467,6 +467,20 @@
);
}
 
+   /**
+* @param array $ops File operation batch map
+* @return bool
+*/
+   protected function hasStoreOperation( array $ops ) {
+   foreach ( $ops as $op ) {
+   if ( $op['op'] === 'store' ) {
+   return true;
+   }
+   }
+
+   return false;
+   }
+
protected function doQuickOperationsInternal( array $ops ) {
$status = Status::newGood();
// Do the operations on the master backend; setting Status 
fields...
@@ -480,7 +494,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, $backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && !$this->hasStoreOperation( 
$ops ) ) {
DeferredUpdates::addCallableUpdate(
function() use ( $backend, $realOps ) {
$backend->doQuickOperations( 
$realOps );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add ApiAction avro schema - change (analytics...source)

2016-02-26 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Add ApiAction avro schema
..

Add ApiAction avro schema

Bug: T108618
Change-Id: I07f36b678633bc6bc33169049606e69ca2bbb72a
---
M refinery-camus/src/main/resources/schema_repo
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source 
refs/changes/56/273556/1

diff --git a/refinery-camus/src/main/resources/schema_repo 
b/refinery-camus/src/main/resources/schema_repo
index 3ae2974..c9456af 16
--- a/refinery-camus/src/main/resources/schema_repo
+++ b/refinery-camus/src/main/resources/schema_repo
-Subproject commit 3ae2974957d160ed11173252c4ddc4c4a26d5255
+Subproject commit c9456af43d26a6e20df958530bed68b99898ad7d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07f36b678633bc6bc33169049606e69ca2bbb72a
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery/source
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Use sync writes for replication of 'store' operations - change (mediawiki/core)

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

Change subject: Use sync writes for replication of 'store' operations
..


Use sync writes for replication of 'store' operations

The local temporary file might not live long enough to be
copied into storage during post-send.

Bug: T128124
Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
---
M includes/filebackend/FileBackendMultiWrite.php
1 file changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/includes/filebackend/FileBackendMultiWrite.php 
b/includes/filebackend/FileBackendMultiWrite.php
index 132c4a6..2d27450 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -199,7 +199,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, 
$backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && 
!$this->hasStoreOperation( $ops ) ) {
// Bind $scopeLock to the callback to 
preserve locks
DeferredUpdates::addCallableUpdate(
function() use ( $backend, 
$realOps, $opts, $scopeLock ) {
@@ -467,6 +467,20 @@
);
}
 
+   /**
+* @param array $ops File operation batch map
+* @return bool
+*/
+   protected function hasStoreOperation( array $ops ) {
+   foreach ( $ops as $op ) {
+   if ( $op['op'] === 'store' ) {
+   return true;
+   }
+   }
+
+   return false;
+   }
+
protected function doQuickOperationsInternal( array $ops ) {
$status = Status::newGood();
// Do the operations on the master backend; setting Status 
fields...
@@ -480,7 +494,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, $backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && !$this->hasStoreOperation( 
$ops ) ) {
DeferredUpdates::addCallableUpdate(
function() use ( $backend, $realOps ) {
$backend->doQuickOperations( 
$realOps );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] Update ace to 1.2.3 - change (mediawiki...CodeEditor)

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

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

Change subject: Update ace to 1.2.3
..

Update ace to 1.2.3

See https://github.com/ajaxorg/ace-builds/tree/master/src

Changelog is at https://github.com/ajaxorg/ace/blob/v1.2.3/ChangeLog.txt

Change-Id: I00a673ce98e7e7d9e4a421a8e663087753e2a476
---
D modules/ace/LICENSE
M modules/ace/ace.js
M modules/ace/ext-chromevox.js
M modules/ace/ext-emmet.js
M modules/ace/ext-keybinding_menu.js
M modules/ace/ext-language_tools.js
M modules/ace/ext-modelist.js
M modules/ace/ext-settings_menu.js
M modules/ace/keybinding-emacs.js
M modules/ace/keybinding-vim.js
M modules/ace/mode-abap.js
M modules/ace/mode-c9search.js
M modules/ace/mode-c_cpp.js
M modules/ace/mode-cirru.js
M modules/ace/mode-coffee.js
M modules/ace/mode-coldfusion.js
M modules/ace/mode-csharp.js
M modules/ace/mode-css.js
M modules/ace/mode-curly.js
M modules/ace/mode-dart.js
M modules/ace/mode-django.js
M modules/ace/mode-eiffel.js
M modules/ace/mode-ejs.js
M modules/ace/mode-elm.js
A modules/ace/mode-fortran.js
M modules/ace/mode-ftl.js
M modules/ace/mode-gherkin.js
M modules/ace/mode-glsl.js
A modules/ace/mode-gobstones.js
M modules/ace/mode-golang.js
M modules/ace/mode-groovy.js
M modules/ace/mode-haml.js
M modules/ace/mode-handlebars.js
M modules/ace/mode-html.js
M modules/ace/mode-html_elixir.js
M modules/ace/mode-html_ruby.js
M modules/ace/mode-jade.js
M modules/ace/mode-java.js
M modules/ace/mode-javascript.js
M modules/ace/mode-jsp.js
M modules/ace/mode-lean.js
M modules/ace/mode-less.js
M modules/ace/mode-liquid.js
M modules/ace/mode-livescript.js
M modules/ace/mode-logiql.js
M modules/ace/mode-lua.js
M modules/ace/mode-luapage.js
M modules/ace/mode-markdown.js
M modules/ace/mode-mask.js
M modules/ace/mode-matlab.js
M modules/ace/mode-mel.js
M modules/ace/mode-nix.js
A modules/ace/mode-nsis.js
M modules/ace/mode-objectivec.js
M modules/ace/mode-pascal.js
M modules/ace/mode-pgsql.js
M modules/ace/mode-php.js
M modules/ace/mode-powershell.js
M modules/ace/mode-praat.js
M modules/ace/mode-protobuf.js
M modules/ace/mode-r.js
A modules/ace/mode-razor.js
M modules/ace/mode-rdoc.js
M modules/ace/mode-rhtml.js
A modules/ace/mode-rst.js
M modules/ace/mode-ruby.js
M modules/ace/mode-rust.js
M modules/ace/mode-scala.js
M modules/ace/mode-sjs.js
M modules/ace/mode-smarty.js
M modules/ace/mode-soy_template.js
M modules/ace/mode-sqlserver.js
M modules/ace/mode-stylus.js
M modules/ace/mode-svg.js
M modules/ace/mode-swift.js
M modules/ace/mode-tex.js
M modules/ace/mode-twig.js
M modules/ace/mode-typescript.js
M modules/ace/mode-vbscript.js
M modules/ace/mode-velocity.js
M modules/ace/mode-vhdl.js
A modules/ace/mode-wollok.js
M modules/ace/mode-xml.js
A modules/ace/snippets/fortran.js
A modules/ace/snippets/gobstones.js
M modules/ace/snippets/mask.js
A modules/ace/snippets/nsis.js
A modules/ace/snippets/razor.js
A modules/ace/snippets/rst.js
M modules/ace/snippets/swift.js
A modules/ace/snippets/wollok.js
M modules/ace/worker-coffee.js
M modules/ace/worker-css.js
M modules/ace/worker-html.js
M modules/ace/worker-javascript.js
M modules/ace/worker-json.js
M modules/ace/worker-lua.js
M modules/ace/worker-php.js
M modules/ace/worker-xml.js
M modules/ace/worker-xquery.js
100 files changed, 10,101 insertions(+), 2,665 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00a673ce98e7e7d9e4a421a8e663087753e2a476
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
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] Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngin... - change (integration/jenkins)

2016-02-26 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine 
for speed""
..

Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine for speed""

This reverts commit 65a0c26972b097a4484327d5fe2790d486744599.

Change-Id: I114b9ed7f05df369da52375c392d0232f90f9cbc
---
A mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/54/273554/1

diff --git a/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php 
b/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
new file mode 100644
index 000..541aa41
--- /dev/null
+++ b/mediawiki/conf.d/51_set_wgScribuntoDefaultEngine.php
@@ -0,0 +1,10 @@
+https://gerrit.wikimedia.org/r/273554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I114b9ed7f05df369da52375c392d0232f90f9cbc
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] Use sync writes for replication of 'store' operations - change (mediawiki/core)

2016-02-26 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Use sync writes for replication of 'store' operations
..

Use sync writes for replication of 'store' operations

The local temporary file might not live long enough to be
copied into storage during post-send.

Bug: T128124
Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
---
M includes/filebackend/FileBackendMultiWrite.php
1 file changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/273553/1

diff --git a/includes/filebackend/FileBackendMultiWrite.php 
b/includes/filebackend/FileBackendMultiWrite.php
index 3841f2e..edb4059 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -199,7 +199,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, 
$backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && 
!$this->hasStoreOperation( $ops ) ) {
// Bind $scopeLock to the callback to 
preserve locks
DeferredUpdates::addCallableUpdate(
function() use ( $backend, 
$realOps, $opts, $scopeLock ) {
@@ -467,6 +467,20 @@
);
}
 
+   /**
+* @param array $ops File operation batch map
+* @return bool
+*/
+   protected function hasStoreOperation( array $ops ) {
+   foreach ( $ops as $op ) {
+   if ( $op['op'] === 'store' ) {
+   return true;
+   }
+   }
+
+   return false;
+   }
+
protected function doQuickOperationsInternal( array $ops ) {
$status = Status::newGood();
// Do the operations on the master backend; setting Status 
fields...
@@ -480,7 +494,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, $backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && !$this->hasStoreOperation( 
$ops ) ) {
DeferredUpdates::addCallableUpdate(
function() use ( $backend, $realOps ) {
$backend->doQuickOperations( 
$realOps );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] add running puppet to the deployment script - change (operations...wikistats)

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

Change subject: add running puppet to the deployment script
..


add running puppet to the deployment script

Before deploying one has to run puppet and it's easy
to forget. So let this script do the puppet run to make sure.

Change-Id: I9cd2b9e1a311a75a793645c224bf5faff4dd5aad
---
M usr/local/bin/wikistats/deploy-wikistats
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/usr/local/bin/wikistats/deploy-wikistats 
b/usr/local/bin/wikistats/deploy-wikistats
index a5645ae..79550e7 100755
--- a/usr/local/bin/wikistats/deploy-wikistats
+++ b/usr/local/bin/wikistats/deploy-wikistats
@@ -11,6 +11,8 @@
 
 function deploy {
 
+  echo -e "\nfirst running puppet to git pull\n"
+  sudo puppet agent -tv
   echo -e "\ndeploying files from git repository (${pp}/${pn})\n"
 
   for dp in "${dps[@]}"; do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9cd2b9e1a311a75a793645c224bf5faff4dd5aad
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add running puppet to the deployment script - change (operations...wikistats)

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

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

Change subject: add running puppet to the deployment script
..

add running puppet to the deployment script

Before deploying one has to run puppet and it's easy
to forget. So let this script do the puppet run to make sure.

Change-Id: I9cd2b9e1a311a75a793645c224bf5faff4dd5aad
---
M usr/local/bin/wikistats/deploy-wikistats
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/52/273552/1

diff --git a/usr/local/bin/wikistats/deploy-wikistats 
b/usr/local/bin/wikistats/deploy-wikistats
index a5645ae..79550e7 100755
--- a/usr/local/bin/wikistats/deploy-wikistats
+++ b/usr/local/bin/wikistats/deploy-wikistats
@@ -11,6 +11,8 @@
 
 function deploy {
 
+  echo -e "\nfirst running puppet to git pull\n"
+  sudo puppet agent -tv
   echo -e "\ndeploying files from git repository (${pp}/${pn})\n"
 
   for dp in "${dps[@]}"; do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cd2b9e1a311a75a793645c224bf5faff4dd5aad
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] [PictureGame] Add dependance on extension SocialProfile - change (integration/config)

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

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

Change subject: [PictureGame] Add dependance on extension SocialProfile
..

[PictureGame] Add dependance on extension SocialProfile

Per I0e96f60457b8dafdfac466fb6dfd75b5d4b0a3b6

Change-Id: I3292978cb96e8f786a4de56a02ff368f1448e634
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/51/273551/1

diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 8c50499..61854ac 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -79,6 +79,7 @@
'PhpTagsWidgets'],
 'PhpTagsWidgets': ['PhpTags', 'PhpTagsFunctions', 'PhpTagsWiki'],
 'PhpTagsWiki': ['PhpTags', 'PhpTagsFunctions'],
+'PictureGame': ['SocialProfile'],
 'PronunciationRecording': ['UploadWizard'],
 'ProofreadPage': ['LabeledSectionTransclusion'],
 'QuickSurveys': ['EventLogging'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3292978cb96e8f786a4de56a02ff368f1448e634
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] [Less] Archive repo - change (integration/config)

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

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

Change subject: [Less] Archive repo
..

[Less] Archive repo

Per https://gerrit.wikimedia.org/r/#/c/190709/

Bug: T127362
Change-Id: I52fd10f80584e4b959ba77c7a003b23422471563
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/50/273550/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index cbad101..b633062 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -486,7 +486,6 @@
   - mwext-JSBreadCrumbs
   - mwext-JsonData
   - mwext-LanguageSelector
-  - mwext-Less
   - mwext-LifeWeb
   - mwext-LifeWebCore
   - mwext-LightweightRDFa
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 72e3f40..c96e513 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4677,8 +4677,7 @@
 
   - name: mediawiki/extensions/Less
 template:
-  - name: extension-jslint
-  - name: extension-unittests-generic
+  - name: archived
 
   - name: mediawiki/extensions/LifeWeb
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52fd10f80584e4b959ba77c7a003b23422471563
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] Reenable the dashboard - change (analytics/limn-edit-data)

2016-02-26 Thread Neil P. Quinn-WMF (Code Review)
Neil P. Quinn-WMF has uploaded a new change for review.

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

Change subject: Reenable the dashboard
..

Reenable the dashboard

Turn the lights back on now that we've tamed the edit event logs (T124676).

Bug: T126058
Change-Id: I1e6059c6ed99a601d253eb56726a5087c09f8c9a
---
M edit/config.yaml
1 file changed, 43 insertions(+), 43 deletions(-)


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

diff --git a/edit/config.yaml b/edit/config.yaml
index c1985d0..a94480c 100644
--- a/edit/config.yaml
+++ b/edit/config.yaml
@@ -52,51 +52,51 @@
 
 reportupdater-output: "/a/limn-public-data/metrics"
 
-# reportupdater-reports:
+reportupdater-reports:
 
-# sessions:
-# frequency: days
-# granularity: days
-# timeboxed: true
-# funnel: true
-# starts: 2015-04-01
-# explode_by:
-# wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
-# editor: "visualeditor, wikitext"
+sessions:
+frequency: days
+granularity: days
+timeboxed: true
+funnel: true
+starts: 2015-04-01
+explode_by:
+wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
+editor: "visualeditor, wikitext"
 
-# rates:
-# frequency: days
-# granularity: days
-# timeboxed: true
-# starts: 2015-04-01
-# explode_by:
-# wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
-# editor: "visualeditor, wikitext"
+rates:
+frequency: days
+granularity: days
+timeboxed: true
+starts: 2015-04-01
+explode_by:
+wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
+editor: "visualeditor, wikitext"
 
-# success_by_user_type:
-# frequency: days
-# granularity: days
-# timeboxed: true
-# starts: 2015-04-01
-# explode_by:
-# wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
-# editor: "visualeditor, wikitext"
+success_by_user_type:
+frequency: days
+granularity: days
+timeboxed: true
+starts: 2015-04-01
+explode_by:
+wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki, nowiki, huwiki, fiwiki, viwiki, cawiki, thwiki, 
dawiki, rowiki, elwiki, bgwiki, simplewiki, srwiki, bnwiki, hywiki, urwiki, 
hiwiki, azwiki, knwiki, hrwiki, skwiki, eowiki, etwiki, ltwiki, slwiki, tawiki, 
tlwiki, mswiki, bewiki, glwiki, shwiki"
+editor: "visualeditor, wikitext"
 
-# failure_rates_by_type:
-# frequency: days
-# granularity: days
-# timeboxed: true
-# starts: 2015-04-01
-# explode_by:
-# wiki: "all, enwiki, dewiki, eswiki, frwiki, jawiki, ruwiki, 
itwiki, ptwiki, zhwiki, plwiki, nlwiki, arwiki, trwiki, fawiki, svwiki, kowiki, 
idwiki, hewiki, ukwiki, cswiki,

[MediaWiki-commits] [Gerrit] Replace jslint test with jshint and jsonlint tests - change (integration/config)

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

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

Change subject: Replace jslint test with jshint and jsonlint tests
..

Replace jslint test with jshint and jsonlint tests

[LinkFilter]
* I62abfe89f17f90b1836b2f11d9512e8d6c7f102e

[Spark]
* I46a8b794c46b823cf820cde1ba20a36ed104fc11

[ReassignEdits]
* Ie33ef61d77e554fd2a566e6ec98bd82dbfe597ad

[CreatePage]
* Ifabf9f33d3069ef98b231b9d673b795a2a4476c1

[FormatDates]
* I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9

[Mpdf]
* I2ff208561e49e3b39ee6e281b20c2c0808ee5145

[IfTemplates]
* Id4bac7db19777b842b388689c463d187be8559d8

[UserStatus]
* Id4c5e4cb997eb4668b45616b2bf4445add0e37a1

[HelpCommons]
* I97cd10b418bb1aa63214c6995139f387660b8b70

[JSBreadCrumbs]
* I12ec03a15a114ef8144a5456998d249c891e9352

[StalkerLog]
* I7782941a22065d5127a2b764e78942cda51001b6

[Persona]
* Ifd8d9309ba27f9a00383f4a5b85aa87015257de9

[FlvHandler]
* I107ea3cb7735ac901eaee6d763285433f587f387

[ScanSet]
* Id2471869a6eb4a00ec4bc4c119e7019a85367112

[Widgets]
* Ib71429022049b80f1c20ca7704f5218c2249b374

[OfflineImportLexicon]
* I14d2d4e203db9464ed75bc8555c258459f57707a

[Negref]
* I3388e9a493ca3fb3b364275e824389dc6cccbeb9

[FanBoxes]
* I8b22128e7549bba4db5b9fd907ce57405dd00934

[HostStats]
* I04d6d7a4785a0365313408329995b285e62eb927

[PanScroll]
* Id24c69b1e71323230639ee9374ada57284094dac

[PageDisqus]
* Id22ab53ac965d2cd23e87f09473792d0a1a10ae6

[OnlineStatusBar]
* I4eaba232ae9b39ce52a3e3d05a90501d3c79d02b

[HTMLTags]
* Ib64529bc291ceb003b5323eb834506a668cca226

[EnhanceContactForm]
* I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9

[LockDownEnglishPages]
* I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9

[LogEntry]
* I2278b125a374b9d0ca10afc3ff10d45159b88a2a

[Duplicator]
* Ie53cc62039b661414bc431517d2d101f484b7b81

[PictureGame]
* I0e96f60457b8dafdfac466fb6dfd75b5d4b0a3b6

[ListSignup]
* Iac4d083fbad208956e9683041e47413b821abc92

[PurgeClickThrough]
* I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9

[WebPlatformSearchAutocomplete]
* I5aacd3e0096b79fc7d036877c16d24b61e4e4be3

[DataTransfer]
* Ie1ec3d3a213e7cb2132563259735c7ceb09fef81

[RandomImageByCategory]
* I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9

[DeleteOwn]
* I33fecadf46608784ad4fae538bfab5a9418384e6

[ProtectSite]
* I53dc37e5271b105e5f61ac9173ff10fb926078d6

[RelationLinks]
* I1ef0a2c51fcaa0990fc3662cb31413f9eed80cec

[Genderize]
* I43a14bdba6f24230850e8a7f1d5a23af85036cc3

[PubSubHubbub]
* Ie1fd0f44fe751f6ea95e44f9e79143816887f300

[SiteMetrics]
* I0cd5b754805bab367c3a6285faa1d3d6e7d3413b

Bug: T127362
Change-Id: Iaa09b8d0ffb0b23586630b76299c46ebcc98c27f
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 80 insertions(+), 81 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/48/273548/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index cbad101..c72f9d1 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -440,11 +440,8 @@
   - mwext-CommunityVoice
   - mwext-Contest
   - mwext-Convert2Wiki
-  - mwext-CreatePage
   - mwext-CSS
   - mwext-CustomUserSignup
-  - mwext-DataTransfer
-  - mwext-DeleteOwn
   - mwext-DeviceMapLogCapture
   - mwext-Diagnosis
   - mwext-Dice
@@ -454,47 +451,31 @@
   - mwext-DownloadCounter
   - mwext-Drafts
   - mwext-DumpHTML
-  - mwext-Duplicator
   - mwext-EditSubpages
-  - mwext-EnhanceContactForm
   - mwext-ErrorHandler
   - mwext-ExternalData
   - mwext-ExtraLanguageLink
   - mwext-ExtTab
-  - mwext-FanBoxes
   - mwext-FilterListUsers
-  - mwext-FlvHandler
-  - mwext-FormatDates
   - mwext-FormatNum
   - mwext-FormelApplet
   - mwext-FundraisingChart
-  - mwext-Genderize
   - mwext-GlobalNotice
   - mwext-GoogleMaps
   - mwext-HashTables
   - mwext-HeaderTabs
-  - mwext-HelpCommons
-  - mwext-HostStats
   - mwext-Hovergallery
   - mwext-HTMLets
-  - mwext-HTMLTags
   - mwext-IframePage
-  - mwext-IfTemplates
   - mwext-ImageLink
   - mwext-InlineCategorizer
-  - mwext-Interlanguage
-  - mwext-JSBreadCrumbs
   - mwext-JsonData
   - mwext-LanguageSelector
   - mwext-Less
   - mwext-LifeWeb
   - mwext-LifeWebCore
   - mwext-LightweightRDFa
-  - mwext-LinkFilter
-  - mwext-ListSignup
   - mwext-LiveTranslate
-  - mwext-LockDownEnglishPages
-  - mwext-LogEntry
   - mwext-LookupUser
   - mwext-LoopFunctions
   - mwext-MagicNoCache
@@ -504,36 +485,25 @@
   - mwext-Minifier
   - mwext-Model
   - mwext-Moodle
-  - mwext

[MediaWiki-commits] [Gerrit] Support Vega2 graphs in VE - change (mediawiki...Graph)

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

Change subject: Support Vega2 graphs in VE
..


Support Vega2 graphs in VE

- VE now exclusively renders Vega 2 graphs
- Legacy graphs are now tagged with mw-graph-vega1 class and aren't rendered
  anymore by VE

Bug: T122750
Change-Id: I94e017ff2b6af484307966922c4fa05bca839a2f
---
M modules/ve-graph/tests/ext.graph.visualEditor.test.js
M modules/ve-graph/ve.ce.MWGraphNode.js
M modules/ve-graph/ve.dm.MWGraphNode.js
3 files changed, 40 insertions(+), 42 deletions(-)

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



diff --git a/modules/ve-graph/tests/ext.graph.visualEditor.test.js 
b/modules/ve-graph/tests/ext.graph.visualEditor.test.js
index fd53477..5135390 100644
--- a/modules/ve-graph/tests/ext.graph.visualEditor.test.js
+++ b/modules/ve-graph/tests/ext.graph.visualEditor.test.js
@@ -11,7 +11,7 @@
 
var sampleSpecs = {
areaGraph: {
-   version: 1,
+   version: 2,
width: 500,
height: 200,
padding: {
@@ -39,7 +39,7 @@
zero: false,
domain: {
data: 'table',
-   field: 'data.x'
+   field: 'x'
}
},
{
@@ -49,7 +49,7 @@
nice: true,
domain: {
data: 'table',
-   field: 'data.y'
+   field: 'y'
}
}
],
@@ -76,11 +76,11 @@
},
x: {
scale: 'x',
-   field: 'data.x'
+   field: 'x'
},
y: {
scale: 'y',
-   field: 'data.y'
+   field: 'y'
},
y2: {
scale: 'y',
@@ -96,7 +96,7 @@
},
 
stackedAreaGraph: {
-   version: 1,
+   version: 2,
width: 500,
height: 200,
padding: {
@@ -138,12 +138,12 @@
{
type: 'facet',
keys: [
-   'data.x'
+   'x'
]
},
{
type: 'stats',
-   value: 'data.y'
+   value: 'y'
}
]
}
@@ -156,7 +156,7 @@
zero: false,
domain: {
data: 'table',
-   field: 'data.x'
+   field: 'x'
}
},
{
@@ -194,13 +194,13 @@
{
type: 'facet',
keys: [
-   'data.c'
+   'c'
]
},
 

[MediaWiki-commits] [Gerrit] Improve sendMessages.php - change (mediawiki...MassMessage)

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

Change subject: Improve sendMessages.php
..


Improve sendMessages.php

* make sure the script can be executed standalone
* use tab instead of a literal "\t" for separating username and wiki
* finish log messages with newline

Change-Id: If87fb43cb7aa45207e66b9a9b52ea6e04181f920
---
M maintenance/sendMessages.php
1 file changed, 11 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/sendMessages.php b/maintenance/sendMessages.php
index 99c6710..cc4bf77 100644
--- a/maintenance/sendMessages.php
+++ b/maintenance/sendMessages.php
@@ -25,15 +25,15 @@
foreach ( array( 'pagelist', 'subject', 'message' ) as $arg ) {
$option = $this->getOption( $arg );
if ( !is_file( $this->getOption( $arg ) ) ) {
-   $this->error( "Error: required argument $arg 
was passed an invalid filename.", 1 );
+   $this->error( "Error: required argument $arg 
was passed an invalid filename.\n", 1 );
}
 
if ( $arg !== 'pagelist' ) {
$contents = file_get_contents( $option );
if ( $contents !== false ) {
-   $info[$arg] = $contents;
+   $info[$arg] = trim( $contents );
} else {
-   $this->error( "Error: Unable to read 
$option.", 1 );
+   $this->error( "Error: Unable to read 
$option.\n", 1 );
}
}
}
@@ -41,16 +41,16 @@
$list = $this->getOption( 'pagelist' );
$file = fopen( $list, 'r' );
if ( $file === false ) {
-   $this->error( "Error: could not open pagelist file: 
\"$list\".", 1 );
+   $this->error( "Error: could not open pagelist file: 
\"$list\".\n", 1 );
}
 
$pages = array();
-   $this->output( "Reading from \"$list\"." );
+   $this->output( "Reading from \"$list\".\n" );
 
// @codingStandardsIgnoreStart
while ( $line = trim( fgets( $file ) ) ) {
// @codingStandardsIgnoreEnd
-   $exp = explode( '\t', $line );
+   $exp = explode( "\t", $line );
$pages[] = array(
'title' => $exp[0],
'wiki' => $exp[1],
@@ -72,6 +72,10 @@
);
$submitJob->run(); // Just insert the individual jobs into the 
queue now.
$count = count( $pages );
-   $this->output( "Queued $count jobs. Done!" );
+   $this->output( "Queued $count jobs. Done!\n" );
}
 }
+
+$maintClass = 'SendMassMessages';
+require_once RUN_MAINTENANCE_IF_MAIN;
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If87fb43cb7aa45207e66b9a9b52ea6e04181f920
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Wctaiwan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Provide three more edit threshold congratulatory notifications - change (mediawiki...Echo)

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

Change subject: Provide three more edit threshold congratulatory notifications
..


Provide three more edit threshold congratulatory notifications

Change-Id: Icd213fe7dd7ab8451432d35d6ee289c49449d5d1
---
M Hooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/Hooks.php b/Hooks.php
index 03f07b4..9c9bd98 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -454,7 +454,7 @@
 
// If the user is not an IP and this is not a null edit,
// test for them reaching a congratulatory threshold
-   $thresholds = array( 1, 10, 100, 1000 );
+   $thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ];
if ( $user->isLoggedIn() && $status->value['revision'] ) {
// This edit hasn't been added to the edit count yet
$editCount = $user->getEditCount() + 1;
diff --git a/i18n/en.json b/i18n/en.json
index 8c74bdb..a7fac98 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -108,6 +108,9 @@
"notification-header-thank-you-10-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} tenth edit; thank {{GENDER:$2|you}}, and please keep going!",
"notification-header-thank-you-100-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} hundredth edit; thank {{GENDER:$2|you}} very much!",
"notification-header-thank-you-1000-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} thousandth edit; thank {{GENDER:$2|you}} for being a great 
contributor!",
+   "notification-header-thank-you-1-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} ten thousandth edit; thank {{GENDER:$2|you}} so very 
much!",
+   "notification-header-thank-you-10-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} hundred thousandth edit; thank {{GENDER:$2|you}} for an 
amazing contribution!",
+   "notification-header-thank-you-100-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} millionth edit; thank {{GENDER:$2|you}} for an 
astonishing contribution!",
"notification-link-thank-you-edit": "{{GENDER:$1|Your}} edit",
"notification-reverted2": "Your {{PLURAL:$4|edit on [[:$2]] has|edits 
on [[:$2]] have}} been {{GENDER:$1|reverted}} by [[$5|$1]]. $3",
"notification-header-reverted": "Your {{PLURAL:$4|edit on '''$3''' 
was|edits on '''$3''' were}} {{GENDER:$2|reverted}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3bdc8d7..c94582b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -129,6 +129,9 @@
"notification-header-thank-you-10-edit": "Text of the editor welcome 
notification for their tenth edit.\nParameters:\n* $1 - the formatted username 
of the new user\n* $2 - the username for gender purposes",
"notification-header-thank-you-100-edit": "Text of the editor welcome 
notification for their hundredth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
"notification-header-thank-you-1000-edit": "Text of the editor welcome 
notification for their thousandth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
+   "notification-header-thank-you-1-edit": "Text of the editor welcome 
notification for their ten thousandth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
+   "notification-header-thank-you-10-edit": "Text of the editor 
welcome notification for their hundred thousandth edit.\nParameters:\n* $1 - 
the formatted username of the new user\n* $2 - the username for gender 
purposes",
+   "notification-header-thank-you-100-edit": "Text of the editor 
welcome notification for their millionth edit.\nParameters:\n* $1 - the 
formatted username of the new user\n* $2 - the username for gender purposes",
"notification-link-thank-you-edit": "Label for the link to the user's 
edit which triggered a threshold congratulations message.\nParameters:\n* $1 - 
the username for gender purposes",
"notification-reverted2": "Format for displaying notifications of a 
user's edit being reverted. Parameters:\n* $1 - the username of the person who 
reverted, plain text. Can be used for GENDER.\n* $2 - the page that was 
reverted, formatted\n* $3 - a diff link which is labeled {{msg-mw|Showdiff}}\n* 
$4 - the number of edits that were reverted. NOTE: This will only be set to 1 
or 2, with 2 actually meaning 'an unknown number greater than 0'.\n* $5 - Page 
for reverting user.\nUser page if logged in, or user's contributions page if 
logged out.\n{{Related|Notification-reverted}}",
"notification-header-reverted": "Notification header of a user's edit 
being reverted.\n\nParameters:\n* $1 - the forma

[MediaWiki-commits] [Gerrit] Improve sendMessages.php - change (mediawiki...MassMessage)

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

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

Change subject: Improve sendMessages.php
..

Improve sendMessages.php

* make sure the script can be executed standalone
* use tab instead of a literal "\t" for separating username and wiki
* finish log messages with newline

Change-Id: If87fb43cb7aa45207e66b9a9b52ea6e04181f920
---
M maintenance/sendMessages.php
1 file changed, 11 insertions(+), 7 deletions(-)


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

diff --git a/maintenance/sendMessages.php b/maintenance/sendMessages.php
index 99c6710..cc4bf77 100644
--- a/maintenance/sendMessages.php
+++ b/maintenance/sendMessages.php
@@ -25,15 +25,15 @@
foreach ( array( 'pagelist', 'subject', 'message' ) as $arg ) {
$option = $this->getOption( $arg );
if ( !is_file( $this->getOption( $arg ) ) ) {
-   $this->error( "Error: required argument $arg 
was passed an invalid filename.", 1 );
+   $this->error( "Error: required argument $arg 
was passed an invalid filename.\n", 1 );
}
 
if ( $arg !== 'pagelist' ) {
$contents = file_get_contents( $option );
if ( $contents !== false ) {
-   $info[$arg] = $contents;
+   $info[$arg] = trim( $contents );
} else {
-   $this->error( "Error: Unable to read 
$option.", 1 );
+   $this->error( "Error: Unable to read 
$option.\n", 1 );
}
}
}
@@ -41,16 +41,16 @@
$list = $this->getOption( 'pagelist' );
$file = fopen( $list, 'r' );
if ( $file === false ) {
-   $this->error( "Error: could not open pagelist file: 
\"$list\".", 1 );
+   $this->error( "Error: could not open pagelist file: 
\"$list\".\n", 1 );
}
 
$pages = array();
-   $this->output( "Reading from \"$list\"." );
+   $this->output( "Reading from \"$list\".\n" );
 
// @codingStandardsIgnoreStart
while ( $line = trim( fgets( $file ) ) ) {
// @codingStandardsIgnoreEnd
-   $exp = explode( '\t', $line );
+   $exp = explode( "\t", $line );
$pages[] = array(
'title' => $exp[0],
'wiki' => $exp[1],
@@ -72,6 +72,10 @@
);
$submitJob->run(); // Just insert the individual jobs into the 
queue now.
$count = count( $pages );
-   $this->output( "Queued $count jobs. Done!" );
+   $this->output( "Queued $count jobs. Done!\n" );
}
 }
+
+$maintClass = 'SendMassMessages';
+require_once RUN_MAINTENANCE_IF_MAIN;
+

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

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

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


[MediaWiki-commits] [Gerrit] Update language list and templates - change (apps...wikipedia)

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

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

Change subject: Update language list and templates
..

Update language list and templates

Run generate_wiki_languages.py and make-templates.py.

Change-Id: I9825317fed0a433feac6d9024b2b05bc5d7e9bfe
---
M app/src/main/java/org/wikipedia/staticdata/FileAliasData.java
M app/src/main/java/org/wikipedia/staticdata/MainPageNameData.java
M app/src/main/java/org/wikipedia/staticdata/SpecialAliasData.java
M app/src/main/res/values/languages_list.xml
4 files changed, 383 insertions(+), 377 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/staticdata/FileAliasData.java 
b/app/src/main/java/org/wikipedia/staticdata/FileAliasData.java
index 6286ec4..7a4d26d 100644
--- a/app/src/main/java/org/wikipedia/staticdata/FileAliasData.java
+++ b/app/src/main/java/org/wikipedia/staticdata/FileAliasData.java
@@ -11,14 +11,14 @@
 
 @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"})
 private static void setupData() {
-final int size = 294;
+final int size = 295;
 DATA_MAP = new HashMap<>(size, 1.0f);
 DATA_MAP.put("en", "File");
 DATA_MAP.put("sv", "Fil");
+DATA_MAP.put("ceb", "Payl");
 DATA_MAP.put("de", "Datei");
 DATA_MAP.put("nl", "Bestand");
 DATA_MAP.put("fr", "Fichier");
-DATA_MAP.put("ceb", "Payl");
 DATA_MAP.put("ru", "Файл");
 DATA_MAP.put("war", "Paypay");
 DATA_MAP.put("it", "File");
@@ -33,8 +33,8 @@
 DATA_MAP.put("uk", "Файл");
 DATA_MAP.put("ca", "Fitxer");
 DATA_MAP.put("fa", "پرونده");
-DATA_MAP.put("sh", "Datoteka");
 DATA_MAP.put("no", "Fil");
+DATA_MAP.put("sh", "Datoteka");
 DATA_MAP.put("ar", "ملف");
 DATA_MAP.put("fi", "Tiedosto");
 DATA_MAP.put("hu", "Fájl");
@@ -45,9 +45,9 @@
 DATA_MAP.put("sr", "Датотека");
 DATA_MAP.put("ms", "Fail");
 DATA_MAP.put("tr", "Dosya");
+DATA_MAP.put("eu", "Fitxategi");
 DATA_MAP.put("eo", "Dosiero");
 DATA_MAP.put("min", "Berkas");
-DATA_MAP.put("eu", "Fitxategi");
 DATA_MAP.put("kk", "Сурет");
 DATA_MAP.put("da", "Fil");
 DATA_MAP.put("bg", "Файл");
@@ -58,21 +58,21 @@
 DATA_MAP.put("hr", "Datoteka");
 DATA_MAP.put("sl", "Slika");
 DATA_MAP.put("et", "Pilt");
-DATA_MAP.put("uz", "Fayl");
+DATA_MAP.put("zh-min-nan", "tóng-àn");
 DATA_MAP.put("gl", "Ficheiro");
+DATA_MAP.put("uz", "Fayl");
 DATA_MAP.put("nn", "Fil");
 DATA_MAP.put("la", "Fasciculus");
 DATA_MAP.put("vo", "Ragiv");
-DATA_MAP.put("simple", "File");
 DATA_MAP.put("ce", "Файл");
+DATA_MAP.put("simple", "File");
 DATA_MAP.put("el", "Αρχείο");
 DATA_MAP.put("be", "Файл");
-DATA_MAP.put("ka", "ფაილი");
 DATA_MAP.put("az", "Şəkil");
+DATA_MAP.put("ka", "ფაილი");
+DATA_MAP.put("ur", "ملف");
 DATA_MAP.put("hi", "चित्र");
 DATA_MAP.put("th", "ไฟล์");
-DATA_MAP.put("zh-min-nan", "tóng-àn");
-DATA_MAP.put("ur", "ملف");
 DATA_MAP.put("oc", "Fichièr");
 DATA_MAP.put("mk", "Податотека");
 DATA_MAP.put("ta", "படிமம்");
@@ -82,35 +82,35 @@
 DATA_MAP.put("tt", "Файл");
 DATA_MAP.put("bs", "Datoteka");
 DATA_MAP.put("lv", "Attēls");
+DATA_MAP.put("te", "దస్త్రం");
 DATA_MAP.put("tl", "Talaksan");
 DATA_MAP.put("pms", "Figura");
-DATA_MAP.put("te", "దస్త్రం");
 DATA_MAP.put("be-tarask", "Файл");
 DATA_MAP.put("br", "Restr");
-DATA_MAP.put("ht", "Fichye");
-DATA_MAP.put("sq", "Skeda");
-DATA_MAP.put("jv", "Gambar");
 DATA_MAP.put("ky", "Файл");
+DATA_MAP.put("sq", "Skeda");
+DATA_MAP.put("ht", "Fichye");
+DATA_MAP.put("jv", "Gambar");
 DATA_MAP.put("ast", "Ficheru");
 DATA_MAP.put("lb", "Fichier");
 DATA_MAP.put("mr", "चित्र");
 DATA_MAP.put("zh-yue", "File");
 DATA_MAP.put("ml", "പ്രമാണം");
-DATA_MAP.put("is", "Mynd");
-DATA_MAP.put("tg", "Акс");
 DATA_MAP.put("bn", "চিত্র");
+DATA_MAP.put("pnb", "فائل");
+DATA_MAP.put("tg", "Акс");
+DATA_MAP.put("is", "Mynd");
 DATA_MAP.put("af", "Lêer");
 DATA_MAP.put("ga", "Íomhá");
-DATA_MAP.put("pnb", "فائل");
 DATA_MAP.put("sco", "File");
 DATA_MAP.put("ba", "Файл");
 DATA_MAP.put("cv", "Ӳкерчĕк");
 DATA_MAP.put("fy", "Ofbyld");
 DATA_MAP.put("lmo", "Archivi");
-DATA_MAP.put("my", "File");
 DATA_MAP.put("sw", "Picha");
-DATA_MAP.put("yo", "Fáìlì");

[MediaWiki-commits] [Gerrit] Don't use a hard-coded array of thresholds but impute it - change (mediawiki...Echo)

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

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

Change subject: Don't use a hard-coded array of thresholds but impute it
..

Don't use a hard-coded array of thresholds but impute it

This misled people into thinking the thresholds were automatic and didn't
need to be set this way, but instead could be varied. They aren't, and
you can't.

Change-Id: I4b70ff25ec94c7b451307bea20f16811ebc2774a
---
M Hooks.php
1 file changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/44/273544/1

diff --git a/Hooks.php b/Hooks.php
index 9c9bd98..8620fda 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -454,11 +454,20 @@
 
// If the user is not an IP and this is not a null edit,
// test for them reaching a congratulatory threshold
-   $thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ];
if ( $user->isLoggedIn() && $status->value['revision'] ) {
// This edit hasn't been added to the edit count yet
$editCount = $user->getEditCount() + 1;
-   if ( in_array( $editCount, $thresholds ) ) {
+   // Order of Magnitude in base 10 of the user's edit 
count
+   $userEditOrder = log( $editCount, 10 );
+   if (
+   // Skip if the users has made no edits 
(shouldn't occur; defensive coding)
+   is_finite( $userEditOrder ) &&
+   // Skip if this isn't a power of 10 (checking 
with a tolerance of 1e-9 because
+   // 3-log(1000, 10) == 4.44e-16 before PHP7)
+   ( abs( round( $userEditOrder ) - $userEditOrder 
) < 1e-9 ) &&
+   // Skip if this is a very high power of 10 for 
which we don't have a message
+   $userEditOrder < 7
+   ) {
DeferredUpdates::addCallableUpdate( function () 
use ( $user, $title, $editCount ) {
EchoEvent::create( array(
'type' => 
'thank-you-edit',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b70ff25ec94c7b451307bea20f16811ebc2774a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Provide three more edit threshold congratulatory notifications - change (mediawiki...Echo)

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

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

Change subject: Provide three more edit threshold congratulatory notifications
..

Provide three more edit threshold congratulatory notifications

Change-Id: Icd213fe7dd7ab8451432d35d6ee289c49449d5d1
---
M Hooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/Hooks.php b/Hooks.php
index 03f07b4..9c9bd98 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -454,7 +454,7 @@
 
// If the user is not an IP and this is not a null edit,
// test for them reaching a congratulatory threshold
-   $thresholds = array( 1, 10, 100, 1000 );
+   $thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ];
if ( $user->isLoggedIn() && $status->value['revision'] ) {
// This edit hasn't been added to the edit count yet
$editCount = $user->getEditCount() + 1;
diff --git a/i18n/en.json b/i18n/en.json
index 8c74bdb..a7fac98 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -108,6 +108,9 @@
"notification-header-thank-you-10-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} tenth edit; thank {{GENDER:$2|you}}, and please keep going!",
"notification-header-thank-you-100-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} hundredth edit; thank {{GENDER:$2|you}} very much!",
"notification-header-thank-you-1000-edit": "{{GENDER:$2|You}} just made 
{{GENDER:$2|your}} thousandth edit; thank {{GENDER:$2|you}} for being a great 
contributor!",
+   "notification-header-thank-you-1-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} ten thousandth edit; thank {{GENDER:$2|you}} so very 
much!",
+   "notification-header-thank-you-10-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} hundred thousandth edit; thank {{GENDER:$2|you}} for an 
amazing contribution!",
+   "notification-header-thank-you-100-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} millionth edit; thank {{GENDER:$2|you}} for an 
astonishing contribution!",
"notification-link-thank-you-edit": "{{GENDER:$1|Your}} edit",
"notification-reverted2": "Your {{PLURAL:$4|edit on [[:$2]] has|edits 
on [[:$2]] have}} been {{GENDER:$1|reverted}} by [[$5|$1]]. $3",
"notification-header-reverted": "Your {{PLURAL:$4|edit on '''$3''' 
was|edits on '''$3''' were}} {{GENDER:$2|reverted}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3bdc8d7..c94582b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -129,6 +129,9 @@
"notification-header-thank-you-10-edit": "Text of the editor welcome 
notification for their tenth edit.\nParameters:\n* $1 - the formatted username 
of the new user\n* $2 - the username for gender purposes",
"notification-header-thank-you-100-edit": "Text of the editor welcome 
notification for their hundredth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
"notification-header-thank-you-1000-edit": "Text of the editor welcome 
notification for their thousandth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
+   "notification-header-thank-you-1-edit": "Text of the editor welcome 
notification for their ten thousandth edit.\nParameters:\n* $1 - the formatted 
username of the new user\n* $2 - the username for gender purposes",
+   "notification-header-thank-you-10-edit": "Text of the editor 
welcome notification for their hundred thousandth edit.\nParameters:\n* $1 - 
the formatted username of the new user\n* $2 - the username for gender 
purposes",
+   "notification-header-thank-you-100-edit": "Text of the editor 
welcome notification for their millionth edit.\nParameters:\n* $1 - the 
formatted username of the new user\n* $2 - the username for gender purposes",
"notification-link-thank-you-edit": "Label for the link to the user's 
edit which triggered a threshold congratulations message.\nParameters:\n* $1 - 
the username for gender purposes",
"notification-reverted2": "Format for displaying notifications of a 
user's edit being reverted. Parameters:\n* $1 - the username of the person who 
reverted, plain text. Can be used for GENDER.\n* $2 - the page that was 
reverted, formatted\n* $3 - a diff link which is labeled {{msg-mw|Showdiff}}\n* 
$4 - the number of edits that were reverted. NOTE: This will only be set to 1 
or 2, with 2 actually meaning 'an unknown number greater than 0'.\n* $5 - Page 
for reverting user.\nUser page if logged in, or user's contributions page if 
logged out.\n{{Related|Notification-reverted}}",
"notification-header-reverted": "Notification header of a user's 

[MediaWiki-commits] [Gerrit] [WIP] Avoid async writes for store ops as the tmp file might... - change (mediawiki/core)

2016-02-26 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: [WIP] Avoid async writes for store ops as the tmp file might 
not live long enough
..

[WIP] Avoid async writes for store ops as the tmp file might not live long 
enough

Bug: T128124
Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
---
M includes/filebackend/FileBackendMultiWrite.php
1 file changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/273545/1

diff --git a/includes/filebackend/FileBackendMultiWrite.php 
b/includes/filebackend/FileBackendMultiWrite.php
index 132c4a6..2d27450 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -199,7 +199,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, 
$backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && 
!$this->hasStoreOperation( $ops ) ) {
// Bind $scopeLock to the callback to 
preserve locks
DeferredUpdates::addCallableUpdate(
function() use ( $backend, 
$realOps, $opts, $scopeLock ) {
@@ -467,6 +467,20 @@
);
}
 
+   /**
+* @param array $ops File operation batch map
+* @return bool
+*/
+   protected function hasStoreOperation( array $ops ) {
+   foreach ( $ops as $op ) {
+   if ( $op['op'] === 'store' ) {
+   return true;
+   }
+   }
+
+   return false;
+   }
+
protected function doQuickOperationsInternal( array $ops ) {
$status = Status::newGood();
// Do the operations on the master backend; setting Status 
fields...
@@ -480,7 +494,7 @@
}
 
$realOps = $this->substOpBatchPaths( $ops, $backend );
-   if ( $this->asyncWrites ) {
+   if ( $this->asyncWrites && !$this->hasStoreOperation( 
$ops ) ) {
DeferredUpdates::addCallableUpdate(
function() use ( $backend, $realOps ) {
$backend->doQuickOperations( 
$realOps );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Avoid using "new CentralAuthUser" since it avoids the cache - change (mediawiki...CentralAuth)

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

Change subject: Avoid using "new CentralAuthUser" since it avoids the cache
..


Avoid using "new CentralAuthUser" since it avoids the cache

In the past, caching of CentralAuthUser was on the User object, so
anything that lacked a User object couldn't take advantage of caching.
Others needed to avoid the cache if they weren't sure the User object
wasn't going to be reset to anonymous or to a different name.

This was changed in I4199f56 to use a centralized cache keyed on the
username and independent of the specific User object. So we can now make
use of the caching in all the places where it was avoided before.

Maintenance callers and unit tests have not been updated in this patch.

Change-Id: Idc87313499c04b894308d4d14a578cc683b477f4
---
M includes/CentralAuthGroupMembershipProxy.php
M includes/CentralAuthHooks.php
M includes/CentralAuthPlugin.php
M includes/CentralAuthUser.php
M includes/GlobalRename/GlobalRenameRequest.php
M includes/LocalRenameJob/LocalRenameJob.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
M includes/SuppressUserJob.php
M includes/api/ApiDeleteGlobalAccount.php
M includes/api/ApiQueryGlobalUserInfo.php
M includes/api/ApiSetGlobalAccountStatus.php
M includes/session/CentralAuthSessionCompat.php
M includes/session/CentralAuthSessionProvider.php
M includes/session/CentralAuthTokenSessionProvider.php
M includes/specials/SpecialCentralAuth.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialCentralLogin.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameProgress.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialGlobalRenameUser.php
M includes/specials/SpecialGlobalUserMerge.php
M includes/specials/SpecialMergeAccount.php
M includes/specials/SpecialMultiLock.php
25 files changed, 97 insertions(+), 86 deletions(-)

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



diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index 793d96f..d19fe73 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -37,7 +37,7 @@
 */
public static function newFromName( $name ) {
$name = User::getCanonicalName( $name );
-   $globalUser = new CentralAuthUser( $name );
+   $globalUser = CentralAuthUser::getInstanceByName( $name );
return $globalUser->exists() ? new 
CentralAuthGroupMembershipProxy( $globalUser ) : null;
}
 
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 83fdfb9..6e8d9d0 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -376,7 +376,7 @@
// to check one username.
$newCAUser = $rename[1] === $user->getName()
? $centralUser
-   : new CentralAuthUser( $rename[0] );
+   : CentralAuthUser::getInstanceByName( 
$rename[0] );
 
if ( $newCAUser->isAttached() ) {
// If there is an account using that name that 
exists on this wiki
@@ -424,7 +424,7 @@
// If the local and global accounts don't exist,
// otherwise wgAuth will handle those.
$testName = $user->getName() . '~' . wfWikiID();
-   $test = new CentralAuthUser( $testName );
+   $test = CentralAuthUser::getInstanceByName( 
$testName );
if ( $test->exists() && $test->isAttached() ) {
$msg = array( 
'centralauth-abortlogin-renamed', $testName );
return false;
@@ -758,7 +758,7 @@
 * @throws ErrorPageError
 */
static function onRenameUserWarning( $oldName, $newName, &$warnings ) {
-   $oldCentral = new CentralAuthUser( $oldName, 
CentralAuthUser::READ_LATEST );
+   $oldCentral = CentralAuthUser::getMasterInstanceByName( 
$oldName );
if ( $oldCentral->exists() && $oldCentral->isAttached() ) {
$warnings[] = array( 'centralauth-renameuser-merged', 
$oldName, $newName );
}
@@ -766,7 +766,7 @@
$warnings[] = array( 
'centralauth-renameuser-global-inprogress', $oldName );
}
 
-   $newCentral = new CentralAuthUser( $newName, 
CentralAuthUser::READ_LATEST );
+   $newCentral = CentralAuthUser::getMasterInstanceByName( 
$newName );
if ( $newCentral->exists() && !$newCentral->isAttache

[MediaWiki-commits] [Gerrit] Remove RejectParserCacheValue hook handler - change (mediawiki...MobileFrontend)

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

Change subject: Remove RejectParserCacheValue hook handler
..


Remove RejectParserCacheValue hook handler

The string pattern that the currently-deployed code is searching for is no
longer occurring, and the new code runs the risk of masking the problem without
fixing it.

Change-Id: I19defe45283c4a23d9431fe91a34ae7c32067d4b
---
M extension.json
M includes/MobileFrontend.hooks.php
2 files changed, 0 insertions(+), 21 deletions(-)

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



diff --git a/extension.json b/extension.json
index fd7e954..cfbcf6f 100644
--- a/extension.json
+++ b/extension.json
@@ -1961,9 +1961,6 @@
],
"TitleSquidURLs": [
"MobileFrontendHooks::onTitleSquidURLs"
-   ],
-   "RejectParserCacheValue": [
-   "MobileFrontendHooks::onRejectParserCacheValue"
]
},
"config": {
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index f93958b..7e72b4c 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1333,24 +1333,6 @@
}
 
/**
-* Remove corruption caused by T124356 from the parser cache
-*
-* @param ParserOutput $value
-* @param WikiPage $wikiPage
-* @param ParserOptions $popts
-* @return bool
-*/
-   public static function onRejectParserCacheValue( $value, $wikiPage, 
$popts ) {
-   if ( strpos( $value->getRawText(), 'edit-page' ) !== false ) {
-   // Bug T124356 parser cache corruption
-   RequestContext::getMain()->getStats()->increment( 
'T124356' );
-   return false;
-   }
-
-   return true;
-   }
-
-   /**
 * Handler for Extension registration callback
 */
public static function onRegistration() {

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

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

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


[MediaWiki-commits] [Gerrit] Shift placeholder text from JS to PHP again - change (mediawiki...MobileFrontend)

2016-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Shift placeholder text from JS to PHP again
..

Shift placeholder text from JS to PHP again

Given this was initially done for Opera Mini lower end
devices (which appears to be broken) let's go back to
doing it the sane way. New bug opened for lower end devices
(see T128240)

Bug: T126825
Change-Id: I55d3fe20f60d49b4885dd7f4fb2ec4a768e27bfb
---
M extension.json
M includes/skins/MinervaTemplate.php
M includes/skins/MinervaTemplateBeta.php
M resources/skins.minerva.scripts/search.js
4 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index fd7e954..656f361 100644
--- a/extension.json
+++ b/extension.json
@@ -837,9 +837,7 @@
"parse"
],
"3": "mobile-frontend-search-feedback-prompt",
-   "4": 
"mobile-frontend-search-feedback-link-text",
-   "5": "mobile-frontend-placeholder",
-   "6": "mobile-frontend-placeholder-beta"
+   "4": "mobile-frontend-search-feedback-link-text"
}
},
"mobile.search.api": {
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 3552dee..0e52000 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -89,7 +89,7 @@
'autocomplete' => 'off',
// The placeholder gets fed to HTML::element later 
which escapes all
// attribute values, so need to escape the string here.
-   'placeholder' => '',
+   'placeholder' => wfMessage( 
'mobile-frontend-placeholder' )->escaped(),
);
return $searchBox;
}
diff --git a/includes/skins/MinervaTemplateBeta.php 
b/includes/skins/MinervaTemplateBeta.php
index 8b58e4b..0fd1639 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -9,6 +9,16 @@
  */
 class MinervaTemplateBeta extends MinervaTemplate {
/**
+* Get attributes to create search input
+* @return array Array with attributes for search bar
+*/
+   protected function getSearchAttributes() {
+   $searchBox = parent::getSearchAttributes();
+   $searchBox['placeholder'] = wfMessage( 
'mobile-frontend-placeholder-beta' )->escaped();
+   return $searchBox;
+   }
+
+   /**
 * Get category button if categories are present
 * @return array A map of the button's friendly name, "categories" to 
its
 *   spec if the button can be displayed.
diff --git a/resources/skins.minerva.scripts/search.js 
b/resources/skins.minerva.scripts/search.js
index c068630..c7aaef7 100644
--- a/resources/skins.minerva.scripts/search.js
+++ b/resources/skins.minerva.scripts/search.js
@@ -1,6 +1,5 @@
 ( function ( M, $ ) {
var SearchOverlay, SearchGateway,
-   searchPlaceholderMsg = 'mobile-frontend-placeholder',
context = M.require( 'mobile.context/context' ),
router = M.require( 'mobile.startup/router' ),
browser = M.require( 'mobile.browser/browser' ),
@@ -42,13 +41,6 @@
if ( mw.config.get( 'skin' ) !== 'minerva' ) {
return;
}
-
-   // change the placeholder text for javascript enabled browsers
-   if ( context.isBetaGroupMember() ) {
-   searchPlaceholderMsg = 'mobile-frontend-placeholder-beta';
-   }
-
-   $( '#searchInput' ).attr( 'placeholder', mw.message( 
searchPlaceholderMsg ) );
 
// See https://phabricator.wikimedia.org/T76882 for why we disable 
search on Android 2
if ( browser.isAndroid2() ) {

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

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

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


[MediaWiki-commits] [Gerrit] Adjust styling of the 'more actions' menu items - change (mediawiki...Echo)

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

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

Change subject: Adjust styling of the 'more actions' menu items
..

Adjust styling of the 'more actions' menu items

Bug: T126734
Change-Id: I48924aba5c06ebf1eeccd2a8977150b366f412a7
---
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
M modules/ooui/styles/mw.echo.ui.MenuItemWidget.less
M modules/ooui/styles/mw.echo.ui.overlay.less
3 files changed, 34 insertions(+), 10 deletions(-)


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

diff --git a/modules/ooui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
index 0b4be95..8689fcb 100644
--- a/modules/ooui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
@@ -126,10 +126,10 @@
}
}
// Add a "mark as read" secondary action
-   this.markAsReadSecondary = new OO.ui.ButtonOptionWidget( {
+   this.markAsReadSecondary = new mw.echo.ui.MenuItemWidget( {
icon: 'check',
-   framed: false,
data: 'markAsRead',
+   prioritized: false,
label: mw.msg( 'echo-notification-markasread' ),
classes: [ 
'mw-echo-ui-notificationItemWidget-content-actions-button' ]
} );
diff --git a/modules/ooui/styles/mw.echo.ui.MenuItemWidget.less 
b/modules/ooui/styles/mw.echo.ui.MenuItemWidget.less
index af23505..4c34726 100644
--- a/modules/ooui/styles/mw.echo.ui.MenuItemWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.MenuItemWidget.less
@@ -2,8 +2,6 @@
 @import '../../echo.mixins';
 
 .mw-echo-ui-menuItemWidget {
-   .mw-echo-ui-mixin-hover-opacity;
-
&-icon {
display: inline-block;
// We have to override oojs-ui's width/height, which uses
@@ -22,7 +20,7 @@
// We have to override oojs-ui's color, which uses
// a very specific selector
font-weight: normal !important;
-   color: #000 !important;
+   color: #33 !important;
// Set max-width so buttons are truncated
max-width: 15em;
 
@@ -31,12 +29,37 @@
}
}
 
-   // Correct for when inside the menu
-   .mw-echo-ui-notificationItemWidget-content-actions-menu & {
-   display: block;
-   }
-
&-prioritized {
display: inline-block;
}
+
+   // Correct for when inside the popup menu
+   .mw-echo-ui-actionMenuPopupWidget-menu & {
+   display: block;
+   padding: 0.7em;
+
+   &-icon {
+   // The icon should be 15px, which is 1.1em. However,
+   // ooui icons are surrounded by whitespace. In this 
case,
+   // the whitespace is about 6px out of the original 24px
+   // so the non-whitespace dimensions are 3/4 of the 
total.
+   // So to compensate, the new size should be 1.1em*4/3 = 
1.4em
+   width: 1.4em !important;
+   height: 1.4em !important;
+   // Take into account the padding and subtract half of
+   // the whitespace adjustment of the icon
+   top: 0.7em - 0.3em / 2;
+   }
+
+   &-content {
+   margin-left: 1.4em + 0.7em; // Icon width + 0.7em 
spacing
+   font-weight: bold !important;
+
+   span.oo-ui-labelElement-label {
+   line-height: 1em;
+   }
+   }
+
+   }
+
 }
diff --git a/modules/ooui/styles/mw.echo.ui.overlay.less 
b/modules/ooui/styles/mw.echo.ui.overlay.less
index 437ffb8..66d6765 100644
--- a/modules/ooui/styles/mw.echo.ui.overlay.less
+++ b/modules/ooui/styles/mw.echo.ui.overlay.less
@@ -1,4 +1,5 @@
 .mw-echo-ui-overlay {
+   font-size: 0.875em;
position: absolute;
top: 0;
right: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48924aba5c06ebf1eeccd2a8977150b366f412a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Avoid watchstar rendering from pushing down rest of content - change (mediawiki...MobileFrontend)

2016-02-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Avoid watchstar rendering from pushing down rest of content
..

Avoid watchstar rendering from pushing down rest of content

The watchstar currently only runs with JavaScript enabled but we
should reserve space for it.

Rendering a blank icon allows us to reserve the space for an icon
without associated the glyph

Bug: T126825
Change-Id: Ie0053b2af1c222e890b5feea0a90e5d2835da491
---
M includes/MobileUI.php
M includes/skins/SkinMinerva.php
2 files changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/includes/MobileUI.php b/includes/MobileUI.php
index f159139..3f449c9 100644
--- a/includes/MobileUI.php
+++ b/includes/MobileUI.php
@@ -21,7 +21,9 @@
public static function iconClass( $iconName, $iconType = 'element', 
$additionalClassNames = '' ) {
$base = 'mw-ui-icon';
$modifiers = 'mw-ui-icon-' . $iconType;
-   $modifiers .= ' mw-ui-icon-' . $iconName;
+   if ( $iconName ) {
+   $modifiers .= ' mw-ui-icon-' . $iconName;
+   }
return $base . ' ' . $modifiers . ' ' . $additionalClassNames;
}
 
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ccc810d..37537af 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -814,8 +814,9 @@
if ( $this->isAllowedPageAction( 'watch' ) ) {
$watchTemplate = array(
'id' => 'ca-watch',
-   'class' => MobileUI::iconClass( 'watch', 
'element',
-   'icon-32px watch-this-article hidden' ),
+   // Use blank icon to reserve space for 
watchstar icon once JS loads
+   'class' => MobileUI::iconClass( '', 'element',
+   'icon-32px watch-this-article' ),
);
// standardise watch article into one menu item
if ( isset( $actions['watch'] ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] Add new REST API data loader, which is faster. - change (wikidata...rdf)

2016-02-26 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Add new REST API data loader, which is faster.
..

Add new REST API data loader, which is faster.

Bug: T126956
Change-Id: I79363dc83eea44a1590dd4d3f4098bcab4a8f185
---
A dist/src/script/loadRestAPI.sh
M docs/getting-started.md
2 files changed, 62 insertions(+), 6 deletions(-)


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

diff --git a/dist/src/script/loadRestAPI.sh b/dist/src/script/loadRestAPI.sh
new file mode 100755
index 000..318547b
--- /dev/null
+++ b/dist/src/script/loadRestAPI.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+HOST=http://localhost:
+CONTEXT=bigdata
+LOAD_PROP_FILE=/tmp/$$.properties
+NAMESPACE=wdq
+
+pushd `dirname $0` > /dev/null
+SCRIPTPATH=`pwd`
+popd > /dev/null
+
+export NSS_DATALOAD_PROPERTIES="$SCRIPTPATH/RWStore.properties"
+
+while getopts h:c:n:d: option
+do
+  case "${option}"
+  in
+h) HOST=${OPTARG};;
+c) CONTEXT=${OPTARG};;
+n) NAMESPACE=${OPTARG};;
+d) LOCATION=${OPTARG};;
+  esac
+done
+
+if [ -z "$LOCATION" ]
+then
+  echo "Usage: $0 -d ] [-n ] [-h ] [-c ]"
+  exit 1
+fi
+
+#Probably some unused properties below, but copied all to be safe.
+
+cat <> $LOAD_PROP_FILE
+quiet=false
+verbose=0
+closure=false
+durableQueues=true
+#Needed for quads
+#defaultGraph=
+com.bigdata.rdf.store.DataLoader.flush=false
+com.bigdata.rdf.store.DataLoader.bufferCapacity=10
+com.bigdata.rdf.store.DataLoader.queueCapacity=10
+#Namespace to load
+namespace=$NAMESPACE
+#Files to load
+fileOrDirs=$LOCATION
+#Property file (if creating a new namespace)
+propertyFile=$NSS_DATALOAD_PROPERTIES
+EOT
+
+echo "Loading with properties..."
+cat $LOAD_PROP_FILE
+
+curl -X POST --data-binary @${LOAD_PROP_FILE} --header 
'Content-Type:text/plain' $HOST/$CONTEXT/dataloader
+#Let the output go to STDOUT/ERR to allow script redirection
+
+rm -f $LOAD_PROP_FILE
diff --git a/docs/getting-started.md b/docs/getting-started.md
index a69084f..a2e8def 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -55,24 +55,23 @@
 * Download the dump file from 
https://dumps.wikimedia.org/wikidatawiki/entities/ (for subdirectory `20150427` 
the filename will be something like `wikidata-20150427-all-BETA.ttl.gz`) into 
the `data` directory.
 * Pre-process the dump with Munger utility:
 ```
-$ ./munge.sh -f data/wikidata-20150427-all-BETA.ttl.gz -d data -l en -s
+$ mkdir data/split
+$ ./munge.sh -f data/wikidata-20150427-all-BETA.ttl.gz -d data/split -l en -s
 ```
 The option `-l en` only imports English labels.  The option `-s` skips the 
sitelinks, for smaller storage and better performance.
 If you need labels in other languages, either add them to the list - `-l 
en,de,ru` - or skip the language option altogether. If you need sitelinks, 
remove the `-s` option.
 
 * The Munger will produce a lot of data files named like 
`wikidump-1.ttl.gz`, `wikidump-2.ttl.gz`, etc. To load these 
files, you can use the following script:
 ```
-$ ./loadData.sh -n wdq -d `pwd`/data
+$ ./loadRestAPI.sh -n wdq -d `pwd`/data/split
 ```
 
 This will load the data files one by one into the Blazegraph data store. Note 
that you need `curl` to be installed for it to work.
 
-You can also specify which files to load:
+You can also load specific files:
 ```
-$ ./loadData.sh -n wdq -d `pwd`/data -s 1 -e 3
+$ ./loadRestAPI.sh -n wdq -d `pwd`/data/split/wikidump-1.ttl.gz
 ```
-This will load files from with numbers from 1 to 3.
-
 
 ## Run updater
 

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

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

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


[MediaWiki-commits] [Gerrit] Do not run browser tests that fail with Internet Explorer 8 ... - change (mediawiki...MultimediaViewer)

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

Change subject: Do not run browser tests that fail with Internet Explorer 8 
daily
..


Do not run browser tests that fail with Internet Explorer 8 daily

Bug: T128072
Change-Id: If3cc10004c9d3a9f93307dffb41e82f33853b5fd
---
M tests/browser/features/mmv.performance.feature
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/features/mmv.performance.feature 
b/tests/browser/features/mmv.performance.feature
index 1b1637c..efb0eb9 100644
--- a/tests/browser/features/mmv.performance.feature
+++ b/tests/browser/features/mmv.performance.feature
@@ -1,4 +1,4 @@
-@en.wikipedia.beta.wmflabs.org @custom-browser @mediawiki.org @firefox 
@internet_explorer_8 @internet_explorer_9 @internet_explorer_10 
@internet_explorer_11 @test2.wikipedia.org
+@en.wikipedia.beta.wmflabs.org @custom-browser @mediawiki.org @firefox 
@internet_explorer_9 @internet_explorer_10 @internet_explorer_11 
@test2.wikipedia.org
 Feature: Multimedia Viewer performance
 
   Background:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3cc10004c9d3a9f93307dffb41e82f33853b5fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Upgrade to Drupal 7.43 upstream - change (wikimedia...drupal)

2016-02-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Upgrade to Drupal 7.43 upstream
..

Upgrade to Drupal 7.43 upstream

Change-Id: I7a56bfcaed8bfe18623844f71dca070b357b682d
---
M .htaccess
M CHANGELOG.txt
M includes/bootstrap.inc
M includes/common.inc
M includes/database/mysql/database.inc
M includes/form.inc
M includes/install.inc
M includes/mail.inc
M includes/module.inc
M includes/path.inc
M includes/theme.inc
M includes/xmlrpcs.inc
M modules/aggregator/aggregator.info
M modules/aggregator/tests/aggregator_test.info
M modules/block/block.info
M modules/block/block.module
M modules/block/tests/block_test.info
M modules/block/tests/themes/block_test_theme/block_test_theme.info
M modules/blog/blog.info
M modules/book/book.info
M modules/color/color.info
M modules/comment/comment.info
M modules/contact/contact.info
M modules/contextual/contextual.info
M modules/dashboard/dashboard.info
M modules/dblog/dblog.info
M modules/dblog/dblog.module
M modules/dblog/dblog.test
M modules/field/field.info
M modules/field/modules/field_sql_storage/field_sql_storage.info
M modules/field/modules/list/list.info
M modules/field/modules/list/tests/list_test.info
M modules/field/modules/number/number.info
M modules/field/modules/options/options.info
M modules/field/modules/options/options.module
M modules/field/modules/options/options.test
M modules/field/modules/text/text.info
M modules/field/modules/text/text.module
M modules/field/tests/field_test.info
M modules/field_ui/field_ui.info
M modules/file/file.info
M modules/file/file.module
M modules/file/tests/file.test
M modules/file/tests/file_module_test.info
M modules/filter/filter.info
M modules/forum/forum.info
M modules/help/help.info
M modules/image/image.info
M modules/image/image.module
M modules/image/image.test
M modules/image/tests/image_module_test.info
M modules/image/tests/image_module_test.module
M modules/locale/locale.info
M modules/locale/tests/locale_test.info
M modules/menu/menu.info
M modules/node/node.admin.inc
M modules/node/node.info
M modules/node/node.module
M modules/node/node.pages.inc
M modules/node/node.test
M modules/node/tests/node_access_test.info
M modules/node/tests/node_test.info
M modules/node/tests/node_test_exception.info
M modules/openid/openid.info
M modules/openid/tests/openid_test.info
M modules/overlay/overlay.info
M modules/path/path.info
M modules/php/php.info
M modules/poll/poll.info
M modules/poll/poll.module
M modules/profile/profile.info
M modules/profile/profile.test
M modules/rdf/rdf.info
M modules/rdf/tests/rdf_test.info
M modules/search/search.info
M modules/search/search.pages.inc
M modules/search/search.test
M modules/search/tests/search_embedded_form.info
M modules/search/tests/search_extra_type.info
M modules/search/tests/search_node_tags.info
M modules/shortcut/shortcut.info
M modules/simpletest/drupal_web_test_case.php
M modules/simpletest/simpletest.info
M modules/simpletest/tests/actions_loop_test.info
M modules/simpletest/tests/ajax_forms_test.info
M modules/simpletest/tests/ajax_test.info
M modules/simpletest/tests/batch_test.info
M modules/simpletest/tests/boot_test_1.info
M modules/simpletest/tests/boot_test_2.info
M modules/simpletest/tests/bootstrap.test
M modules/simpletest/tests/common.test
M modules/simpletest/tests/common_test.info
M modules/simpletest/tests/common_test.module
M modules/simpletest/tests/common_test_cron_helper.info
M modules/simpletest/tests/database_test.info
M modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info
M 
modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
M 
modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
M modules/simpletest/tests/entity_cache_test.info
M modules/simpletest/tests/entity_cache_test_dependency.info
M modules/simpletest/tests/entity_crud_hook_test.info
M modules/simpletest/tests/entity_query_access_test.info
M modules/simpletest/tests/error_test.info
M modules/simpletest/tests/file_test.info
M modules/simpletest/tests/filter_test.info
M modules/simpletest/tests/form_test.info
M modules/simpletest/tests/image_test.info
M modules/simpletest/tests/mail.test
M modules/simpletest/tests/menu_test.info
M modules/simpletest/tests/module_test.info
M modules/simpletest/tests/path_test.info
M modules/simpletest/tests/psr_0_test/psr_0_test.info
M modules/simpletest/tests/psr_4_test/psr_4_test.info
M modules/simpletest/tests/requirements1_test.info
M modules/simpletest/tests/requirements2_test.info
M modules/simpletest/tests/session_test.info
M modules/simpletest/tests/system_dependencies_test.info
M 
modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
M modules/simpletest/tests/system_incompatible_core_version_test.info
M 
modules/simpletest/tests/system_incompatible_module_version_dependencies

[MediaWiki-commits] [Gerrit] Fix board move DB issue using new hook TitleMoveStarting - change (mediawiki...Flow)

2016-02-26 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix board move DB issue using new hook TitleMoveStarting
..

Fix board move DB issue using new hook TitleMoveStarting

Bug: T127785
Depends-On: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
Change-Id: I696aaa239b295d4e7837150975bab41e4813fde4
(cherry picked from commit 7c98ef815870ca6fd082ab72164b456d25939a9e)
---
M Flow.php
M Hooks.php
M includes/BoardMover.php
3 files changed, 10 insertions(+), 9 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index 63d77ab..b66ef84 100644
--- a/Flow.php
+++ b/Flow.php
@@ -141,8 +141,8 @@
 $wgHooks['CanonicalNamespaces'][] = 'FlowHooks::onCanonicalNamespaces';
 $wgHooks['MovePageIsValidMove'][] = 'FlowHooks::onMovePageIsValidMove';
 $wgHooks['AbortMove'][] = 'FlowHooks::onAbortMove';
-$wgHooks['TitleMove'][] = 'FlowHooks::onTitleMove';
-$wgHooks['TitleMoveComplete'][] = 'FlowHooks::onTitleMoveComplete';
+$wgHooks['TitleMoveStarting'][] = 'FlowHooks::onTitleMoveStarting';
+$wgHooks['TitleMoveCompleting'][] = 'FlowHooks::onTitleMoveCompleting';
 $wgHooks['TitleSquidURLs'][] = 'FlowHooks::onTitleSquidURLs';
 $wgHooks['WatchlistEditorBuildRemoveLine'][] = 
'FlowHooks::onWatchlistEditorBuildRemoveLine';
 $wgHooks['WatchlistEditorBeforeFormRender'][] = 
'FlowHooks::onWatchlistEditorBeforeFormRender';
diff --git a/Hooks.php b/Hooks.php
index 7412b6e..75e6bde 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1632,10 +1632,11 @@
}
 
/**
-* Occurs at the beginning of the MovePage process. Perhaps 
ContentModel should be
-* extended to be notified about moves explicitly.
+* Occurs at the beginning of the MovePage process (just after the 
startAtomic).
+*
+* Perhaps ContentModel should be extended to be notified about moves 
explicitly.
 */
-   public static function onTitleMove( Title $oldTitle, Title $newTitle, 
User $user ) {
+   public static function onTitleMoveStarting( Title $oldTitle, Title 
$newTitle, User $user ) {
if ( $oldTitle->getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
// $newTitle doesn't yet exist, but after the move 
it'll still have
// the same ID $oldTitle used to have
@@ -1649,14 +1650,14 @@
// location and rendered it doesn't throw an error 
about the wrong title
Container::get( 'factory.loader.workflow' 
)->pageMoveInProgress();
// open a database transaction and prepare everything 
for the move, but
-   // don't commit yet. That is done below in 
self::onTitleMoveComplete
+   // don't commit yet. That is done below in 
self::onTitleMoveCompleting
Container::get( 'board_mover' )->prepareMove( 
$oldTitle->getArticleID(), $bogusTitle );
}
 
return true;
}
 
-   public static function onTitleMoveComplete( Title $oldTitle, Title 
$newTitle, User $user, $pageid, $redirid, $reason ) {
+   public static function onTitleMoveCompleting( Title $oldTitle, Title 
$newTitle, User $user, $pageid, $redirid, $reason, Revision $revision ) {
if ( $newTitle->getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
Container::get( 'board_mover' )->commit();
}
diff --git a/includes/BoardMover.php b/includes/BoardMover.php
index f475c07..5370542 100644
--- a/includes/BoardMover.php
+++ b/includes/BoardMover.php
@@ -61,7 +61,7 @@
 
// Open a transaction, this will be closed from self::commit.
$this->dbw = $this->dbFactory->getDB( DB_MASTER );
-   $this->dbw->begin( __METHOD__ );
+   $this->dbw->startAtomic( __CLASS__ );
$this->cache->begin();
 
// @todo this loads every topic workflow this board has ever 
seen,
@@ -118,7 +118,7 @@
}
 
try {
-   $this->dbw->commit( __METHOD__ );
+   $this->dbw->endAtomic( __CLASS__ );
$this->cache->commit();
} catch ( \Exception $e ) {
$this->dbw->rollback( __METHOD__ );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I696aaa239b295d4e7837150975bab41e4813fde4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Add TitleMoveStarting, mirroring TitleMoveCompleting - change (mediawiki/core)

2016-02-26 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Add TitleMoveStarting, mirroring TitleMoveCompleting
..

Add TitleMoveStarting, mirroring TitleMoveCompleting

This is a pre-requisite to fix a Flow move regression, T127785.

This allows running an atomic entirely within the move with the correct
ordering.

Bug: T127785
Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
(cherry picked from commit 793499cde02f1fc16d15dffa84fa76f1c3f46eb1)
---
M docs/hooks.txt
M includes/MovePage.php
2 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 8822e0c..a8f44ec 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3065,6 +3065,11 @@
 $nt: new title
 $user: user who does the move
 
+'TitleMoveStarting': Before moving an article (title), but just after the 
atomic DB section starts.
+$old: old title
+$nt: new title
+$user: user who does the move
+
 'TitleMoveComplete': After moving an article (title), post-commit.
 &$old: old title
 &$nt: new title
diff --git a/includes/MovePage.php b/includes/MovePage.php
index fb0ca8c..eb66bc9 100644
--- a/includes/MovePage.php
+++ b/includes/MovePage.php
@@ -248,6 +248,9 @@
}
 
$dbw->startAtomic( __METHOD__ );
+
+   Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, 
$this->newTitle, $user ] );
+
$pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE 
);
$protected = $this->oldTitle->isProtected();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Pass replyTo parameter correctly to UserMailer::send() - change (mediawiki...BounceHandler)

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

Change subject: Pass replyTo parameter correctly to UserMailer::send()
..


Pass replyTo parameter correctly to UserMailer::send()

Change-Id: I0c51a39b90c5a6f10b35c973cdebe63bf72aa92e
---
M includes/ProcessUnRecognizedBounces.php
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  01tonythomas: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/ProcessUnRecognizedBounces.php 
b/includes/ProcessUnRecognizedBounces.php
index d256ba0..607e910 100644
--- a/includes/ProcessUnRecognizedBounces.php
+++ b/includes/ProcessUnRecognizedBounces.php
@@ -42,7 +42,13 @@
foreach ( $this->unrecognizedBounceNotify as 
$notifyEmails ) {
$to[] = new MailAddress( $notifyEmails );
}
-   UserMailer::send( $to, $sender, $subject, $email, 
$sender );
+   UserMailer::send(
+   $to,
+   $sender,
+   $subject,
+   $email,
+   array( 'replyTo' => $sender )
+   );
}
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c51a39b90c5a6f10b35c973cdebe63bf72aa92e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix board move DB issue using new hook TitleMoveStarting - change (mediawiki...Flow)

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

Change subject: Fix board move DB issue using new hook TitleMoveStarting
..


Fix board move DB issue using new hook TitleMoveStarting

Bug: T127785
Depends-On: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
Change-Id: I696aaa239b295d4e7837150975bab41e4813fde4
---
M Flow.php
M Hooks.php
M includes/BoardMover.php
3 files changed, 10 insertions(+), 9 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Catrope: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Flow.php b/Flow.php
index 63d77ab..b66ef84 100644
--- a/Flow.php
+++ b/Flow.php
@@ -141,8 +141,8 @@
 $wgHooks['CanonicalNamespaces'][] = 'FlowHooks::onCanonicalNamespaces';
 $wgHooks['MovePageIsValidMove'][] = 'FlowHooks::onMovePageIsValidMove';
 $wgHooks['AbortMove'][] = 'FlowHooks::onAbortMove';
-$wgHooks['TitleMove'][] = 'FlowHooks::onTitleMove';
-$wgHooks['TitleMoveComplete'][] = 'FlowHooks::onTitleMoveComplete';
+$wgHooks['TitleMoveStarting'][] = 'FlowHooks::onTitleMoveStarting';
+$wgHooks['TitleMoveCompleting'][] = 'FlowHooks::onTitleMoveCompleting';
 $wgHooks['TitleSquidURLs'][] = 'FlowHooks::onTitleSquidURLs';
 $wgHooks['WatchlistEditorBuildRemoveLine'][] = 
'FlowHooks::onWatchlistEditorBuildRemoveLine';
 $wgHooks['WatchlistEditorBeforeFormRender'][] = 
'FlowHooks::onWatchlistEditorBeforeFormRender';
diff --git a/Hooks.php b/Hooks.php
index 7412b6e..75e6bde 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1632,10 +1632,11 @@
}
 
/**
-* Occurs at the beginning of the MovePage process. Perhaps 
ContentModel should be
-* extended to be notified about moves explicitly.
+* Occurs at the beginning of the MovePage process (just after the 
startAtomic).
+*
+* Perhaps ContentModel should be extended to be notified about moves 
explicitly.
 */
-   public static function onTitleMove( Title $oldTitle, Title $newTitle, 
User $user ) {
+   public static function onTitleMoveStarting( Title $oldTitle, Title 
$newTitle, User $user ) {
if ( $oldTitle->getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
// $newTitle doesn't yet exist, but after the move 
it'll still have
// the same ID $oldTitle used to have
@@ -1649,14 +1650,14 @@
// location and rendered it doesn't throw an error 
about the wrong title
Container::get( 'factory.loader.workflow' 
)->pageMoveInProgress();
// open a database transaction and prepare everything 
for the move, but
-   // don't commit yet. That is done below in 
self::onTitleMoveComplete
+   // don't commit yet. That is done below in 
self::onTitleMoveCompleting
Container::get( 'board_mover' )->prepareMove( 
$oldTitle->getArticleID(), $bogusTitle );
}
 
return true;
}
 
-   public static function onTitleMoveComplete( Title $oldTitle, Title 
$newTitle, User $user, $pageid, $redirid, $reason ) {
+   public static function onTitleMoveCompleting( Title $oldTitle, Title 
$newTitle, User $user, $pageid, $redirid, $reason, Revision $revision ) {
if ( $newTitle->getContentModel() === CONTENT_MODEL_FLOW_BOARD 
) {
Container::get( 'board_mover' )->commit();
}
diff --git a/includes/BoardMover.php b/includes/BoardMover.php
index f475c07..5370542 100644
--- a/includes/BoardMover.php
+++ b/includes/BoardMover.php
@@ -61,7 +61,7 @@
 
// Open a transaction, this will be closed from self::commit.
$this->dbw = $this->dbFactory->getDB( DB_MASTER );
-   $this->dbw->begin( __METHOD__ );
+   $this->dbw->startAtomic( __CLASS__ );
$this->cache->begin();
 
// @todo this loads every topic workflow this board has ever 
seen,
@@ -118,7 +118,7 @@
}
 
try {
-   $this->dbw->commit( __METHOD__ );
+   $this->dbw->endAtomic( __CLASS__ );
$this->cache->commit();
} catch ( \Exception $e ) {
$this->dbw->rollback( __METHOD__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I696aaa239b295d4e7837150975bab41e4813fde4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@list

[MediaWiki-commits] [Gerrit] Fixes for nuclides to handle problem of duplicate (and some ... - change (labs...ptable)

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

Change subject: Fixes for nuclides to handle problem of duplicate (and some 
wrong) returns from SPARQL query
..


Fixes for nuclides to handle problem of duplicate (and some wrong) returns from 
SPARQL query

Change-Id: Ie27c4b8009273a3860fb836862c8a834bd2caa3b
---
M nuclides.py
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/nuclides.py b/nuclides.py
index 76d4622..c3f4a7b 100644
--- a/nuclides.py
+++ b/nuclides.py
@@ -171,10 +171,14 @@
 query_result = self.get_sparql(hl_query)
 for nuclide_result in query_result:
 nuclide_uri = nuclide_result['nuclide']['value']
+if nuclide_result['half_life']['value'] == '0':
+continue  # WDQS bug: values sometimes zero - skip
 if nuclide_uri in nuclides:
-nuclides[nuclide_uri].half_life = time_in_seconds(
-nuclide_result['half_life']['value'],
-nuclide_result['half_life_unit']['value'])
+if nuclides[nuclide_uri].half_life is None:
+nuclides[nuclide_uri].half_life = time_in_seconds(
+nuclide_result['half_life']['value'],
+nuclide_result['half_life_unit']['value'])
+# else - sparql returned more than 1 half-life value - problem?
 
 decay_query = "PREFIX ps:  \
 PREFIX pq:  \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie27c4b8009273a3860fb836862c8a834bd2caa3b
Gerrit-PatchSet: 4
Gerrit-Project: labs/tools/ptable
Gerrit-Branch: master
Gerrit-Owner: ArthurPSmith 
Gerrit-Reviewer: ArthurPSmith 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow more fine-grained throttling of login attempts - change (mediawiki/core)

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

Change subject: Allow more fine-grained throttling of login attempts
..


Allow more fine-grained throttling of login attempts

In addition to the 5 attempts every 5 minutes rule, add some long
term rules. Its extraordinarily unlikely that a non-malicious person would
use the wrong password 150 times in a row, so add a rule that you
can't have 150 login fails in a row in 48 hours all from the same
IP address. Also add the ability to set throttles across all IPs, but
do not set any of these types by default (There is an unclear risk/benefit
tradeoff between making it easy to lock someone out of their
account in a DoS attack, and preventing brute-forcing)

Bug: T122164
Change-Id: I5c279906936ef3991a42fc21325c3ffd4a200493
---
M includes/DefaultSettings.php
M includes/api/ApiLogin.php
M includes/specials/SpecialChangeEmail.php
M includes/specials/SpecialChangePassword.php
M includes/specials/SpecialUserlogin.php
5 files changed, 134 insertions(+), 49 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 08538ee..1e713e5 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5204,7 +5204,7 @@
 /**
  * Number of accounts each IP address may create, 0 to disable.
  *
- * @warning Requires memcached
+ * @warning Requires $wgMainCacheType to be enabled
  */
 $wgAccountCreationThrottle = 0;
 
@@ -5385,9 +5385,23 @@
 /**
  * Limit password attempts to X attempts per Y seconds per IP per account.
  *
- * @warning Requires memcached.
+ * Value is an array of arrays. Each sub-array must have a key for count
+ * (ie count of how many attempts before throttle) and a key for seconds.
+ * If the key 'allIPs' (case sensitive) is present, then the limit is
+ * just per account instead of per IP per account.
+ *
+ * @since 1.27 allIps support and multiple limits added in 1.27. Prior
+ *   to 1.27 this only supported having a single throttle.
+ * @warning Requires $wgMainCacheType to be enabled
  */
-$wgPasswordAttemptThrottle = [ 'count' => 5, 'seconds' => 300 ];
+$wgPasswordAttemptThrottle = [
+   // Short term limit
+   [ 'count' => 5, 'seconds' => 300 ],
+   // Long term limit. We need to balance the risk
+   // of somebody using this as a DoS attack to lock someone
+   // out of their account, and someone doing a brute force attack.
+   [ 'count' => 150, 'seconds' => 60*60*48 ],
+];
 
 /**
  * @var Array Map of (grant => right => boolean)
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 84b9f49..a6e6c49 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -209,7 +209,7 @@
case LoginForm::THROTTLED:
$result['result'] = 'Throttled';
$throttle = $this->getConfig()->get( 
'PasswordAttemptThrottle' );
-   $result['wait'] = intval( $throttle['seconds'] 
);
+   $result['wait'] = intval( 
$loginForm->mThrottleWait );
break;
 
case LoginForm::USER_BLOCKED:
diff --git a/includes/specials/SpecialChangeEmail.php 
b/includes/specials/SpecialChangeEmail.php
index 4c3fc0e..b35446d 100644
--- a/includes/specials/SpecialChangeEmail.php
+++ b/includes/specials/SpecialChangeEmail.php
@@ -173,13 +173,12 @@
return Status::newFatal( 'changeemail-nochange' );
}
 
-   $throttleCount = LoginForm::incLoginThrottle( $user->getName() 
);
-   if ( $throttleCount === true ) {
+   $throttleInfo = LoginForm::incrementLoginThrottle( 
$user->getName() );
+   if ( $throttleInfo ) {
$lang = $this->getLanguage();
-   $throttleInfo = $this->getConfig()->get( 
'PasswordAttemptThrottle' );
return Status::newFatal(
'changeemail-throttled',
-   $lang->formatDuration( $throttleInfo['seconds'] 
)
+   $lang->formatDuration( $throttleInfo['wait'] )
);
}
 
@@ -190,9 +189,7 @@
return Status::newFatal( 'wrongpassword' );
}
 
-   if ( $throttleCount ) {
-   LoginForm::clearLoginThrottle( $user->getName() );
-   }
+   LoginForm::clearLoginThrottle( $user->getName() );
 
$oldaddr = $user->getEmail();
$status = $user->setEmailWithConfirmation( $newaddr );
diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index 4f7ba25..2d0d020 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/inc

[MediaWiki-commits] [Gerrit] Bring back original icon for added-to-course notification - change (mediawiki...EducationProgram)

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

Change subject: Bring back original icon for added-to-course notification
..


Bring back original icon for added-to-course notification

Was replaced by mistake in I0e463030a49077e75f12e3e8f26e6f9ec88585e1

Bug: T125692
Change-Id: I95a2ba79846795f2111099b0e14236749c7e5396
---
M resources/images/added-to-course-notification.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/resources/images/added-to-course-notification.png 
b/resources/images/added-to-course-notification.png
index 1f19f40..b560dcf 100644
--- a/resources/images/added-to-course-notification.png
+++ b/resources/images/added-to-course-notification.png
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95a2ba79846795f2111099b0e14236749c7e5396
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Reorder x-wiki bundles to be after local notifications - change (mediawiki...Echo)

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

Change subject: Reorder x-wiki bundles to be after local notifications
..


Reorder x-wiki bundles to be after local notifications

Bug: T127422
Change-Id: I81ae2e13612168a598c32f130a625eadc0325c8f
---
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 196ef71..79f3715 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -71,6 +71,10 @@
return -1; // Unread items are always above 
read items
} else if ( a.isRead() && !b.isRead() ) {
return 1;
+   } else if ( !a.isForeign() && b.isForeign() ) {
+   return -1;
+   } else if ( a.isForeign() && !b.isForeign() ) {
+   return 1;
} else {
// Reverse sorting
diff = Number( b.getTimestamp() ) - Number( 
a.getTimestamp() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I81ae2e13612168a598c32f130a625eadc0325c8f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adjust group bundle stules - change (mediawiki...Echo)

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

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

Change subject: Adjust group bundle stules
..

Adjust group bundle stules

Bug: T128069
Change-Id: If1e5d9811f4569e93ab9ba3064699ce6a6d907f7
---
M modules/echo.variables.less
M modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less
2 files changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/modules/echo.variables.less b/modules/echo.variables.less
index d94ce82..24b3d20 100644
--- a/modules/echo.variables.less
+++ b/modules/echo.variables.less
@@ -9,7 +9,7 @@
 @notification-text-color: #111;
 @notification-body-color: #777;
 
-@bundle-group-padding: 1em;
+@bundle-group-padding: 0.7em;
 @notification-popup-width: 500px;
 
 @opacity-low: 0.5;
diff --git a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less 
b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less
index 0655d92..d4b3a03 100644
--- a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less
@@ -1,12 +1,19 @@
+@import '../../echo.variables';
+
 .mw-echo-ui-bundledNotificationGroupWidget {
 
&:not(:first-child) {
-   margin-top: 0.5em;
+   margin-top: @bundle-group-padding;
}
 
&-title {
font-weight: bold;
color: #66;
+   margin-bottom: @bundle-group-padding;
+   }
+
+   .mw-echo-ui-notificationsWidget {
+   margin-bottom: @bundle-group-padding / 2;
}
 
.mw-echo-ui-notificationItemWidget {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1e5d9811f4569e93ab9ba3064699ce6a6d907f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Listen to environment variable PUPPET_EVAL_TRACE - change (mediawiki/vagrant)

2016-02-26 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Listen to environment variable PUPPET_EVAL_TRACE
..

Listen to environment variable PUPPET_EVAL_TRACE

Similar to PUPPET_DEBUG, but for --evaltrace, to see how long each
step takes.

We should do some real profiling, but this is a start.

Change-Id: Id98a1fd1063c7d53808f919692c913d66e00ec51
---
M Vagrantfile
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/32/273532/1

diff --git a/Vagrantfile b/Vagrantfile
index 4765fcc..d838ef0 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -218,7 +218,8 @@
   '--detailed-exitcodes',
 ]
 
-# For more output, uncomment the following line:
+puppet.options << '--evaltrace' if ENV.include?('PUPPET_EVAL_TRACE')
+
 puppet.options << '--debug' if ENV.include?('PUPPET_DEBUG')
 
 # Windows's Command Prompt has poor support for ANSI escape sequences.

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

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

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


[MediaWiki-commits] [Gerrit] MentionPresentationModel: Remove pageLink from secondary links - change (mediawiki...Echo)

2016-02-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: MentionPresentationModel: Remove pageLink from secondary links
..

MentionPresentationModel: Remove pageLink from secondary links

It wasn't meant to be there, and flow-mention doesn't have it either.
We also don't have any other notification types with
three prioritized secondary links.

Bug: T125949
Change-Id: Icbffa185b1116b1a6beb9bb3585339fdf7e82cdd
---
M includes/formatters/MentionPresentationModel.php
1 file changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/includes/formatters/MentionPresentationModel.php 
b/includes/formatters/MentionPresentationModel.php
index 66f8c4c..085ad2a 100644
--- a/includes/formatters/MentionPresentationModel.php
+++ b/includes/formatters/MentionPresentationModel.php
@@ -141,11 +141,7 @@
'prioritized' => true,
);
 
-   $pageLink = $this->getPageLink(
-   $title, '', true
-   );
-
-   return array( $this->getAgentLink(), $pageLink, 
$viewChangesLink );
+   return array( $this->getAgentLink(), $viewChangesLink );
}
 
private function onArticleTalkpage() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbffa185b1116b1a6beb9bb3585339fdf7e82cdd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Add a 'Refund' message class for Adyen - change (wikimedia...SmashPig)

2016-02-26 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Add a 'Refund' message class for Adyen
..


Add a 'Refund' message class for Adyen

Change-Id: Id0330b03071e9d209f9f9c591e1cfd6762c2178b
---
A PaymentProviders/Adyen/ExpatriatedMessages/Refund.php
M PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
2 files changed, 27 insertions(+), 22 deletions(-)

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



diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/Refund.php 
b/PaymentProviders/Adyen/ExpatriatedMessages/Refund.php
new file mode 100644
index 000..412
--- /dev/null
+++ b/PaymentProviders/Adyen/ExpatriatedMessages/Refund.php
@@ -0,0 +1,26 @@
+execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
+}
diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php 
b/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
index db9f3ff..84bca9e 100644
--- a/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
+++ b/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
@@ -1,26 +1,5 @@
 execute( $this );
-
-   if ( $result === true ) {
-   return parent::runActionChain();
-   } else {
-   return false;
-   }
-   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0330b03071e9d209f9f9c591e1cfd6762c2178b
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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] Remove unused import from eventlogging-devserver - change (eventlogging)

2016-02-26 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Remove unused import from eventlogging-devserver
..

Remove unused import from eventlogging-devserver

Change-Id: I573c7d2faf6ce7fbdd5d0a74eebbd06df6bfc0b7
---
M bin/eventlogging-devserver
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/30/273530/1

diff --git a/bin/eventlogging-devserver b/bin/eventlogging-devserver
index f4aa80e..0153760 100755
--- a/bin/eventlogging-devserver
+++ b/bin/eventlogging-devserver
@@ -40,7 +40,6 @@
 import itertools
 
 from wsgiref.simple_server import make_server, WSGIRequestHandler
-from eventlogging import Event
 
 import eventlogging
 import jsonschema

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I573c7d2faf6ce7fbdd5d0a74eebbd06df6bfc0b7
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] Return true after successful report download - change (wikimedia...SmashPig)

2016-02-26 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Return true after successful report download
..


Return true after successful report download

Change-Id: I0fed996a5964c52c8fdda6df6c1f07535d28c736
---
M PaymentProviders/Adyen/Jobs/DownloadReportJob.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php 
b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
index a1c3848..afc33fe 100644
--- a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
+++ b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
@@ -81,5 +81,6 @@
$this->logger->error( "Report downloaded(?), but with 
incorrect HTTP code: {$httpCode}" );
throw new SmashPigException( "Could not download 
report." );
}
+   return true;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fed996a5964c52c8fdda6df6c1f07535d28c736
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't try to serialize the logger when logging - change (wikimedia...SmashPig)

2016-02-26 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Don't try to serialize the logger when logging
..


Don't try to serialize the logger when logging

Also, get rid of a bogus array_flip - we just want to use a flat
array of strings, not a hash.

Change-Id: I9cddc996b21a4fdf780fee00e3b33a1a7020b5e2
---
M Core/DataStores/JsonSerializableObject.php
M PaymentProviders/Adyen/Jobs/DownloadReportJob.php
2 files changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/Core/DataStores/JsonSerializableObject.php 
b/Core/DataStores/JsonSerializableObject.php
index f4b64f0..3a7736b 100644
--- a/Core/DataStores/JsonSerializableObject.php
+++ b/Core/DataStores/JsonSerializableObject.php
@@ -1,7 +1,5 @@
 __sleep();
 
-   $ignore = array_flip( $this->propertiesExcludedFromExport );
$properties = array();
 
foreach ( get_object_vars( $this ) as $propName => $propValue ) 
{
-   if ( !array_key_exists( $propName, $ignore ) ) {
+   if ( !array_key_exists( $propName, 
$this->propertiesExcludedFromExport ) ) {
if ( is_object( $propValue ) ) {
if ( $propValue instanceof 
JsonSerializableObject ) {
$properties[ $propName ] = 
$propValue->toJson( $resumeUse );
diff --git a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php 
b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
index 2f566c1..a1c3848 100644
--- a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
+++ b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
@@ -21,6 +21,7 @@
protected $reportUrl;
 
protected $downloadLoc;
+   protected $propertiesExcludedFromExport = array( 'logger' );
 
public static function factory( $account, $url ) {
$obj = new DownloadReportJob();

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

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

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


[MediaWiki-commits] [Gerrit] Return true after successful report download - change (wikimedia...SmashPig)

2016-02-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Return true after successful report download
..

Return true after successful report download

Change-Id: I0fed996a5964c52c8fdda6df6c1f07535d28c736
---
M PaymentProviders/Adyen/Jobs/DownloadReportJob.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/29/273529/1

diff --git a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php 
b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
index a1c3848..afc33fe 100644
--- a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
+++ b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
@@ -81,5 +81,6 @@
$this->logger->error( "Report downloaded(?), but with 
incorrect HTTP code: {$httpCode}" );
throw new SmashPigException( "Could not download 
report." );
}
+   return true;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fed996a5964c52c8fdda6df6c1f07535d28c736
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Don't try to serialize the logger when logging - change (wikimedia...SmashPig)

2016-02-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Don't try to serialize the logger when logging
..

Don't try to serialize the logger when logging

Also, get rid of a bogus array_flip - we just want to use a flat
array of strings, not a hash.

Change-Id: I9cddc996b21a4fdf780fee00e3b33a1a7020b5e2
---
M Core/DataStores/JsonSerializableObject.php
M PaymentProviders/Adyen/Jobs/DownloadReportJob.php
2 files changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/28/273528/1

diff --git a/Core/DataStores/JsonSerializableObject.php 
b/Core/DataStores/JsonSerializableObject.php
index f4b64f0..3a7736b 100644
--- a/Core/DataStores/JsonSerializableObject.php
+++ b/Core/DataStores/JsonSerializableObject.php
@@ -1,7 +1,5 @@
 __sleep();
 
-   $ignore = array_flip( $this->propertiesExcludedFromExport );
$properties = array();
 
foreach ( get_object_vars( $this ) as $propName => $propValue ) 
{
-   if ( !array_key_exists( $propName, $ignore ) ) {
+   if ( !array_key_exists( $propName, 
$this->propertiesExcludedFromExport ) ) {
if ( is_object( $propValue ) ) {
if ( $propValue instanceof 
JsonSerializableObject ) {
$properties[ $propName ] = 
$propValue->toJson( $resumeUse );
diff --git a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php 
b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
index 2f566c1..a1c3848 100644
--- a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
+++ b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php
@@ -21,6 +21,7 @@
protected $reportUrl;
 
protected $downloadLoc;
+   protected $propertiesExcludedFromExport = array( 'logger' );
 
public static function factory( $account, $url ) {
$obj = new DownloadReportJob();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cddc996b21a4fdf780fee00e3b33a1a7020b5e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Update eventlogging-devserver log parsing to behave the same... - change (eventlogging)

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

Change subject: Update eventlogging-devserver log parsing to behave the same as 
eventlogging-processor
..


Update eventlogging-devserver log parsing to behave the same as 
eventlogging-processor

Namely, clientValidated and isTruncated fields are popped out of the 
EventCapsule
after parsing but before validating.

This logic should likely be DRYed somewhere.

Bug: T127209
Change-Id: I2e55b36b6911011158777144b896f2fc3d6ea8a6
---
M bin/eventlogging-devserver
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/bin/eventlogging-devserver b/bin/eventlogging-devserver
index c20e913..f4aa80e 100755
--- a/bin/eventlogging-devserver
+++ b/bin/eventlogging-devserver
@@ -111,8 +111,9 @@
 Returns a tuple of (event, errors). If no object was decoded,
 'event' will be None."""
 try:
-event_dict = parser.parse(log_line)
-event = Event.factory(event_dict)
+event = parser.parse(log_line)
+event.pop('clientValidated', None)
+event.pop('isTruncated', None)
 except ValueError as err:
 return None, [err]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e55b36b6911011158777144b896f2fc3d6ea8a6
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Mforns 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] Update eventlogging-devserver log parsing to behave the same... - change (eventlogging)

2016-02-26 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Update eventlogging-devserver log parsing to behave the same as 
eventlogging-processor
..

Update eventlogging-devserver log parsing to behave the same as 
eventlogging-processor

Namely, clientValidated and isTruncated fields are popped out of the 
EventCapsule
after parsing but before validating.

This logic should likely be DRYed somewhere.

Bug: T127209
Change-Id: I2e55b36b6911011158777144b896f2fc3d6ea8a6
---
M bin/eventlogging-devserver
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/27/273527/1

diff --git a/bin/eventlogging-devserver b/bin/eventlogging-devserver
index c20e913..f4aa80e 100755
--- a/bin/eventlogging-devserver
+++ b/bin/eventlogging-devserver
@@ -111,8 +111,9 @@
 Returns a tuple of (event, errors). If no object was decoded,
 'event' will be None."""
 try:
-event_dict = parser.parse(log_line)
-event = Event.factory(event_dict)
+event = parser.parse(log_line)
+event.pop('clientValidated', None)
+event.pop('isTruncated', None)
 except ValueError as err:
 return None, [err]
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e55b36b6911011158777144b896f2fc3d6ea8a6
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] [WIP] Add geographic visualisation code - change (wikimedia...wetzel)

2016-02-26 Thread OliverKeyes (Code Review)
OliverKeyes has uploaded a new change for review.

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

Change subject: [WIP] Add geographic visualisation code
..

[WIP] Add geographic visualisation code

For some reason now none of the graphs display. Mikhail, halp? ;p

Bug: T119448
Change-Id: I216caa9960a29bc368dcfb99c576f1eab287ab97
---
M server.R
A tab_documentation/geo_breakdown.md
M ui.R
M utils.R
4 files changed, 39 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/wetzel 
refs/changes/26/273526/1

diff --git a/server.R b/server.R
index f1e87db..3b3ce8d 100644
--- a/server.R
+++ b/server.R
@@ -9,6 +9,7 @@
 read_actions()
 read_users()
 suppressWarnings(read_tiles())
+read_countries()
 existing_date <<- Sys.Date()
   }
   
@@ -125,6 +126,12 @@
   polloi::make_dygraph("Date", "Events", "Feature usage for WIWOSM")
   })
   
+  
+  output$users_by_country <- renderDygraph({
+country_data %>%
+  polloi::make_dygraph("Date", "Users (%)", "Geographic breakdown of maps 
users")
+  })
+  
   # Check datasets for missing data and notify user which datasets are missing 
data (if any)
   output$message_menu <- renderMenu({
 notifications <- list(
diff --git a/tab_documentation/geo_breakdown.md 
b/tab_documentation/geo_breakdown.md
new file mode 100644
index 000..ca8a5ff
--- /dev/null
+++ b/tab_documentation/geo_breakdown.md
@@ -0,0 +1,21 @@
+WIWOSM feature usage
+===
+
+This tab contains a geographic breakdown of Maps traffic. The percentage of 
traffic from each of the top 9 countries is displayed: for privacy and display 
reasons, all others are grouped into "Other".
+
+Outages and inaccuracies
+--
+
+* None so far!
+
+Questions, bug reports, and feature suggestions
+--
+For technical, non-bug questions, [email 
Mikhail](mailto:mpo...@wikimedia.org?subject=Dashboard%20Question). If you 
experience a bug or notice something wrong or have a suggestion, [open a ticket 
in 
Phabricator](https://phabricator.wikimedia.org/maniphest/task/create/?projects=Discovery)
 in the Discovery board or [email 
Dan](mailto:dga...@wikimedia.org?subject=Dashboard%20Question).
+
+
+
+  Link to this dashboard:
+  http://discovery.wmflabs.org/maps/#geo_breakdown";>
+http://discovery.wmflabs.org/maps/#geo_breakdown
+  
+
diff --git a/ui.R b/ui.R
index adec0f2..48d93e3 100644
--- a/ui.R
+++ b/ui.R
@@ -22,6 +22,7 @@
  menuSubItem(text = "WikiMiniAtlas", tabName = 
"wikiminiatlas_usage"),
  menuSubItem(text = "Wikivoyage", tabName = "wikivoyage_usage"),
  menuSubItem(text = "WIWOSM", tabName = "wiwosm_usage")),
+menuItem(text = "Geographic breakdown", tabName = "geo_breakdown"),
 menuItem(text = "Global Settings",
  selectInput(inputId = "smoothing_global", label = "Smoothing", 
selectize = TRUE, selected = "day",
  choices = c("No Smoothing" = "day", "Weekly Median" = 
"week", "Monthly Median" = "month")),
@@ -114,7 +115,10 @@
   
column(polloi::timeframe_select("wiwosm_feature_usage_timeframe"), width = 4),
   
column(polloi::timeframe_daterange("wiwosm_feature_usage_timeframe"), width = 
4)),
 dygraphOutput("wiwosm_feature_usage"),
-includeMarkdown("./tab_documentation/wiwosm_usage.md"))
+includeMarkdown("./tab_documentation/wiwosm_usage.md")),
+tabItem(tabName = "geo_breakdown",
+dygraphOutput("users_by_country"),
+includeMarkdown("./tab_documentation/geo_breakdown.md"))
   )
 )
 
diff --git a/utils.R b/utils.R
index 028d186..f9b5c6b 100644
--- a/utils.R
+++ b/utils.R
@@ -35,3 +35,9 @@
 
   return(invisible())
 }
+
+read_countries <- function(){
+  interim <- polloi::read_dataset("maps/users_by_country.tsv")
+  interim$users <- interim$users*100
+  country_data <<- reshape2::dcast(interim, formula = date ~ country, 
fun.aggregate = sum)
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I216caa9960a29bc368dcfb99c576f1eab287ab97
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/wetzel
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 

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


[MediaWiki-commits] [Gerrit] Unpersist the session on logout - change (mediawiki/core)

2016-02-26 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Unpersist the session on logout
..

Unpersist the session on logout

Clearing the cookies in this case is probably a good idea.

This also clears cookies when a non-persisted session's metadata is
dirty, for parallelism with what happens to persisted sessions.

Bug: T127436
Change-Id: I76897eaac063e5e3c3563398d0f4cb36cf93783b
---
M includes/WebRequest.php
M includes/session/Session.php
M includes/session/SessionBackend.php
M includes/user/User.php
M tests/phpunit/includes/session/SessionBackendTest.php
M tests/phpunit/includes/session/SessionTest.php
6 files changed, 168 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/273524/1

diff --git a/includes/WebRequest.php b/includes/WebRequest.php
index 714ab97..6db5493 100644
--- a/includes/WebRequest.php
+++ b/includes/WebRequest.php
@@ -677,6 +677,16 @@
}
 
/**
+* Get the session for this request, if any
+* @since 1.27
+* @private For use by MediaWiki\\Session classes only
+* @return MediaWiki\\Session\\SessionId|null
+*/
+   public function getSessionId() {
+   return $this->sessionId;
+   }
+
+   /**
 * Returns true if the request has a persistent session.
 * This does not necessarily mean that the user is logged in!
 *
diff --git a/includes/session/Session.php b/includes/session/Session.php
index 96e8d50..21db609 100644
--- a/includes/session/Session.php
+++ b/includes/session/Session.php
@@ -125,6 +125,13 @@
}
 
/**
+* Make this session not be persisted across requests
+*/
+   public function unpersist() {
+   $this->backend->unpersist();
+   }
+
+   /**
 * Indicate whether the user should be remembered independently of the
 * session ID.
 * @return bool
diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index 0424a2d..1e2b476 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -284,6 +284,35 @@
}
 
/**
+* Make this session not persisted across requests
+*/
+   public function unpersist() {
+   if ( $this->persist ) {
+   // Close the PHP session, if we're the one that's open
+   if ( $this->usePhpSessionHandling && 
PHPSessionHandler::isEnabled() &&
+   session_id() === (string)$this->id
+   ) {
+   $this->logger->debug(
+   'SessionBackend "{session}" Closing PHP 
session for unpersist',
+   [ 'session' => $this->id ]
+   );
+   session_write_close();
+   session_id( '' );
+   }
+
+   $this->persist = false;
+   $this->forcePersist = true;
+   $this->metaDirty = true;
+
+   // Delete the session data, so the local cache-only 
write in
+   // self::save() doesn't get things out of sync with the 
backend.
+   $this->store->delete( wfMemcKey( 'MWSession', 
(string)$this->id ) );
+
+   $this->autosave();
+   }
+   }
+
+   /**
 * Indicate whether the user should be remembered independently of the
 * session ID.
 * @return bool
@@ -629,14 +658,22 @@
'forcePersist' => (int)$this->forcePersist,
] );
 
-   // Persist to the provider, if flagged
-   if ( $this->persist && ( $this->metaDirty || 
$this->forcePersist ) ) {
-   foreach ( $this->requests as $request ) {
-   $request->setSessionId( $this->getSessionId() );
-   $this->provider->persistSession( $this, 
$request );
-   }
-   if ( !$closing ) {
-   $this->checkPHPSession();
+   // Persist or unpersist to the provider, if necessary
+   if ( $this->metaDirty || $this->forcePersist ) {
+   if ( $this->persist ) {
+   foreach ( $this->requests as $request ) {
+   $request->setSessionId( 
$this->getSessionId() );
+   $this->provider->persistSession( $this, 
$request );
+   }
+   if ( !$closing ) {
+   $this->checkPHPSession();
+   }
+ 

[MediaWiki-commits] [Gerrit] Unpersist the session on session load failure - change (mediawiki/core)

2016-02-26 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Unpersist the session on session load failure
..

Unpersist the session on session load failure

There's no point in keeping broken cookies around, it just means all
future requests will continue to flood the logs.

Change-Id: Ib10c9ed9049b71ed434950fc731ea77960ceca0c
---
M includes/session/SessionManager.php
M tests/phpunit/includes/session/SessionManagerTest.php
2 files changed, 54 insertions(+), 1 deletion(-)


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

diff --git a/includes/session/SessionManager.php 
b/includes/session/SessionManager.php
index 6a8b8a3..58f995f 100644
--- a/includes/session/SessionManager.php
+++ b/includes/session/SessionManager.php
@@ -663,8 +663,14 @@
// This is going to error out 
below, but we want to
// provide a complete list.
$retInfos[] = $info;
+   } else {
+   // Session load failed, so 
unpersist it from this request
+   
$info->getProvider()->unpersistSession( $request );
}
}
+   } else {
+   // Session load failed, so unpersist it from 
this request
+   $info->getProvider()->unpersistSession( 
$request );
}
}
 
diff --git a/tests/phpunit/includes/session/SessionManagerTest.php 
b/tests/phpunit/includes/session/SessionManagerTest.php
index fe2c3b7..a1b9bb4 100644
--- a/tests/phpunit/includes/session/SessionManagerTest.php
+++ b/tests/phpunit/includes/session/SessionManagerTest.php
@@ -131,6 +131,8 @@
public function testGetSessionForRequest() {
$manager = $this->getManager();
$request = new \FauxRequest();
+   $request->unpersist1 = false;
+   $request->unpersist2 = false;
 
$id1 = '';
$id2 = '';
@@ -138,7 +140,7 @@
 
$providerBuilder = $this->getMockBuilder( 
'DummySessionProvider' )
->setMethods(
-   [ 'provideSessionInfo', 'newSessionInfo', 
'__toString', 'describe' ]
+   [ 'provideSessionInfo', 'newSessionInfo', 
'__toString', 'describe', 'unpersistSession' ]
);
 
$provider1 = $providerBuilder->getMock();
@@ -160,6 +162,10 @@
->will( $this->returnValue( 'Provider1' ) );
$provider1->expects( $this->any() )->method( 'describe' )
->will( $this->returnValue( '#1 sessions' ) );
+   $provider1->expects( $this->any() )->method( 'unpersistSession' 
)
+   ->will( $this->returnCallback( function ( $request ) {
+   $request->unpersist1 = true;
+   } ) );
 
$provider2 = $providerBuilder->getMock();
$provider2->expects( $this->any() )->method( 
'provideSessionInfo' )
@@ -171,6 +177,10 @@
->will( $this->returnValue( 'Provider2' ) );
$provider2->expects( $this->any() )->method( 'describe' )
->will( $this->returnValue( '#2 sessions' ) );
+   $provider2->expects( $this->any() )->method( 'unpersistSession' 
)
+   ->will( $this->returnCallback( function ( $request ) {
+   $request->unpersist2 = true;
+   } ) );
 
$this->config->set( 'SessionProviders', [
$this->objectCacheDef( $provider1 ),
@@ -183,6 +193,8 @@
$session = $manager->getSessionForRequest( $request );
$this->assertInstanceOf( 'MediaWiki\\Session\\Session', 
$session );
$this->assertSame( $idEmpty, $session->getId() );
+   $this->assertFalse( $request->unpersist1 );
+   $this->assertFalse( $request->unpersist2 );
 
// Both providers return info, picks best one
$request->info1 = new SessionInfo( SessionInfo::MIN_PRIORITY + 
1, [
@@ -200,6 +212,8 @@
$session = $manager->getSessionForRequest( $request );
$this->assertInstanceOf( 'MediaWiki\\Session\\Session', 
$session );
$this->assertSame( $id2, $session->getId() );
+   $this->assertFalse( $request->unpersist1 );
+   $this->assertFalse( $request->unpersist2 );
 
$request->info1 = new SessionInfo( SessionInfo::MIN_PRIORITY + 
2, [
  

[MediaWiki-commits] [Gerrit] ForeignNotifications::populate(): Fix max timestamp computation - change (mediawiki...Echo)

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

Change subject: ForeignNotifications::populate(): Fix max timestamp computation
..


ForeignNotifications::populate(): Fix max timestamp computation

We weren't using the maximum timestamp, just the most recently
encountered one.

Change-Id: Ie1cfd8130ab0c5077c4b720101d214d33e3ea9b4
---
M includes/ForeignNotifications.php
1 file changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/includes/ForeignNotifications.php 
b/includes/ForeignNotifications.php
index b0081a8..d75fcba 100644
--- a/includes/ForeignNotifications.php
+++ b/includes/ForeignNotifications.php
@@ -116,7 +116,19 @@
if ( $data['count'] > 0 ) {
$this->counts[$section] += 
$data['count'];
$this->wikis[$section][] = $wiki;
-   $this->timestamps[$section] = new 
MWTimestamp( $data['ts'] );
+
+   $timestamp = new MWTimestamp( 
$data['ts'] );
+   // We need $this->timestamp[$section] 
to be the max timestamp
+   // across all wikis.
+   // $timestamp < 
$this->timestamps[$section] = invert 0
+   // $timestamp > 
$this->timestamps[$section] = invert 1
+   if (
+   $this->timestamps[$section] === 
false ||
+   $timestamp->diff( 
$this->timestamps[$section] )->invert === 1
+   ) {
+   $this->timestamps[$section] = 
new MWTimestamp( $data['ts'] );
+   }
+
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1cfd8130ab0c5077c4b720101d214d33e3ea9b4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Handle async createSocket - change (mediawiki...parsoid)

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

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

Change subject: Handle async createSocket
..

Handle async createSocket

 * Apparently this method isn't public and my claim in ffaeda52 was
   bogus all along. In any case, in node v5.7 it changes.

Change-Id: I90783bc1fe6b37370591390c9a9aec1a56cba3d2
---
M lib/mw/ApiRequest.js
1 file changed, 31 insertions(+), 18 deletions(-)


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

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 5b5ade3..8b6dd38 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -25,25 +25,38 @@
}
util.inherits(ConnectTimeoutAgent, Agent);
 
-   ConnectTimeoutAgent.prototype.createSocket = function() {
-   var s = Agent.prototype.createSocket.apply(this, arguments);
-   // Set up a connect timeout if connectTimeout option is set
-   if (this.options.connectTimeout && !s.connectTimeoutTimer) {
-   s.connectTimeoutTimer = setTimeout(function() {
-   var e = new Error('ETIMEDOUT');
-   e.code = 'ETIMEDOUT';
-   s.end();
-   s.emit('error', e);
-   s.destroy();
-   }, this.options.connectTimeout);
-   s.once('connect',  function() {
-   if (this.connectTimeoutTimer) {
-   clearTimeout(this.connectTimeoutTimer);
-   this.connectTimeoutTimer = undefined;
-   }
-   });
+   ConnectTimeoutAgent.prototype.createSocket = function(req, opts, cb) {
+   var options = this.options;
+   function setup(err, s) {
+   if (err && typeof cb === 'function') {
+   cb(err, s);
+   return;
+   }
+   // Set up a connect timeout if connectTimeout option is 
set
+   if (options.connectTimeout && !s.connectTimeoutTimer) {
+   s.connectTimeoutTimer = setTimeout(function() {
+   var e = new Error('ETIMEDOUT');
+   e.code = 'ETIMEDOUT';
+   s.end();
+   s.emit('error', e);
+   s.destroy();
+   }, options.connectTimeout);
+   s.once('connect',  function() {
+   if (s.connectTimeoutTimer) {
+   
clearTimeout(s.connectTimeoutTimer);
+   s.connectTimeoutTimer = 
undefined;
+   }
+   });
+   }
+   if (typeof cb === 'function') {
+   cb(null, s);
+   }
}
-   return s;
+   var sock = Agent.prototype.createSocket.apply(this, [req, opts, 
setup]);
+   if (sock) {
+   setup(null, sock);
+   return sock;
+   }
};
 
http.globalAgent = new ConnectTimeoutAgent({

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

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

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


[MediaWiki-commits] [Gerrit] ForeignNotifications::populate(): Fix max timestamp computation - change (mediawiki...Echo)

2016-02-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: ForeignNotifications::populate(): Fix max timestamp computation
..

ForeignNotifications::populate(): Fix max timestamp computation

We weren't using the maximum timestamp, just the most recently
encountered one.

Change-Id: Ie1cfd8130ab0c5077c4b720101d214d33e3ea9b4
---
M includes/ForeignNotifications.php
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/21/273521/1

diff --git a/includes/ForeignNotifications.php 
b/includes/ForeignNotifications.php
index b0081a8..4efd64e 100644
--- a/includes/ForeignNotifications.php
+++ b/includes/ForeignNotifications.php
@@ -116,7 +116,19 @@
if ( $data['count'] > 0 ) {
$this->counts[$section] += 
$data['count'];
$this->wikis[$section][] = $wiki;
-   $this->timestamps[$section] = new 
MWTimestamp( $data['ts'] );
+
+   $timestamp = new MWTimestamp( 
$data['ts'] );
+   // We need $this->timestamp[$section] 
to be the max timestamp
+   // across all wikis.
+   // $timestamp < 
$this->timestamps[$section] = invert 0
+   // $timestamp > 
$this->timestamps[$section] = invert 1
+   if (
+   !isset( 
$this->timestamps[$section] ) ||
+   $timestamp->diff( 
$this->timestamps[$section] )->invert === 1
+   ) {
+   $this->timestamps[$section] = 
new MWTimestamp( $data['ts'] );
+   }
+
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1cfd8130ab0c5077c4b720101d214d33e3ea9b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Add references list at the bottom of sections on talk page - change (mediawiki...Cite)

2016-02-26 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Add references list at the bottom of sections on talk page
..

Add references list at the bottom of sections on talk page

This automatically adds references at the bottom of sections
on talk pages. This is done to pages in talk namespaces though
exceptions can be added to MediaWiki:Cite-non-talk-pages.json.
Also, pages in $wgExtraSignatureNamespaces can be opted in with
MediaWiki:Cite-non-talk-pages.json.

In both cases, a page 'Wikipedia:Foo Bar' should be added as
'Wikipedia:Foo_Bar' to be listed, or as 'Wikipedia:Foo_Bar/'
to have all its subpages listed.

Bug: T70324
Depends-on:
Change-Id: I5967c6c9e83e1c9757dba5bdcf010214485f58a7
---
M Cite_body.php
1 file changed, 98 insertions(+), 0 deletions(-)


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

diff --git a/Cite_body.php b/Cite_body.php
index 4bcab61..c15c133 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -186,6 +186,12 @@
 */
static protected $hooksInstalled = false;
 
+   /**
+* Did we check talk page status and install conditional hook yet?
+* @var Boolean
+*/
+   static protected $talkPageCheckDone = false;
+
/**#@+ @access private */
 
/**
@@ -1179,6 +1185,97 @@
}
 
/**
+* Called before internal parse
+* The parser title is now defined and can be used to check if we're on 
a talk page.
+* If we are, set the ParserNewHeadingDone hook.
+*
+* @param $parser Parser
+*/
+   public function checkIsTalkPage( $parser ) {
+   global $wgContentNamespaces, $wgExtraSignatureNamespaces;
+   if ( self::$talkPageCheckDone ) {
+   return true;
+   }
+   self::$talkPageCheckDone = true;
+   $title = $parser->getTitle();
+   if ( in_array( $title->getNamespace(), $wgContentNamespaces ) ) 
{
+   // pages in content namespaces are never talk pages
+   return true;
+   }
+   if ( $parser->getOptions()->getIsSectionPreview() ) {
+   // already handled in general by checkRefsNoReferences
+   return true;
+   }
+   if ( !$title->isTalkPage() ) {
+   if ( in_array( $title->getNamespace(), 
$wgExtraSignatureNamespaces ) ) {
+   // allow pages in these namespaces to be 
considered talk pages
+   $name = $title->getPrefixedDBkey();
+   $msg = wfMessage( 'cite-talk-pages.json' );
+   if ( !$msg->exists() ) {
+   return true;
+   }
+   $array = json_decode( 
$msg->inContentLanguage()->plain(), true );
+   foreach ( $array as $string ) {
+   if ( $name === $string ||
+   ( substr( $string, -1 ) === '/' && 
strpos( $name, $string ) === 0 )
+   ) {
+   self::setupTalkPageHook( 
$parser );
+   return true;
+   }
+   }
+   return true;
+   }
+   return true;
+   }
+   self::setupTalkPageHook( $parser );
+   return true;
+   }
+
+   /**
+* @param $parser Parser
+*/
+   protected static function setupTalkPageHook( Parser $parser ) {
+   global $wgHooks;
+   $name = $parser->getTitle()->getPrefixedDBkey();
+   $msg = wfMessage( 'cite-non-talk-pages.json' );
+   if ( !$msg->exists() ) {
+   $wgHooks['ParserNewHeadingDone'][] = array( 
$parser->extCite, 'checkRefsNoReferencesTalkSection' );
+   return;
+   }
+   $array = json_decode( $msg->inContentLanguage()->plain(), true 
);
+   foreach ( $array as $string ) {
+   if ( $name === $string || ( substr( $string, -1 ) === 
'/' && strpos( $name, $string ) === 0 ) ) {
+   return;
+   }
+   }
+   $wgHooks['ParserNewHeadingDone'][] = array( $parser->extCite, 
'checkRefsNoReferencesTalkSection' ); 
+   }
+
+   /**
+* Called when headings are expanded by the parser on talk pages
+* Used to automatically generate a list of references at the bottom of 
sections
+*
+* @pa

[MediaWiki-commits] [Gerrit] Add ParserNewHeadingDone hook - change (mediawiki/core)

2016-02-26 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Add ParserNewHeadingDone hook
..

Add ParserNewHeadingDone hook

This adds a new ParserNewHeadingDone called (indirectly) from the
preprocessor when headers are expanded. This allows extensions to
add extra text or markers for html just before, or just after, headers.
This supplements ParserSectionCreate which can't be used in some cases.

Bug: T128208
Change-Id: I8caf5c7e21c19709ca580e117116f6d1461aeb7e
---
M docs/hooks.txt
M includes/parser/Parser.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
4 files changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/273519/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 930aa0a..583c4dd 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2313,6 +2313,12 @@
 &$params: 2-D array of parameters
 $parser: Parser object that called the hook
 
+'ParserNewHeadingDone': Called during preprocessor expansion when each header 
is made.
+$parser: parser object
+$index: number of the header (starting at 1)
+&$text: text being parsed
+&$stripState: stripState used (object)
+
 'ParserSectionCreate': Called each time the parser creates a document section
 from wikitext. Use this to apply per-section modifications to HTML (like
 wrapping the section in a DIV).  Caveat: DIVs are valid wikitext, and a DIV
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 477d1f7..d9c250c 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -6466,4 +6466,17 @@
OutputPage::setupOOUI();
$this->mOutput->setEnableOOUI( true );
}
+
+   /**
+* Called in Preprocessor when a new header is expanded
+*
+* @param int $index Header number
+* @param string $text Expanded text for header
+*
+* @since 1.27
+*/
+   public function newHeadingDone( $index, &$text ) {
+   $index++; // so that it matches sections numbering
+   Hooks::run( 'ParserNewHeadingDone', [ $this, $index, &$text, 
&$this->mStripState ] );
+   }
 }
diff --git a/includes/parser/Preprocessor_DOM.php 
b/includes/parser/Preprocessor_DOM.php
index 79a66e0..161a186 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -1260,6 +1260,7 @@
$count = 
$contextNode->getAttribute( 'level' );
$s = substr( $s, 0, $count ) . 
$marker . substr( $s, $count );

$this->parser->mStripState->addGeneral( $marker, '' );
+   $this->parser->newHeadingDone( 
$serial, &$s );
}
$out .= $s;
} else {
diff --git a/includes/parser/Preprocessor_Hash.php 
b/includes/parser/Preprocessor_Hash.php
index 24baae4..0823bba 100644
--- a/includes/parser/Preprocessor_Hash.php
+++ b/includes/parser/Preprocessor_Hash.php
@@ -1148,6 +1148,7 @@
$marker = Parser::MARKER_PREFIX 
. "-h-$serial-" . Parser::MARKER_SUFFIX;
$s = substr( $s, 0, 
$bits['level'] ) . $marker . substr( $s, $bits['level'] );

$this->parser->mStripState->addGeneral( $marker, '' );
+   $this->parser->newHeadingDone( 
$serial, &$s );
$out .= $s;
} else {
# Expand in virtual stack

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

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

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


[MediaWiki-commits] [Gerrit] Reorder x-wiki bundles to be after local notifications - change (mediawiki...Echo)

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

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

Change subject: Reorder x-wiki bundles to be after local notifications
..

Reorder x-wiki bundles to be after local notifications

Bug: T127422
Change-Id: I81ae2e13612168a598c32f130a625eadc0325c8f
---
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 196ef71..79f3715 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -71,6 +71,10 @@
return -1; // Unread items are always above 
read items
} else if ( a.isRead() && !b.isRead() ) {
return 1;
+   } else if ( !a.isForeign() && b.isForeign() ) {
+   return -1;
+   } else if ( a.isForeign() && !b.isForeign() ) {
+   return 1;
} else {
// Reverse sorting
diff = Number( b.getTimestamp() ) - Number( 
a.getTimestamp() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81ae2e13612168a598c32f130a625eadc0325c8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Designate.conf: Specify some more pool_target settings - change (operations/puppet)

2016-02-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Designate.conf: Specify some more pool_target settings
..


Designate.conf: Specify some more pool_target settings

Change-Id: I060ca94d196b21df9a6aebbbd7210c5d2cb33897
---
M modules/openstack/templates/liberty/designate/designate.conf.erb
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/templates/liberty/designate/designate.conf.erb 
b/modules/openstack/templates/liberty/designate/designate.conf.erb
index b8af373..3bfdd09 100644
--- a/modules/openstack/templates/liberty/designate/designate.conf.erb
+++ b/modules/openstack/templates/liberty/designate/designate.conf.erb
@@ -154,6 +154,7 @@
 [pool:794ccc2c-d751-44fe-b57f-8894c9f5c842]
 nameservers = 0f66b842-96c2-4189-93fc-1dc95a08b012, 
17474d59-a989-48fb-9f8b-19fbdaeff243
 targets = f26e0b32-736f-4f0a-831b-039a415c481e
+also_notifies = <%= @secondary_pdns_ip %>:53
 
 # A 'pool_nameserver' is a pdns instance that receives axfr updates.
 # This is the primary dns server, currently 'labservices1001'
@@ -180,6 +181,11 @@
 #  UPDATE pdns.domains SET master=""
 masters = <%= scope.function_ipresolve([@fqdn, 4]) %>:5354
 type = powerdns
+# as I understand it, this is to send notifications to the primary pdns server.
+#  the other server should get notices via the 'also_notifies' setting above.
+host = <%= @primary_pdns_ip %>
+port = 53
+
 
 ##
 ## Network API

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

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

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


[MediaWiki-commits] [Gerrit] Designate.conf: Specify some more pool_target settings - change (operations/puppet)

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

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

Change subject: Designate.conf: Specify some more pool_target settings
..

Designate.conf: Specify some more pool_target settings

Change-Id: I060ca94d196b21df9a6aebbbd7210c5d2cb33897
---
M modules/openstack/templates/liberty/designate/designate.conf.erb
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/273517/1

diff --git a/modules/openstack/templates/liberty/designate/designate.conf.erb 
b/modules/openstack/templates/liberty/designate/designate.conf.erb
index b8af373..3bfdd09 100644
--- a/modules/openstack/templates/liberty/designate/designate.conf.erb
+++ b/modules/openstack/templates/liberty/designate/designate.conf.erb
@@ -154,6 +154,7 @@
 [pool:794ccc2c-d751-44fe-b57f-8894c9f5c842]
 nameservers = 0f66b842-96c2-4189-93fc-1dc95a08b012, 
17474d59-a989-48fb-9f8b-19fbdaeff243
 targets = f26e0b32-736f-4f0a-831b-039a415c481e
+also_notifies = <%= @secondary_pdns_ip %>:53
 
 # A 'pool_nameserver' is a pdns instance that receives axfr updates.
 # This is the primary dns server, currently 'labservices1001'
@@ -180,6 +181,11 @@
 #  UPDATE pdns.domains SET master=""
 masters = <%= scope.function_ipresolve([@fqdn, 4]) %>:5354
 type = powerdns
+# as I understand it, this is to send notifications to the primary pdns server.
+#  the other server should get notices via the 'also_notifies' setting above.
+host = <%= @primary_pdns_ip %>
+port = 53
+
 
 ##
 ## Network API

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I060ca94d196b21df9a6aebbbd7210c5d2cb33897
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] Hygiene: Remove an old file - change (mediawiki...MobileFrontend)

2016-02-26 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Hygiene: Remove an old file
..

Hygiene: Remove an old file

Dependency: I4878e3f33b7379efdfb1eaffe87a6c842882e183
Bug: T122504
Change-Id: I9d7f23f2bfdf3de30534ff2dfa1ca457d7586a9f
---
M includes/MobileFrontend.hooks.php
D resources/mobile.loggingSchemas/SchemaMobileWebClickTracking.js
2 files changed, 0 insertions(+), 100 deletions(-)


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

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 95e1bba..420ebd0 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1172,7 +1172,6 @@
 
$scripts = array(
'resources/mobile.loggingSchemas/SchemaMobileWeb.js',
-   
'resources/mobile.loggingSchemas/SchemaMobileWebClickTracking.js',

'resources/mobile.loggingSchemas/schemaMobileWebLanguageSwitcher.js',
);
 
diff --git a/resources/mobile.loggingSchemas/SchemaMobileWebClickTracking.js 
b/resources/mobile.loggingSchemas/SchemaMobileWebClickTracking.js
deleted file mode 100644
index 53f151c..000
--- a/resources/mobile.loggingSchemas/SchemaMobileWebClickTracking.js
+++ /dev/null
@@ -1,99 +0,0 @@
-( function ( M, $ ) {
-   var SchemaMobileWeb = M.require( 
'mobile.loggingSchemas/SchemaMobileWeb' ),
-   user = M.require( 'mobile.user/user' ),
-   s = M.require( 'mobile.settings/settings' );
-
-   /**
-* Using localStorage track an event but delay recording it on the
-* server until the next page load. Throw an error if schema is not
-* one of the predefined values.
-*
-* @method
-* @ignore
-* @param {String} schemaName valid schema name.
-* @param {String} name of click tracking event to log
-* @param {String} href the link that has been clicked.
-*/
-   function futureLog( schemaName, name, href ) {
-   s.save( 'MobileWebClickTracking-schema', schemaName );
-   s.save( 'MobileWebClickTracking-name', name );
-   s.save( 'MobileWebClickTracking-href', href );
-   }
-
-   /**
-* Log a past click tracking event to the server.
-* @method
-* @ignore
-*/
-   function logPastEvent() {
-   var schema,
-   schemaName = s.get( 'MobileWebClickTracking-schema' ),
-   name = s.get( 'MobileWebClickTracking-name' ),
-   href = s.get( 'MobileWebClickTracking-href' );
-
-   // Make sure they do not log a second time...
-   if ( schemaName && name && href ) {
-   s.remove( 'MobileWebClickTracking-schema' );
-   s.remove( 'MobileWebClickTracking-name' );
-   s.remove( 'MobileWebClickTracking-href' );
-   schema = new SchemaMobileWebClickTracking( {
-   name: name,
-   destination: href
-   }, schemaName );
-   schema.log();
-   }
-   }
-
-   /**
-* @class SchemaMobileWebClickTracking
-* @extends Schema
-*/
-   function SchemaMobileWebClickTracking() {
-   SchemaMobileWeb.apply( this, arguments );
-   }
-   OO.mfExtend( SchemaMobileWebClickTracking, SchemaMobileWeb, {
-   /**
-* @inheritdoc
-*
-* @cfg {Object} defaults Default options hash.
-* @cfg {String|undefined} defaults.username Username if the 
user is logged in, otherwise -
-* undefined. Assigning undefined will make event logger omit 
this property when sending
-* the data to a server. According to the schema username is 
optional.
-* @cfg {Number|undefined} defaults.userEditCount The number of 
edits the user has made
-* if the user is logged in, otherwise - undefined. Assigning 
undefined will make event
-* logger omit this property when sending the data to a server. 
According to the schema
-* userEditCount is optional.
-*/
-   defaults: $.extend( {}, SchemaMobileWeb.prototype.defaults, {
-   // FIXME: Introduce a SchemaWithUser class that has 
username and userEditCount
-   username: user.getName() || undefined,
-   userEditCount: typeof user.getEditCount() === 'number' 
? user.getEditCount() : undefined
-   } ),
-   /**
-* @inheritdoc
-*/
-   isSampled: true,
-   /**
-

[MediaWiki-commits] [Gerrit] fix up use of environment variable. - change (mediawiki...ApprovedRevs)

2016-02-26 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: fix up use of environment variable.
..


fix up use of environment variable.

Change-Id: Ieef22de4a014ec939b834ba9a953672505c4577c
---
M maintenance/approveAllPages.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/approveAllPages.php b/maintenance/approveAllPages.php
index 7c812b9..d9e1502 100644
--- a/maintenance/approveAllPages.php
+++ b/maintenance/approveAllPages.php
@@ -31,8 +31,8 @@
 // Allow people to have different layouts.
 if ( ! isset( $IP ) ) {
$IP = __DIR__ . '/../../../';
-   if ( getenv("MW_INSTALL_ROOT") ) {
-   $IP = getenv("MW_INSTALL_ROOT");
+   if ( getenv("MW_INSTALL_PATH") ) {
+   $IP = getenv("MW_INSTALL_PATH");
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieef22de4a014ec939b834ba9a953672505c4577c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: Aklapper 
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] Add more Latin American methods for AstroPay - change (wikimedia...crm)

2016-02-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add more Latin American methods for AstroPay
..

Add more Latin American methods for AstroPay

New methods for each new credit card and cash payment type
detailed in our master processor doc. Looks like we haven't been
breaking out the bank transfer methods, so not creating those.

Bug: T124323
Change-Id: Ic628306bd40809ccfc34178320b946ce61182d02
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 90 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/15/273515/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index fcf45ef..9ae5e1c 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -51,6 +51,7 @@
 wmf_civicrm_update_7120();
 wmf_civicrm_update_7170();
 wmf_civicrm_update_7180();
+wmf_civicrm_update_7185();
 }
 
 /**
@@ -1885,3 +1886,32 @@
  v.name IS NULL
   ");
 }
+
+/**
+ * Add Latin American payment methods for AstroPay
+ */
+function wmf_civicrm_update_7185() {
+$payment_instruments = array(
+'Credit Card: Elo',
+'Credit Card: HiperCard',
+'Credit Card: MercadoLivre',
+'Credit Card: Cabal',
+'Credit Card: Naranja',
+'Credit Card: Tarjeta Shopping',
+'Credit Card: Nativa',
+'Credit Card: Cencosud',
+'Credit Card: Argencard',
+'Credit Card: Webpay',
+'Banamex',
+'Bancomer',
+'Davivienda',
+'Efecty',
+'OXXO',
+'Pago Facil',
+'Red Pagos',
+'Rapi Pago',
+'Santander',
+);
+wmf_civicrm_bootstrap_civi();
+wmf_civicrm_create_option_values( 'payment_instrument', 
$payment_instruments );
+}
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 0a1167d..b6e35ba 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -601,6 +601,36 @@
 case 'diners':
 $payment_instrument .= ': Diners';
 break;
+case 'elo':
+$payment_instrument .= ': Elo';
+break;
+case 'hiper':
+$payment_instrument .= ': HiperCard';
+break;
+case 'mercadolivre':
+$payment_instrument .= ': MercadoLivre';
+break;
+case 'cabal':
+$payment_instrument .= ': Cabal';
+break;
+case 'naranja':
+$payment_instrument .= ': Naranja';
+break;
+case 'shopping':
+$payment_instrument .= ': Tarjeta Shopping';
+break;
+case 'nativa':
+$payment_instrument .= ': Nativa';
+break;
+case 'cencosud':
+$payment_instrument .= ': Cencosud';
+break;
+case 'argen':
+$payment_instrument .= ': Argencard';
+break;
+case 'webpay':
+$payment_instrument .= ': Webpay';
+break;
 }
 break;
 case 'dd':
@@ -655,9 +685,9 @@
 break;
 }
 break;
-   case 'stock':
-   $payment_instrument = 'Stock';
-   break;
+case 'stock':
+$payment_instrument = 'Stock';
+break;
 case 'cash':
 $payment_instrument = 'Cash';
 //'cash_boleto' - Only one right now. I assume there might be 
more later?
@@ -665,6 +695,33 @@
 case 'cash_boleto':
 $payment_instrument = 'Boleto';
 break;
+case 'cash_banamex':
+$payment_instrument = 'Banamex';
+break;
+case 'cash_bancomer':
+$payment_instrument = 'Bancomer';
+break;
+case 'cash_davivienda':
+$payment_instrument = 'Davivienda';
+break;
+case 'cash_efecty':
+$payment_instrument = 'Efecty';
+break;
+case 'cash_oxxo':
+ 

[MediaWiki-commits] [Gerrit] Update WMF address - change (operations/mediawiki-config)

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

Change subject: Update WMF address
..


Update WMF address

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d9b0caf..ccd8a65 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14835,7 +14835,7 @@
'default' => true,
 ),
 'wmgEchoEmailFooterAddress' => array(
-   'default' => 'Wikimedia Foundation, 149 New Montgomery St., 3rd Fl., 
San Francisco, CA 94105, USA',
+   'default' => 'Wikimedia Foundation, 149 New Montgomery St., 6th Fl., 
San Francisco, CA 94105, USA',
 ),
 'wmgEchoHelpPage' => array(
'default' => 
'//www.mediawiki.org/wiki/Special:MyLanguage/Help:Notifications',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c7cd65ab2e14cecf2531b5fd5baf84959758a5e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update mobile event logging code - change (mediawiki...Thanks)

2016-02-26 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Update mobile event logging code
..

Update mobile event logging code

MobileWebDiffClickTracking schema has changed, make a change here too.

Change-Id: I4878e3f33b7379efdfb1eaffe87a6c842882e183
See: I71fb074226c3d0f0a0d8a32de3794158adfb0e48
Bug: T122504
---
M extension.json
M modules/ext.thanks.mobilediff.js
2 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/extension.json b/extension.json
index ebfbe07..91ebb04 100644
--- a/extension.json
+++ b/extension.json
@@ -100,7 +100,8 @@
"dependencies": [
"mobile.special.mobilediff.scripts",
"mediawiki.api",
-   "mobile.toast"
+   "mobile.toast",
+   
"mobile.loggingSchemas.mobileWebDiffClickTracking"
],
"targets": [
"desktop",
diff --git a/modules/ext.thanks.mobilediff.js b/modules/ext.thanks.mobilediff.js
index a897ae3..dba8480 100644
--- a/modules/ext.thanks.mobilediff.js
+++ b/modules/ext.thanks.mobilediff.js
@@ -1,7 +1,5 @@
 ( function ( mw, M, $ ) {
-   var popup = M.require( 'mobile.toast/toast' ),
-   SchemaMobileWebClickTracking = M.require( 
'mobile.loggingSchemas/SchemaMobileWebClickTracking' ),
-   schema = new SchemaMobileWebClickTracking( {}, 
'MobileWebDiffClickTracking' );
+   var popup = M.require( 'mobile.toast/toast' );
 
/**
 * Create a thank button for a given edit
@@ -60,7 +58,7 @@
)
.on( 'click', function () {
var $this = $( this );
-   schema.log( {
+   mw.track( 
'mf.schemaMobileWebDiffClickTracking', {
name: 'thank',
destination: name
} );

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

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

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


[MediaWiki-commits] [Gerrit] Fix repeating background images - change (mediawiki...MoodBar)

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

Change subject: Fix repeating background images
..


Fix repeating background images

Bug: T126311
Change-Id: Ib31a80298d0fcff731f2f61b9c9844f8ba2fc4db
---
M modules/ext.moodBar/ext.moodBar.core.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ext.moodBar/ext.moodBar.core.css 
b/modules/ext.moodBar/ext.moodBar.core.css
index 87ba9e0..759be83 100644
--- a/modules/ext.moodBar/ext.moodBar.core.css
+++ b/modules/ext.moodBar/ext.moodBar.core.css
@@ -50,7 +50,7 @@
min-width: 42px;
margin: 15px;
padding: 42px 0 5px 0;
-   /* @embed */
+   background-repeat: no-repeat;
display: inline-block;
/*display: inline;*/
 }

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

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

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


[MediaWiki-commits] [Gerrit] Add external referral traffic (and fix links) - change (wikimedia...prince)

2016-02-26 Thread OliverKeyes (Code Review)
OliverKeyes has submitted this change and it was merged.

Change subject: Add external referral traffic (and fix links)
..


Add external referral traffic (and fix links)

Bug: T127868
Change-Id: I61da25f48a6af81005eb0b7f3a7d95cb4ea18f4e
---
M functions.R
M server.R
M tab_documentation/breakdown.md
M tab_documentation/browsers.md
M tab_documentation/dwelltime.md
M tab_documentation/geography.md
M tab_documentation/pageviews.md
A tab_documentation/referers_byengine.md
A tab_documentation/referers_summary.md
M ui.R
10 files changed, 129 insertions(+), 10 deletions(-)

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



diff --git a/functions.R b/functions.R
index a429dc6..7d7e379 100644
--- a/functions.R
+++ b/functions.R
@@ -53,6 +53,35 @@
   pageview_data <<- polloi::read_dataset(path = "portal/portal_pageviews.tsv")
 }
 
+read_referrals <- function(){
+  
+  # Read in the initial data
+  data <- as.data.table(polloi::read_dataset(path = 
"portal/portal_referer_data.tsv"))
+  
+  # Format
+  data$is_search <- ifelse(data$is_search, "Referred by search", "Not referred 
by search")
+  data$search_engine[data$search_engine %in% c("none","None")] <- "Not 
referred by search"
+  
+  # Write out the overall values for traffic
+  interim <- data[, j = list(pageviews = sum(pageviews)),
+by = c("date", "is_search")] %>%
+reshape2::dcast(formula = date ~ is_search, fun.aggregate = sum)
+  interim$Total <- interim$`Not referred by search` + interim$`Referred by 
search`
+  interim$`Not referred by search` <- round(100*interim$`Not referred by 
search`/interim$Total, 2)
+  interim$`Referred by search` <- round(100*interim$`Referred by 
search`/interim$Total, 2)
+  summary_traffic_data <<- interim[, 1:3]
+  
+  # Generate per-engine values
+  interim <- data[data$search_engine != "Not referred by search",
+  j = list(pageviews = sum(pageviews)),
+  by = c("date", "search_engine")] %>%
+reshape2::dcast(formula = date ~ search_engine, fun.aggregate = sum)
+  bysearch_traffic_data <<- cbind(date = interim$date, 
data.frame(round(100*t(apply(interim[, -1], 1, function(x) { x/sum(x) })), 2)))
+  
+  return(invisible())
+  
+}
+
 # Fits an exponential model to the data and returns the rate of growth (or 
decay!)
 get_exp_rate <- function(dates, y) {
   time_frame <- range(dates)
diff --git a/server.R b/server.R
index 59a1ae2..47c32bc 100644
--- a/server.R
+++ b/server.R
@@ -11,6 +11,7 @@
 read_country()
read_useragents()
read_pageviews()
+   read_referrals()
 existing_date <<- Sys.Date()
   }
   
@@ -138,4 +139,27 @@
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70)
   })
+  
+  output$referer_summary_dygraph <- renderDygraph({
+summary_traffic_data %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_referer_summary)) 
%>%
+  polloi::make_dygraph(xlab = "Date", ylab = "% of Pageviews",
+   title = "Traffic to Wikipedia Portal brown down by 
origin") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyAxis("y", valueFormatter = 'function(x) { return x + "%"; }') %>%
+  dyLegend(labelsDiv = "referer_summary_legend", show = "always", width = 
400)
+  })
+  
+  output$search_engines_dygraph <- renderDygraph({
+bysearch_traffic_data %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_search_engines)) 
%>%
+  polloi::make_dygraph(xlab = "Date", ylab = "% of Pageviews",
+   title = "Traffic to Wikipedia Portal broken down by 
search engine") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyAxis("y", valueFormatter = 'function(x) { return x + "%"; }') %>%
+  dyLegend(labelsDiv = "search_engines_legend", show = "always", width = 
400)
+  })
+  
 })
diff --git a/tab_documentation/breakdown.md b/tab_documentation/breakdown.md
index beb3b10..ad2a190 100644
--- a/tab_documentation/breakdown.md
+++ b/tab_documentation/breakdown.md
@@ -32,7 +32,7 @@
 
 
   Link to this dashboard:
-  http://discovery.wmflabs.org/portal/#clickthrough_breakdown";>
-http://discovery.wmflabs.org/portal/#clickthrough_breakdown
+  http://discovery.wmflabs.org/portal/#action_breakdown";>
+http://discovery.wmflabs.org/portal/#action_breakdown
   
 
diff --git a/tab_documentation/browsers.md b/tab_documentation/browsers.md
index 14aa0a9..22f50eb 100644
--- a/tab_documentation/browsers.md
+++ b/tab_documentation/browsers.md
@@ -20,7 +20,7 @@
 
 
   Link to this dashboard:
-  http://discovery.wmflabs.org/portal

[MediaWiki-commits] [Gerrit] Add running eventlogging-devserver to role::eventlogging - change (mediawiki/vagrant)

2016-02-26 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Add running eventlogging-devserver to role::eventlogging
..

Add running eventlogging-devserver to role::eventlogging

This allows for testing of client side events via /event.gif.

We want to use this with testing a change to the Mediawiki
EventLogging extension that will make Mediawiki log events
via http in the same way that external clients do.

Bug: T127209
Change-Id: I52704bff830499308febf1d916d3e912b4c27a61
---
A puppet/modules/eventlogging/manifests/devserver.pp
A puppet/modules/eventlogging/templates/devserver.upstart.erb
M puppet/modules/role/manifests/eventlogging.pp
3 files changed, 42 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/13/273513/1

diff --git a/puppet/modules/eventlogging/manifests/devserver.pp 
b/puppet/modules/eventlogging/manifests/devserver.pp
new file mode 100644
index 000..d4eb767
--- /dev/null
+++ b/puppet/modules/eventlogging/manifests/devserver.pp
@@ -0,0 +1,22 @@
+# == Class eventlogging::devserver
+#
+class eventlogging::devserver(
+$output_file = '/vagrant/logs/eventlogging.log',
+) {
+require ::eventlogging
+
+# Local variable for ease of use in service.upstart.erb template.
+$eventlogging_path = $::eventlogging::path
+file { "/etc/init/eventlogging-devserver.conf":
+content => template('eventlogging/devserver.upstart.erb'),
+}
+
+service { 'eventlogging-devserver':
+ensure=> 'running',
+enable=> true,
+provider  => 'upstart',
+subscribe => [
+File["/etc/init/eventlogging-devserver.conf"],
+],
+}
+}
diff --git a/puppet/modules/eventlogging/templates/devserver.upstart.erb 
b/puppet/modules/eventlogging/templates/devserver.upstart.erb
new file mode 100644
index 000..7b89c7f
--- /dev/null
+++ b/puppet/modules/eventlogging/templates/devserver.upstart.erb
@@ -0,0 +1,13 @@
+#
+### THIS FILE IS MANAGED BY PUPPET
+#
+
+description "EventLogging Dev Server"
+
+start on web
+respawn
+
+setuid www-data
+setgid www-data
+
+exec <%= @eventlogging_path %>/virtualenv/bin/eventlogging-devserver 
--append-to <%= @output_file %>
diff --git a/puppet/modules/role/manifests/eventlogging.pp 
b/puppet/modules/role/manifests/eventlogging.pp
index a68823f..74712a0 100644
--- a/puppet/modules/role/manifests/eventlogging.pp
+++ b/puppet/modules/role/manifests/eventlogging.pp
@@ -8,8 +8,15 @@
 include ::apache::mod::headers
 
 # Define a 'ELDevServer' parameter for Apache  checks.
+# This proxies :8080/event.gif to :8100/event.gif, which
+# will be the eventlogging-devserver writing logs to
+# /vagrant/logs/eventlogging.log
 apache::def { 'ELDevServer': }
 
+# Set up the eventlogging-devserver.
+# This listens on port 8100.
+include ::eventlogging::devserver
+
 mediawiki::extension { 'EventLogging':
 priority => $::LOAD_EARLY,
 settings => {

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

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

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


[MediaWiki-commits] [Gerrit] Pin the cloud archive at the same priority as wikimedia repo - change (operations/puppet)

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

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

Change subject: Pin the cloud archive at the same priority as wikimedia repo
..

Pin the cloud archive at the same priority as wikimedia repo

This will allow us to upgrade to cloud-archive package versions even
if there are older custom versions in the wmf repo.

Change-Id: I955367800ead3108b70d925466dd28b72d8f871f
---
M modules/openstack/manifests/repo.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/273512/1

diff --git a/modules/openstack/manifests/repo.pp 
b/modules/openstack/manifests/repo.pp
index 566be29..9bcc18e 100644
--- a/modules/openstack/manifests/repo.pp
+++ b/modules/openstack/manifests/repo.pp
@@ -14,5 +14,13 @@
 keyfile=> 'puppet:///files/misc/ubuntu-cloud.key';
 # lint:endignore
 }
+
+# Pick newer versions of packages from the cloud archive even if there 
are
+#  custom older versions in the wikimedia repo
+apt::pin { 'wikimedia':
+package  => '*',
+pin  => "release n=trusty-updates/${openstack_version}",
+priority => 1001,
+}
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I955367800ead3108b70d925466dd28b72d8f871f
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] Improve SessionManager unit test coverage, and fix two names... - change (mediawiki/core)

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

Change subject: Improve SessionManager unit test coverage, and fix two 
namespacing bugs
..


Improve SessionManager unit test coverage, and fix two namespacing bugs

Change-Id: Ie0bcba77625e04ca3e89eb400626f63024c6e1a1
---
M includes/session/BotPasswordSessionProvider.php
M includes/session/MetadataMergeException.php
M includes/session/PHPSessionHandler.php
M includes/session/SessionManager.php
M tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
M tests/phpunit/includes/session/CookieSessionProviderTest.php
A tests/phpunit/includes/session/MetadataMergeExceptionTest.php
M tests/phpunit/includes/session/SessionBackendTest.php
M tests/phpunit/includes/session/SessionProviderTest.php
9 files changed, 162 insertions(+), 2 deletions(-)

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



diff --git a/includes/session/BotPasswordSessionProvider.php 
b/includes/session/BotPasswordSessionProvider.php
index 44199bd..70c771d 100644
--- a/includes/session/BotPasswordSessionProvider.php
+++ b/includes/session/BotPasswordSessionProvider.php
@@ -165,16 +165,19 @@
return true;
}
 
+   /**
+* @codeCoverageIgnore
+*/
public function preventSessionsForUser( $username ) {
BotPassword::removeAllPasswordsForUser( $username );
}
 
public function getAllowedUserRights( SessionBackend $backend ) {
if ( $backend->getProvider() !== $this ) {
-   throw new InvalidArgumentException( 'Backend\'s 
provider isn\'t $this' );
+   throw new \InvalidArgumentException( 'Backend\'s 
provider isn\'t $this' );
}
$data = $backend->getProviderMetadata();
-   if ( $data ) {
+   if ( $data && isset( $data['rights'] ) && is_array( 
$data['rights'] ) ) {
return $data['rights'];
}
 
diff --git a/includes/session/MetadataMergeException.php 
b/includes/session/MetadataMergeException.php
index 9f42c27..882084d 100644
--- a/includes/session/MetadataMergeException.php
+++ b/includes/session/MetadataMergeException.php
@@ -22,6 +22,7 @@
 
 namespace MediaWiki\Session;
 
+use Exception;
 use UnexpectedValueException;
 
 /**
diff --git a/includes/session/PHPSessionHandler.php 
b/includes/session/PHPSessionHandler.php
index 8630809..695ce5a 100644
--- a/includes/session/PHPSessionHandler.php
+++ b/includes/session/PHPSessionHandler.php
@@ -111,9 +111,11 @@
return;
}
 
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION_HANDLER' ) ) {
throw new \BadMethodCallException( 
'MW_NO_SESSION_HANDLER is defined' );
}
+   // @codeCoverageIgnoreEnd
 
self::$instance = new self( $manager );
 
diff --git a/includes/session/SessionManager.php 
b/includes/session/SessionManager.php
index b1d5d77..6a8b8a3 100644
--- a/includes/session/SessionManager.php
+++ b/includes/session/SessionManager.php
@@ -296,9 +296,11 @@
}
 
public function getVaryHeaders() {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
+   // @codeCoverageIgnoreEnd
if ( $this->varyHeaders === null ) {
$headers = [];
foreach ( $this->getProviders() as $provider ) {
@@ -317,9 +319,11 @@
}
 
public function getVaryCookies() {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
+   // @codeCoverageIgnoreEnd
if ( $this->varyCookies === null ) {
$cookies = [];
foreach ( $this->getProviders() as $provider ) {
@@ -513,12 +517,14 @@
}
 
# Notify AuthPlugin
+   // @codeCoverageIgnoreStart
$tmpUser = $user;
$wgAuth->initUser( $tmpUser, true );
if ( $tmpUser !== $user ) {
$logger->warning( __METHOD__ . ': ' .
get_class( $wgAuth ) . '::initUser() replaced 
the user object' );
}
+   // @codeCoverageIgnoreEnd
 
# Notify hooks (e.g. Newuserlog)
\Hooks::run( 'AuthPluginAutoCreate', [ $user ] );
@@ -957,6 +963,7 @@
 * @return Session
 */
public function getSessionFromInfo( SessionInfo $info, WebRequest 
$request ) {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) ) {
  

[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Refine VisualEditorSupportCheck call and d... - change (VisualEditor/VisualEditor)

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

Change subject: [BREAKING CHANGE] Refine VisualEditorSupportCheck call and 
document pattern
..


[BREAKING CHANGE] Refine VisualEditorSupportCheck call and document pattern

Follows-up I27a8e7b437664.

Call the global as-is instead of via 'window'. This isn't a Window class method
and should not be called as such. It's a fully-fledged global function can be
called as-is. This also benefits JSHint detection. It not being whitelisted, but
used via 'window' made it more error-prone (e.g. when mistyped). Now it can
detect it properly.

It was also wrongly indexed as a class when it is in fact a method.

One could create a private mixin for global to allow multiple global methods
to be documented in categories, but for now indexing 'global' as a single group
in the categories file under Initialisation.

Now that the warning for having a global method is triggered, surpress it with
"-global" in the jsduck.json file.

Change-Id: Id53bdfe1c459ea5995e409644d1b7afddf11227c
---
M .jsduck/categories.json
M .jshintrc
M jsduck.json
M src/init/sa/ve.init.sa.Platform.js
M src/init/ve.init.Platform.js
M src/init/ve.init.SupportCheck.js
6 files changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index cd1ddf9..a702011 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -29,7 +29,7 @@
"ve.init",
"ve.init.Platform",
"ve.init.Target",
-   "window.VisualEditorSupportCheck"
+   "global"
]
},
{
diff --git a/.jshintrc b/.jshintrc
index 7849936..49f49fb 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -24,6 +24,7 @@
"unicodeJS": false,
"RangeFix": false,
"Papa": false,
-   "ve": false
+   "ve": false,
+   "VisualEditorSupportCheck": false
}
 }
diff --git a/jsduck.json b/jsduck.json
index 5e42b91..03be39e 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -4,7 +4,7 @@
"--categories": ".jsduck/categories.json",
"--eg-iframe": ".jsduck/eg-iframe.html",
"--tags": ".jsduck/CustomTags.rb",
-   "--warnings": ["-nodoc(class,public)"],
+   "--warnings": ["-nodoc(class,public)", "-global"],
"--builtin-classes": true,
"--processes": "0",
"--warnings-exit-nonzero": true,
diff --git a/src/init/sa/ve.init.sa.Platform.js 
b/src/init/sa/ve.init.sa.Platform.js
index 479dc1c..5340276 100644
--- a/src/init/sa/ve.init.sa.Platform.js
+++ b/src/init/sa/ve.init.sa.Platform.js
@@ -188,7 +188,7 @@
promises = [],
fallbacks = $.i18n.fallbacks[ locale ];
 
-   if ( !window.VisualEditorSupportCheck() ) {
+   if ( !VisualEditorSupportCheck() ) {
return $.Deferred().reject().promise();
}
 
diff --git a/src/init/ve.init.Platform.js b/src/init/ve.init.Platform.js
index 3fcb5b8..e348ebd 100644
--- a/src/init/ve.init.Platform.js
+++ b/src/init/ve.init.Platform.js
@@ -257,7 +257,7 @@
  * @return {jQuery.Promise} Promise that will be resolved once initialization 
is done
  */
 ve.init.Platform.prototype.initialize = function () {
-   if ( !window.VisualEditorSupportCheck() ) {
+   if ( !VisualEditorSupportCheck() ) {
return $.Deferred().reject().promise();
}
return $.Deferred().resolve().promise();
diff --git a/src/init/ve.init.SupportCheck.js b/src/init/ve.init.SupportCheck.js
index 1d2eafa..74ec511 100644
--- a/src/init/ve.init.SupportCheck.js
+++ b/src/init/ve.init.SupportCheck.js
@@ -13,6 +13,8 @@
 * specific DOM features we use, and SVG support for the user 
interface. As we
 * use this to check for feature compatibility this file must be 
ES3-parsable.
 *
+* @method VisualEditorSupportCheck
+* @member global
 * @return {boolean} True if the environment should support 
VisualEditor.
 */
window.VisualEditorSupportCheck = function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id53bdfe1c459ea5995e409644d1b7afddf11227c
Gerrit-PatchSet: 4
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] Fix geodata retrieval code for Maps - change (wikimedia...golden)

2016-02-26 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Fix geodata retrieval code for Maps
..


Fix geodata retrieval code for Maps

Bug: T119448
Change-Id: Ie7db1059a096361513bd330cc64b417761155739
---
M maps/tiles.R
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/maps/tiles.R b/maps/tiles.R
index 0f1b0d5..dfcf11a 100644
--- a/maps/tiles.R
+++ b/maps/tiles.R
@@ -51,10 +51,11 @@
 by= setdiff(names(output),c("n","user_id", 
"is_automata"))]
   
   # Work out unique users on a per-country basis
+  top_countries <- c("RU", "IT", "US", "UA", "FR", "IN", "DE", "ES", "GB")
   unique_users <- output[, j = list(users = length(unique(user_id))), by = 
c("date","country")]
   unique_users <- unique_users[order(unique_users$users, decreasing = TRUE),]
-  user_output <- rbind(unique_users[1:9,],
-   data.table(date = date, country = "Other", users = 
sum(unique_users$users[10:nrow(unique_users)])))
+  user_output <- rbind(unique_users[unique_users$country %in% top_countries,],
+   data.table(date = date, country = "Other", users = 
sum(unique_users$users[!unique_users$country %in% top_countries])))
   user_output$users <- round(user_output$users/sum(user_output$users), 2)
   
   # Write out

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7db1059a096361513bd330cc64b417761155739
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Fix geodata retrieval code for Maps - change (wikimedia...golden)

2016-02-26 Thread OliverKeyes (Code Review)
OliverKeyes has uploaded a new change for review.

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

Change subject: Fix geodata retrieval code for Maps
..

Fix geodata retrieval code for Maps

Bug: T119448
Change-Id: Ie7db1059a096361513bd330cc64b417761155739
---
M maps/tiles.R
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/11/273511/1

diff --git a/maps/tiles.R b/maps/tiles.R
index 0f1b0d5..dfcf11a 100644
--- a/maps/tiles.R
+++ b/maps/tiles.R
@@ -51,10 +51,11 @@
 by= setdiff(names(output),c("n","user_id", 
"is_automata"))]
   
   # Work out unique users on a per-country basis
+  top_countries <- c("RU", "IT", "US", "UA", "FR", "IN", "DE", "ES", "GB")
   unique_users <- output[, j = list(users = length(unique(user_id))), by = 
c("date","country")]
   unique_users <- unique_users[order(unique_users$users, decreasing = TRUE),]
-  user_output <- rbind(unique_users[1:9,],
-   data.table(date = date, country = "Other", users = 
sum(unique_users$users[10:nrow(unique_users)])))
+  user_output <- rbind(unique_users[unique_users$country %in% top_countries,],
+   data.table(date = date, country = "Other", users = 
sum(unique_users$users[!unique_users$country %in% top_countries])))
   user_output$users <- round(user_output$users/sum(user_output$users), 2)
   
   # Write out

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7db1059a096361513bd330cc64b417761155739
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 

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


[MediaWiki-commits] [Gerrit] [PULL THROUGH] Use new VisualEditorSupportCheck pattern - change (mediawiki...VisualEditor)

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

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

Change subject: [PULL THROUGH] Use new VisualEditorSupportCheck pattern
..

[PULL THROUGH] Use new VisualEditorSupportCheck pattern

Pull-through for Id53bdfe1c in VisualEditor.

Change-Id: I7dc0c360b54a93397180b18d88d72532e439da5c
---
M .jsduck/categories.json
M .jshintrc
M jsduck.json
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
4 files changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 925e5e1..48f1d6d 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -68,7 +68,7 @@
"ve.init",
"ve.init.Platform",
"ve.init.Target",
-   "window.VisualEditorSupportCheck",
+   "global",
"ve.init.sa*"
]
},
diff --git a/.jshintrc b/.jshintrc
index 30cc13d..fa174f6 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -23,6 +23,7 @@
"OO": false,
"QUnit": false,
"unicodeJS": false,
-   "ve": false
+   "ve": false,
+   "VisualEditorSupportCheck": false
}
 }
diff --git a/jsduck.json b/jsduck.json
index 005c600..3de6801 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -8,7 +8,7 @@
"--warnings-exit-nonzero": true,
"--builtin-classes": true,
"--external": 
"HTMLDocument,Window,Node,Text,Set,Range,Selection,ClientRect,File,Blob,DataTransfer,DataTransferItem,KeyboardEvent,MouseEvent",
-   "--warnings": ["-nodoc(class,public)"],
+   "--warnings": ["-nodoc(class,public)", "-global"],
"--": [
".jsduck/external.js",
"lib/ve/.jsduck/external.js",
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index bdd6e38..3d4504c 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -622,7 +622,7 @@
// Whether VisualEditor should be available for the current user, page, 
wiki, mediawiki skin,
// browser etc.
init.isAvailable = (
-   window.VisualEditorSupportCheck() &&
+   VisualEditorSupportCheck() &&
 
( ( 'vewhitelist' in uri.query ) || !$.client.test( 
init.blacklist, null, true ) ) &&
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7dc0c360b54a93397180b18d88d72532e439da5c
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] Implement HTMLTitleTextField with suggestions for non-OOUI f... - change (mediawiki/core)

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

Change subject: Implement HTMLTitleTextField with suggestions for non-OOUI 
forms, too
..


Implement HTMLTitleTextField with suggestions for non-OOUI forms, too

Also implement a way to use mediawiki.searchSuggests without wrapping
a link around the suggestions.

Bug: T117033
Change-Id: I2c7fc71d19cefaa16a6cc4526af05be9cd32366e
---
M includes/htmlform/HTMLTextField.php
M includes/htmlform/HTMLTitleTextField.php
M resources/src/mediawiki/mediawiki.searchSuggest.js
3 files changed, 35 insertions(+), 5 deletions(-)

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



diff --git a/includes/htmlform/HTMLTextField.php 
b/includes/htmlform/HTMLTextField.php
index c2606c2..fb7584b 100644
--- a/includes/htmlform/HTMLTextField.php
+++ b/includes/htmlform/HTMLTextField.php
@@ -22,7 +22,7 @@
'value' => $value,
'dir' => $this->mDir,
'spellcheck' => $this->getSpellCheck(),
-   ] + $this->getTooltipAndAccessKey();
+   ] + $this->getTooltipAndAccessKey() + 
$this->getDataAttribs();
 
if ( $this->mClass !== '' ) {
$attribs['class'] = $this->mClass;
@@ -126,4 +126,13 @@
protected function getInputWidget( $params ) {
return new OOUI\TextInputWidget( $params );
}
+
+   /**
+* Returns an array of data-* attributes to add to the field.
+*
+* @return array
+*/
+   protected function getDataAttribs() {
+   return [];
+   }
 }
diff --git a/includes/htmlform/HTMLTitleTextField.php 
b/includes/htmlform/HTMLTitleTextField.php
index 09fbaa7..410d15d 100644
--- a/includes/htmlform/HTMLTitleTextField.php
+++ b/includes/htmlform/HTMLTitleTextField.php
@@ -80,4 +80,20 @@
$params['relative'] = $this->mParams['relative'];
return new TitleInputWidget( $params );
}
+
+   public function getInputHtml( $value ) {
+   // add mw-searchInput class to enable search suggestions for 
non-OOUI, too
+   $this->mClass .= 'mw-searchInput';
+
+   // return the HTMLTextField html
+   return parent::getInputHtml( $value );
+   }
+
+   protected function getDataAttribs() {
+   return [
+   'data-mw-searchsuggest' => FormatJson::encode( [
+   'wrapAsLink' => false,
+   ] ),
+   ];
+   }
 }
diff --git a/resources/src/mediawiki/mediawiki.searchSuggest.js 
b/resources/src/mediawiki/mediawiki.searchSuggest.js
index 0fcd22c..782501a 100644
--- a/resources/src/mediawiki/mediawiki.searchSuggest.js
+++ b/resources/src/mediawiki/mediawiki.searchSuggest.js
@@ -108,19 +108,24 @@
 
// The function used to render the suggestions.
function renderFunction( text, context ) {
-   var formData = getFormData( context );
+   var formData = getFormData( context ),
+   textboxConfig = context.data.$textbox.data( 
'mw-searchsuggest' ) || {};
 
// linkParams object is modified and reused
formData.linkParams[ formData.textParam ] = text;
 
-   // this is the container , jQueryfied
-   this.text( text )
-   .wrap(
+   // this is the container , jQueryfield
+   this.text( text );
+
+   // wrap only as link, if the config doesn't disallow it
+   if ( textboxConfig.wrapAsLink !== false ) {
+   this.wrap(
$( '' )
.attr( 'href', 
formData.baseHref + $.param( formData.linkParams ) )
.attr( 'title', text )
.addClass( 
'mw-searchSuggest-link' )
);
+   }
}
 
// The function used when the user makes a selection

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c7fc71d19cefaa16a6cc4526af05be9cd32366e
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Glaisher 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] Add external referral traffic - change (wikimedia...prince)

2016-02-26 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Add external referral traffic
..

Add external referral traffic

Bug: T127868
Change-Id: I61da25f48a6af81005eb0b7f3a7d95cb4ea18f4e
---
M functions.R
M server.R
M tab_documentation/breakdown.md
M tab_documentation/browsers.md
M tab_documentation/dwelltime.md
M tab_documentation/geography.md
M tab_documentation/pageviews.md
A tab_documentation/referers_byengine.md
A tab_documentation/referers_summary.md
M ui.R
10 files changed, 129 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/prince 
refs/changes/09/273509/1

diff --git a/functions.R b/functions.R
index a429dc6..7d7e379 100644
--- a/functions.R
+++ b/functions.R
@@ -53,6 +53,35 @@
   pageview_data <<- polloi::read_dataset(path = "portal/portal_pageviews.tsv")
 }
 
+read_referrals <- function(){
+  
+  # Read in the initial data
+  data <- as.data.table(polloi::read_dataset(path = 
"portal/portal_referer_data.tsv"))
+  
+  # Format
+  data$is_search <- ifelse(data$is_search, "Referred by search", "Not referred 
by search")
+  data$search_engine[data$search_engine %in% c("none","None")] <- "Not 
referred by search"
+  
+  # Write out the overall values for traffic
+  interim <- data[, j = list(pageviews = sum(pageviews)),
+by = c("date", "is_search")] %>%
+reshape2::dcast(formula = date ~ is_search, fun.aggregate = sum)
+  interim$Total <- interim$`Not referred by search` + interim$`Referred by 
search`
+  interim$`Not referred by search` <- round(100*interim$`Not referred by 
search`/interim$Total, 2)
+  interim$`Referred by search` <- round(100*interim$`Referred by 
search`/interim$Total, 2)
+  summary_traffic_data <<- interim[, 1:3]
+  
+  # Generate per-engine values
+  interim <- data[data$search_engine != "Not referred by search",
+  j = list(pageviews = sum(pageviews)),
+  by = c("date", "search_engine")] %>%
+reshape2::dcast(formula = date ~ search_engine, fun.aggregate = sum)
+  bysearch_traffic_data <<- cbind(date = interim$date, 
data.frame(round(100*t(apply(interim[, -1], 1, function(x) { x/sum(x) })), 2)))
+  
+  return(invisible())
+  
+}
+
 # Fits an exponential model to the data and returns the rate of growth (or 
decay!)
 get_exp_rate <- function(dates, y) {
   time_frame <- range(dates)
diff --git a/server.R b/server.R
index 59a1ae2..d656782 100644
--- a/server.R
+++ b/server.R
@@ -11,6 +11,7 @@
 read_country()
read_useragents()
read_pageviews()
+   read_referrals()
 existing_date <<- Sys.Date()
   }
   
@@ -138,4 +139,27 @@
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70)
   })
+  
+  output$referer_summary_dygraph <- renderDygraph({
+summary_traffic_data %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_referer_summary)) 
%>%
+  polloi::make_dygraph(xlab = "Date", ylab = "% of Pageviews",
+   title = "Pageviews to Wikipedia Portal from 
external search engines") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyAxis("y", valueFormatter = 'function(x) { return x + "%"; }') %>%
+  dyLegend(labelsDiv = "referer_summary_legend", show = "always", width = 
400)
+  })
+  
+  output$search_engines_dygraph <- renderDygraph({
+bysearch_traffic_data %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_search_engines)) 
%>%
+  polloi::make_dygraph(xlab = "Date", ylab = "% of Pageviews",
+   title = "Search engine-referred pageviews to 
Wikipedia Portal, broken down by engine") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyAxis("y", valueFormatter = 'function(x) { return x + "%"; }') %>%
+  dyLegend(labelsDiv = "search_engines_legend", show = "always", width = 
400)
+  })
+  
 })
diff --git a/tab_documentation/breakdown.md b/tab_documentation/breakdown.md
index beb3b10..ad2a190 100644
--- a/tab_documentation/breakdown.md
+++ b/tab_documentation/breakdown.md
@@ -32,7 +32,7 @@
 
 
   Link to this dashboard:
-  http://discovery.wmflabs.org/portal/#clickthrough_breakdown";>
-http://discovery.wmflabs.org/portal/#clickthrough_breakdown
+  http://discovery.wmflabs.org/portal/#action_breakdown";>
+http://discovery.wmflabs.org/portal/#action_breakdown
   
 
diff --git a/tab_documentation/browsers.md b/tab_documentation/browsers.md
index 14aa0a9..22f50eb 100644
--- a/tab_documentation/browsers.md
+++ b/tab_documentation/browsers.md
@@ -20,7 +20,7 @@
 
 
   Li

[MediaWiki-commits] [Gerrit] Improve SessionManager unit test coverage, and fix two names... - change (mediawiki/core)

2016-02-26 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Improve SessionManager unit test coverage, and fix two 
namespacing bugs
..

Improve SessionManager unit test coverage, and fix two namespacing bugs

Change-Id: Ie0bcba77625e04ca3e89eb400626f63024c6e1a1
---
M includes/session/BotPasswordSessionProvider.php
M includes/session/MetadataMergeException.php
M includes/session/PHPSessionHandler.php
M includes/session/SessionManager.php
M tests/phpunit/includes/session/BotPasswordSessionProviderTest.php
M tests/phpunit/includes/session/CookieSessionProviderTest.php
A tests/phpunit/includes/session/MetadataMergeExceptionTest.php
M tests/phpunit/includes/session/SessionBackendTest.php
M tests/phpunit/includes/session/SessionProviderTest.php
9 files changed, 162 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/273508/1

diff --git a/includes/session/BotPasswordSessionProvider.php 
b/includes/session/BotPasswordSessionProvider.php
index 44199bd..70c771d 100644
--- a/includes/session/BotPasswordSessionProvider.php
+++ b/includes/session/BotPasswordSessionProvider.php
@@ -165,16 +165,19 @@
return true;
}
 
+   /**
+* @codeCoverageIgnore
+*/
public function preventSessionsForUser( $username ) {
BotPassword::removeAllPasswordsForUser( $username );
}
 
public function getAllowedUserRights( SessionBackend $backend ) {
if ( $backend->getProvider() !== $this ) {
-   throw new InvalidArgumentException( 'Backend\'s 
provider isn\'t $this' );
+   throw new \InvalidArgumentException( 'Backend\'s 
provider isn\'t $this' );
}
$data = $backend->getProviderMetadata();
-   if ( $data ) {
+   if ( $data && isset( $data['rights'] ) && is_array( 
$data['rights'] ) ) {
return $data['rights'];
}
 
diff --git a/includes/session/MetadataMergeException.php 
b/includes/session/MetadataMergeException.php
index 9f42c27..882084d 100644
--- a/includes/session/MetadataMergeException.php
+++ b/includes/session/MetadataMergeException.php
@@ -22,6 +22,7 @@
 
 namespace MediaWiki\Session;
 
+use Exception;
 use UnexpectedValueException;
 
 /**
diff --git a/includes/session/PHPSessionHandler.php 
b/includes/session/PHPSessionHandler.php
index 8630809..695ce5a 100644
--- a/includes/session/PHPSessionHandler.php
+++ b/includes/session/PHPSessionHandler.php
@@ -111,9 +111,11 @@
return;
}
 
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION_HANDLER' ) ) {
throw new \BadMethodCallException( 
'MW_NO_SESSION_HANDLER is defined' );
}
+   // @codeCoverageIgnoreEnd
 
self::$instance = new self( $manager );
 
diff --git a/includes/session/SessionManager.php 
b/includes/session/SessionManager.php
index b1d5d77..6a8b8a3 100644
--- a/includes/session/SessionManager.php
+++ b/includes/session/SessionManager.php
@@ -296,9 +296,11 @@
}
 
public function getVaryHeaders() {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
+   // @codeCoverageIgnoreEnd
if ( $this->varyHeaders === null ) {
$headers = [];
foreach ( $this->getProviders() as $provider ) {
@@ -317,9 +319,11 @@
}
 
public function getVaryCookies() {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
return [];
}
+   // @codeCoverageIgnoreEnd
if ( $this->varyCookies === null ) {
$cookies = [];
foreach ( $this->getProviders() as $provider ) {
@@ -513,12 +517,14 @@
}
 
# Notify AuthPlugin
+   // @codeCoverageIgnoreStart
$tmpUser = $user;
$wgAuth->initUser( $tmpUser, true );
if ( $tmpUser !== $user ) {
$logger->warning( __METHOD__ . ': ' .
get_class( $wgAuth ) . '::initUser() replaced 
the user object' );
}
+   // @codeCoverageIgnoreEnd
 
# Notify hooks (e.g. Newuserlog)
\Hooks::run( 'AuthPluginAutoCreate', [ $user ] );
@@ -957,6 +963,7 @@
 * @return Session
 */
public function getSessionFromInfo( SessionInfo $info, WebRequest 
$request ) {
+   // @codeCoverageIgnoreStart
if ( defined( 'MW_NO_S

[MediaWiki-commits] [Gerrit] Add more Latin American methods for AstroPay - change (wikimedia...SmashPig)

2016-02-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add more Latin American methods for AstroPay
..

Add more Latin American methods for AstroPay

Bug: T124323
Change-Id: I73d998c92ed12047b0039aac773cfc3fac483c53
---
M PaymentProviders/AstroPay/ReferenceData.php
1 file changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/07/273507/1

diff --git a/PaymentProviders/AstroPay/ReferenceData.php 
b/PaymentProviders/AstroPay/ReferenceData.php
index 6c67089..55b29af 100644
--- a/PaymentProviders/AstroPay/ReferenceData.php
+++ b/PaymentProviders/AstroPay/ReferenceData.php
@@ -7,6 +7,7 @@
$submethods = array(
'AG' => 'argen',
'AE' => 'amex',
+   'AU' => 'aura',
'B' => 'bradesco',
'BB' => 'banco_do_brasil',
'BL' => 'boleto',
@@ -15,35 +16,50 @@
'BV' => 'bbva', // Mexico, aka Bancomer
'BX' => 'banco_de_chile',
'CA' => 'caixa',
+   'CB' => 'baloto',
'CL' => 'cabal',
+   'CM' => 'cmr',
+   'CR' => 'carulla',
'CS' => 'cencosud',
'DA' => 'davivienda',
-   'DC' => 'dc',
-   'DM' => 'dineromail',
+   'DC' => 'diners',
+   'DD' => 'dineromail', // (Transfer)
+   'DM' => 'dineromail', // (Cash)
+   'DS' => 'discover',
'EF' => 'pago_efectivo',
'EL' => 'elo',
+   'EQ' => 'quindio',
+   'EX' => 'almancenes',
'EY' => 'efecty',
'H' => 'hsbc',
'HI' => 'hiper',
'I' => 'itau',
'IB' => 'interbank',
+   'JC' => 'jcb',
'MC' => 'mc',
'MD' => 'mc_debit',
+   'MG' => 'magna',
'ML' => 'mercadolivre',
'NJ' => 'naranja',
'NT' => 'nativa',
+   'OC' => 'banco_de_occidente',
'OX' => 'oxxo',
'PA' => 'bcp', // Peru, "via LatinAmericanPayments"
'PC' => 'pse', // Columbia, "all banks"
'PF' => 'pago_facil',
+   'PR' => 'presto',
+   'RE' => 'red_pagos',
+   'RL' => 'red_link',
'RP' => 'rapipago',
'SB' => 'santander', // Brazil
'SI' => 'santander', // Argentina
'SM' => 'santander', // Mexico
+   'SP' => 'servipag',
+   'SX' => 'surtimax',
'TS' => 'tarjeta_shopping',
'VD' => 'visa_debit',
'VI' => 'visa',
-   'WP' => 'other', // Chilean catch-all
+   'WP' => 'webpay',
);
 
if ( array_key_exists( $code, $submethods ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73d998c92ed12047b0039aac773cfc3fac483c53
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Consistently use Html class for form generation - change (mediawiki/core)

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

Change subject: Consistently use Html class for form generation
..


Consistently use Html class for form generation

Instead of Xml class. This was triggered by the comment of Krinkle on
Ide77585fcf24f8ecd26dddac3610a134ba78dce9 and converting to one element
generating class makes sense for readability.

Change-Id: I2162444130dc09ad0c7e4329c93e7e90c534db40
---
M includes/specials/SpecialEmailuser.php
1 file changed, 16 insertions(+), 12 deletions(-)

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



diff --git a/includes/specials/SpecialEmailuser.php 
b/includes/specials/SpecialEmailuser.php
index 80ef4b1..3528be0 100644
--- a/includes/specials/SpecialEmailuser.php
+++ b/includes/specials/SpecialEmailuser.php
@@ -265,28 +265,32 @@
 */
protected function userForm( $name ) {
$this->getOutput()->addModules( 'mediawiki.userSuggest' );
-   $string = Xml::openElement(
-   'form',
-   [ 'method' => 'get', 'action' => wfScript(), 'id' => 
'askusername' ]
-   ) .
+   $string = Html::openElement(
+   'form',
+   [ 'method' => 'get', 'action' => wfScript(), 
'id' => 'askusername' ]
+   ) .
Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() ) .
-   Xml::openElement( 'fieldset' ) .
+   Html::openElement( 'fieldset' ) .
Html::rawElement( 'legend', null, $this->msg( 
'emailtarget' )->parse() ) .
-   Xml::inputLabel(
+   Html::label(
$this->msg( 'emailusername' )->text(),
+   'emailusertarget'
+   ) . ' ' .
+   Html::input(
'target',
-   'emailusertarget',
-   30,
$name,
+   'text',
[
+   'id' => 'emailusertarget',
'class' => 'mw-autocomplete-user',  // 
used by mediawiki.userSuggest
-   'autofocus' => '',
+   'autofocus' => true,
+   'size' => 30,
]
) .
' ' .
-   Xml::submitButton( $this->msg( 'emailusernamesubmit' 
)->text() ) .
-   Xml::closeElement( 'fieldset' ) .
-   Xml::closeElement( 'form' ) . "\n";
+   Html::submitButton( $this->msg( 'emailusernamesubmit' 
)->text(), [] ) .
+   Html::closeElement( 'fieldset' ) .
+   Html::closeElement( 'form' ) . "\n";
 
return $string;
}

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

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

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


[MediaWiki-commits] [Gerrit] Fix wrong thead tag - change (operations...wikistats)

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

Change subject: Fix wrong thead tag
..


Fix wrong thead tag

I make mistakes too :-)

Change-Id: I87d4a972a252a39e17b08ec89784f2081332f467
---
M var/www/wikistats/display.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index c8785bc..86dd40e 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -259,9 +259,9 @@
 print <<
 
-
+
 ${listname}
-№
+№
 THEAD_INTRO;
 
 if (in_array($db_table, $tables_with_language_columns)) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87d4a972a252a39e17b08ec89784f2081332f467
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix repeating background images - change (mediawiki...MoodBar)

2016-02-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Fix repeating background images
..

Fix repeating background images

Bug: T126311
Change-Id: Ib31a80298d0fcff731f2f61b9c9844f8ba2fc4db
---
M modules/ext.moodBar/ext.moodBar.core.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ext.moodBar/ext.moodBar.core.css 
b/modules/ext.moodBar/ext.moodBar.core.css
index 87ba9e0..759be83 100644
--- a/modules/ext.moodBar/ext.moodBar.core.css
+++ b/modules/ext.moodBar/ext.moodBar.core.css
@@ -50,7 +50,7 @@
min-width: 42px;
margin: 15px;
padding: 42px 0 5px 0;
-   /* @embed */
+   background-repeat: no-repeat;
display: inline-block;
/*display: inline;*/
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib31a80298d0fcff731f2f61b9c9844f8ba2fc4db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MoodBar
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] Avro schema for Action API request logging - change (mediawiki/event-schemas)

2016-02-26 Thread Nuria (Code Review)
Nuria has submitted this change and it was merged.

Change subject: Avro schema for Action API request logging
..


Avro schema for Action API request logging

Add Avro schema matching the MediaWiki "ApiRequest" structured debug
logging channel.

Bug: T108618
Change-Id: Ie10ce7280b3f044a8192d52425b32d9ec6b43d51
---
A avro/mediawiki/ApiRequest/101453221640.avsc
1 file changed, 56 insertions(+), 0 deletions(-)

Approvals:
  Nuria: Verified; Looks good to me, approved
  DCausse: Looks good to me, but someone else must approve



diff --git a/avro/mediawiki/ApiRequest/101453221640.avsc 
b/avro/mediawiki/ApiRequest/101453221640.avsc
new file mode 100644
index 000..64c89bd
--- /dev/null
+++ b/avro/mediawiki/ApiRequest/101453221640.avsc
@@ -0,0 +1,56 @@
+{
+  "type": "record",
+  "name": "ApiRequest",
+  "namespace": "org.wikimedia.analytics.schemas",
+  "doc": "A single request to the MediaWiki Action API (api.php)",
+  "fields": [
+{
+  "name": "ts",
+  "doc": "The timestamp, in unix time, that the request was made",
+  "type": "int",
+  "default": 0
+},
+{
+  "name": "ip",
+  "doc": "The requesting IP address (either ipv4 or ipv6) in string 
notation",
+  "type": "string",
+  "default": ""
+},
+{
+  "name": "userAgent",
+  "doc": "The HTTP User-Agent header prefixed with the Api-user-agent 
header if present",
+  "type": "string",
+  "default": ""
+},
+{
+  "name": "wiki",
+  "doc": "The wiki making this request, such as dewiki or enwiktionary",
+  "type": "string",
+  "default": ""
+},
+{
+  "name": "timeSpentBackend",
+  "doc": "Elapsed milliseconds to process request as measured by 
MediaWiki",
+  "type": "int",
+  "default": -1
+},
+{
+  "name": "hadError",
+  "doc": "Were errors encountered when processing this request?",
+  "type": "boolean",
+  "default": false
+},
+{
+  "name": "errorCodes",
+  "doc": "List of error codes for any errors encountered",
+  "type": {"type": "array", "items": "string"},
+  "default": []
+},
+{
+  "name": "params",
+  "doc": "Request parameters",
+  "type": {"type": "map", "values": "string"},
+  "default": {}
+}
+  ]
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie10ce7280b3f044a8192d52425b32d9ec6b43d51
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/event-schemas
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Nuria 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] More general .teahouse-ask button styling - change (mediawiki...Teahouse)

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

Change subject: More general .teahouse-ask button styling
..


More general .teahouse-ask button styling

This removes the restriction that the class can only be used in a
. I'm also changing the style a bit to be closer to .mw-ui-...
styles, most notably the padding. The added "a" and "a.external"
selectors are useful because each button should have a no-JS
alternative.

Change-Id: I8e2a03c9abeafcaa9e6c1c95a3a3a10d44dcfaf5
---
M resources/mediawiki.util.teahouse.css
1 file changed, 15 insertions(+), 12 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Daniel Kinzler: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/mediawiki.util.teahouse.css 
b/resources/mediawiki.util.teahouse.css
index 136df97..4ee4d48 100644
--- a/resources/mediawiki.util.teahouse.css
+++ b/resources/mediawiki.util.teahouse.css
@@ -1,4 +1,4 @@
-#p-teahouse > a{
+#p-teahouse > a {
font-weight: bold;
color: #F0F0F0;
background-color: #27AA65; /* 
https://www.mediawiki.org/wiki/Wikimedia_Foundation_Design/Color_usage */
@@ -54,7 +54,6 @@
padding: 0.25em 0.45em 0.2em 0.45em;
margin-left: -4px;
text-align: center;
-   /*background-color: #d2d2d2;*/
font-weight: bold;
color: white;
cursor: pointer;
@@ -63,10 +62,6 @@
 
 a.teahouse-unread-notifications {
background-color: #27AA65;
-}
-
-.teahouse-error-details {
-   /* display: none; */
 }
 
 .teahouse-error-details table {
@@ -79,10 +74,18 @@
padding: 0.5em;
 }
 
-span.teahouse-ask {
-   display: inline-block;
+/* Partly borrowed from .mw-ui-button */
+.teahouse-ask {
background-color: #27AA65;
-   padding: 0.5em;
-   color:#F0F0F0;
-   cursor:pointer
-}
\ No newline at end of file
+   color: #F0F0F0;
+   cursor: pointer;
+   display: inline-block;
+   font-weight: bold;
+   padding: 0.5em 1em;
+}
+
+.teahouse-ask a,
+.teahouse-ask a.external {
+   color: #F0F0F0;
+   text-decoration: none;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e2a03c9abeafcaa9e6c1c95a3a3a10d44dcfaf5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Teahouse
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't assume our Lua tests run under LuaStandalone - change (mediawiki...Wikibase)

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

Change subject: Don't assume our Lua tests run under LuaStandalone
..


Don't assume our Lua tests run under LuaStandalone

They can as well be run with LuaSandbox, but we didn't take that
into account.

LuaSandboxFunction is defined within the LuaSandbox PHP extension.

Change-Id: Ibd4f1205ca99f82b7c54d6f33affc35864fd936f
---
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
2 files changed, 22 insertions(+), 6 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, but someone else must approve
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
index 508e34b..fc5d569 100644
--- 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
@@ -2,9 +2,11 @@
 
 namespace Wikibase\Client\Tests\DataAccess\Scribunto;
 
+use LuaSandboxFunction;
 use Parser;
 use ParserOptions;
 use Scribunto;
+use Scribunto_LuaStandaloneInterpreterFunction;
 use Title;
 use Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary;
 use Wikibase\Client\WikibaseClient;
@@ -71,9 +73,15 @@
 
$this->assertInternalType( 'array', $package );
$this->assertArrayHasKey( 'create', $package );
-   $this->assertInstanceOf(
-   'Scribunto_LuaStandaloneInterpreterFunction',
-   $package['create']
+
+   // The value of create depends on the Lua runtime in use.
+   $isLuaFunction =
+   ( $package['create'] instanceof 
Scribunto_LuaStandaloneInterpreterFunction ) ||
+   ( $package['create'] instanceof LuaSandboxFunction );
+
+   $this->assertTrue(
+   $isLuaFunction,
+   '$package[\'create\'] needs to be 
Scribunto_LuaStandaloneInterpreterFunction or LuaSandboxFunction'
);
}
 
diff --git 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
index 2a3a9f6..41b71b5 100644
--- 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
@@ -3,9 +3,11 @@
 namespace Wikibase\Client\Tests\DataAccess\Scribunto;
 
 use Language;
+use LuaSandboxFunction;
 use Parser;
 use ParserOptions;
 use Scribunto;
+use Scribunto_LuaStandaloneInterpreterFunction;
 use Title;
 use User;
 use Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary;
@@ -82,9 +84,15 @@
 
$this->assertInternalType( 'array', $package );
$this->assertArrayHasKey( 'setupInterface', $package );
-   $this->assertInstanceOf(
-   'Scribunto_LuaStandaloneInterpreterFunction',
-   $package['setupInterface']
+
+   // The value of setupInterface depends on the Lua runtime in 
use.
+   $isLuaFunction =
+   ( $package['setupInterface'] instanceof 
Scribunto_LuaStandaloneInterpreterFunction ) ||
+   ( $package['setupInterface'] instanceof 
LuaSandboxFunction );
+
+   $this->assertTrue(
+   $isLuaFunction,
+   '$package[\'setupInterface\'] needs to be 
Scribunto_LuaStandaloneInterpreterFunction or LuaSandboxFunction'
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd4f1205ca99f82b7c54d6f33affc35864fd936f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix wrong thead tag - change (operations...wikistats)

2016-02-26 Thread Southparkfan (Code Review)
Southparkfan has uploaded a new change for review.

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

Change subject: Fix wrong thead tag
..

Fix wrong thead tag

I make mistakes too :-)

Change-Id: I87d4a972a252a39e17b08ec89784f2081332f467
---
M var/www/wikistats/display.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/05/273505/1

diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index c8785bc..86dd40e 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -259,9 +259,9 @@
 print <<
 
-
+
 ${listname}
-№
+№
 THEAD_INTRO;
 
 if (in_array($db_table, $tables_with_language_columns)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87d4a972a252a39e17b08ec89784f2081332f467
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 

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


[MediaWiki-commits] [Gerrit] Update npm configuations to be able to run npm install - change (apps...wikipedia)

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

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

Change subject: Update npm configuations to be able to run npm install
..

Update npm configuations to be able to run npm install

This allows us to run grunt from inside www/ instead of having to move it
to parent directory.

Change-Id: Iaf286b1dc4af2948896d2dbd37697f06b440850d
---
M .gitignore
M .jshintignore
R package.json
M www/Gruntfile.js
4 files changed, 21 insertions(+), 11 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index aaba1ad..a9e97c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,7 +28,7 @@
 scripts/backup.ab
 
 # Node modules for the js
-www/node_modules
+node_modules/**
 www/bundle*.js
 www/abusefilter.js
 www/preview.js
diff --git a/.jshintignore b/.jshintignore
index e655b25..3fb511f 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1,2 +1,3 @@
 www/lib/*
 app/src/main/assets/*
+node_modules/**
diff --git a/www/package.json b/package.json
similarity index 89%
rename from www/package.json
rename to package.json
index adbca5f..adf7532 100644
--- a/www/package.json
+++ b/package.json
@@ -3,11 +3,14 @@
   "description": "JS files required for the Wikipedia Android app",
   "repository": "https://gerrit.wikimedia.org/r/apps/android/wikipedia";,
   "version": "0.1.0",
+  "scripts": {
+"test": "cd www/ && grunt test"
+  },
   "devDependencies": {
 "browserify": "~12.0.1",
 "grunt": "~0.4.2",
-"grunt-browserify": "~4.0.1",
 "grunt-cli": "~0.1.13",
+"grunt-browserify": "~4.0.1",
 "grunt-contrib-copy": "~0.8.2",
 "grunt-contrib-jshint": "~0.11.3",
 "grunt-contrib-less": "~1.1.0",
diff --git a/www/Gruntfile.js b/www/Gruntfile.js
index b614c64..edc5af3 100644
--- a/www/Gruntfile.js
+++ b/www/Gruntfile.js
@@ -1,3 +1,4 @@
+/*jshint node:true */
 module.exports = function ( grunt ) {
 var allScriptFiles = [
 "js/bridge.js",
@@ -22,7 +23,8 @@
 "tests/index.html"
 ];
 var distFolder = "../app/src/main/assets/";
-
+   
+grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 grunt.loadNpmTasks( 'grunt-browserify' );
 grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 grunt.loadNpmTasks( 'grunt-contrib-copy' );
@@ -30,6 +32,15 @@
 
 grunt.initConfig( {
 pkg: grunt.file.readJSON( "package.json" ),
+jshint: {
+options: {
+jshintrc: true
+},
+all: [
+'.',
+'!node_modules/**'
+]
+},
 browserify: {
 dist: {
 files: {
@@ -68,12 +79,6 @@
 }
 }
 },
-jshint: {
-allFiles: allScriptFiles,
-options: {
-jshintrc: ".jshintrc"
-}
-},
 copy: {
 main: {
 files: [
@@ -95,6 +100,7 @@
 }
 }
 } );
-
-grunt.registerTask( 'default', [ 'browserify', 'copy' ] );
+   
+grunt.registerTask( 'test', [ 'jshint', 'browserify', 'copy' ] );
+grunt.registerTask( 'default', 'test' );
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf286b1dc4af2948896d2dbd37697f06b440850d
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
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] Update composer.json to PHP 5.5 - change (mediawiki...Wikibase)

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

Change subject: Update composer.json to PHP 5.5
..


Update composer.json to PHP 5.5

Did we forgot this? We already use PHP 5.5 features in the code base,
namely "finally".

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

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



diff --git a/composer.json b/composer.json
index 0c24e86..629e506 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,7 @@
"irc": "irc://irc.freenode.net/wikidata"
},
"require": {
-   "php": ">=5.3.2",
+   "php": ">=5.5.0",
"data-values/data-values": "~1.0",
"data-values/common": "~0.3.0",
"data-values/geo": "~1.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieccf8e083b81cfd8749f67fcc1924a79cfe067e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >