[MediaWiki-commits] [Gerrit] Fix message group selector for IE/Edge - change (mediawiki...Translate)

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

Change subject: Fix message group selector for IE/Edge
..


Fix message group selector for IE/Edge

Bug: T130390
Change-Id: Iaae7afbaa93d1920bf6b44367e8bf59cf3329bdb
---
M resources/js/ext.translate.groupselector.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/js/ext.translate.groupselector.js 
b/resources/js/ext.translate.groupselector.js
index e9f35c7..126fac2 100644
--- a/resources/js/ext.translate.groupselector.js
+++ b/resources/js/ext.translate.groupselector.js
@@ -549,7 +549,8 @@
.addClass( 'seven columns' )
.append(
$( '' )
-   .prop( { dir: 'auto' } )
+   // T130390: must be attr for 
IE/Edge.
+   .attr( { dir: 'auto' } )
.text( messagegroup.label ),
$statsbar
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaae7afbaa93d1920bf6b44367e8bf59cf3329bdb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add Wikidata browser test jobs for group0 - change (integration/config)

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

Change subject: add Wikidata browser test jobs for group0
..


add Wikidata browser test jobs for group0

i.e. test.wikidata.org

Bug: T101497
Change-Id: If5f2003cff69d14580e7139c276de5416a02d727
---
M jjb/browsertests.yaml
1 file changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml
index 54acd4e..0889910 100644
--- a/jjb/browsertests.yaml
+++ b/jjb/browsertests.yaml
@@ -416,6 +416,30 @@
  cucumber_tags: '@smoke'
  recipients: *emails-Wikidata-devs
 - project:
+name: WikidataTests-Group0
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-test.wikidata.org
+mediawiki_url: test.wikidata.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: WikidataBrowserTests.git
+repository_host: github.com/wmde
+browsertest_job_timeout: '240'
+# TODO
+cucumber_tags: '@wikidata.beta.wmflabs.org'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ name: WikidataTests-Group0-SmokeTests
+ browser: firefox
+ cucumber_tags: '@smoke'
+- project:
 name: WikidataTestsHeadless
 defaults: browsertests
 browser: firefox
@@ -453,6 +477,25 @@
  browser:
- firefox
- chrome
+- project:
+name: Wikibase-Group0
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-test.wikidata.org
+mediawiki_url: test.wikidata.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: mediawiki/extensions/Wikibase
+browsertest_job_timeout: '240'
+# TODO
+cucumber_tags: '@wikidata.beta.wmflabs.org'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
 
 # WikiLove
 - project:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5f2003cff69d14580e7139c276de5416a02d727
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] CRM-18212 allow triggers to be managed offline. - change (wikimedia...civicrm)

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

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

Change subject: CRM-18212 allow triggers to be managed offline.
..

CRM-18212 allow triggers to be managed offline.

This commit adds a setting which when set (in civicrm.settings.php - not 
through the UI) allows you to designate the site
as having it's triggers managed offline. This is good for when it really is not 
appropriate to give the web use that mysql permission. This is likely the case 
when replication is in play because it can allow privilledge escalation

Bug: T128133
Change-Id: Iedc8dfca17be38a9ea2b5848bb069e7c84805bf8
---
M CRM/Core/DAO.php
M CRM/Core/Error.php
M CRM/Logging/Schema.php
M settings/Core.setting.php
4 files changed, 162 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/57/280157/1

diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php
index 4fea0c8..97610ee 100644
--- a/CRM/Core/DAO.php
+++ b/CRM/Core/DAO.php
@@ -1287,6 +1287,92 @@
   }
 
   /**
+   * Execute a query altering triggers.
+   *
+   * As this requires a high permission level we funnel the queries through 
here to
+   * facilitate them being taken 'offline'.
+   *
+   * @param string $triggerSQL
+   *   The sql to run to create or drop the triggers.
+   * @param array $params
+   *   Optional parameters to interpolate into the string.
+   */
+  public static function executeTriggerQuery($triggerSQL, $params = array()) {
+if (civicrm_api3('Setting', 'getvalue', array('name' => 
'logging_no_trigger_permission', 'group' => 'CiviCRM Preferences'))) {
+  $prefix = 'trigger' . CRM_Utils_Request::id();
+  CRM_Core_DAO::logQuery("DELIMITER //", $params, TRUE, FALSE, $prefix, 
TRUE);
+  CRM_Core_DAO::logQuery($triggerSQL . '//', $params, TRUE, FALSE, 
$prefix, TRUE);
+  CRM_Core_Session::setStatus(ts('The mysql commands you need to run are 
stored in %1', array(
+1 => CRM_Core_Error::getDebugLoggerFileName($prefix)))
+  );
+  CRM_Core_DAO::logQuery("DELIMITER ;", $params, TRUE, FALSE, $prefix, 
TRUE);
+}
+else {
+  // Multilingual needs to be false.
+  CRM_Core_DAO::executeQuery($triggerSQL, $params, TRUE, NULL, FALSE, 
FALSE);
+}
+  }
+
+  /**
+   * Get the query that would be generated.
+   *
+   * This could be used in tests or where it is desirable to log the query 
rather than run it.
+   *
+   * @param string $query
+   *   Query to be executed.
+   *
+   * @param array $params
+   * @param bool $abort
+   * @param bool $i18nRewrite
+   *
+   * @return string
+   *   The resolved mysql query.
+   */
+  public static function getQuery(
+$query,
+$params = array(),
+$abort = TRUE,
+$i18nRewrite = TRUE
+  ) {
+$queryStr = self::composeQuery($query, $params, $abort);
+global $dbLocale;
+if ($i18nRewrite and $dbLocale) {
+  $queryStr = CRM_Core_I18n_Schema::rewriteQuery($query);
+}
+return $queryStr;
+  }
+
+  /**
+   * Log the query that would be generated.
+   *
+   * @param string $query
+   *   Query to be executed.
+   *
+   * @param array $params
+   * @param bool $abort
+   * @param bool $i18nRewrite
+   * @param string $outputFilePrefix
+   * @param bool $raw
+   *   Should we omit data like timestamp and debug level?
+   */
+  public static function logQuery(
+$query,
+$params = array(),
+$abort = TRUE,
+$i18nRewrite = TRUE,
+$outputFilePrefix = '',
+$raw = FALSE
+  ) {
+$queryStr = self::getQuery($query, $params, $abort, $i18nRewrite);
+if ($raw) {
+  CRM_Core_Error::debug_raw_message($queryStr, FALSE, $outputFilePrefix) ;
+}
+else {
+  CRM_Core_Error::debug_log_message($queryStr, FALSE, $outputFilePrefix);
+}
+  }
+
+  /**
* Execute a query and get the single result.
*
* @param string $query
@@ -1889,7 +1975,7 @@
 // test for create view and trigger permissions and if allowed, add the 
option to go multilingual
 // and logging
 // I'm not sure why we use the getStaticProperty for an error, rather than 
checking for DB_Error
-$errorScope = CRM_Core_TemporaryErrorScope::ignoreException();
+CRM_Core_TemporaryErrorScope::ignoreException();
 $dao = new CRM_Core_DAO();
 if ($view) {
   $dao->query('CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM 
civicrm_domain');
@@ -2102,17 +2188,8 @@
   $triggerName = "{$validName}_{$whenName}_{$eventName}";
   $triggerSQL = "CREATE TRIGGER $triggerName $whenName $eventName ON 
$tableName FOR EACH ROW BEGIN $varString $sqlString END";
 
- /*
-  CRM_Core_DAO::executeQuery("DROP TRIGGER IF EXISTS $triggerName");
-  CRM_Core_DAO::executeQuery(
-$triggerSQL,
-array(),
-TRUE,
-NULL,
-FALSE,
-FALSE
-  );
- */
+  

[MediaWiki-commits] [Gerrit] CRM-18310 add tests for debug logging and option to specify ... - change (wikimedia...civicrm)

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

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

Change subject: CRM-18310 add tests for debug logging and option to specify log 
format, fix caching error
..

CRM-18310 add tests for debug logging and option to specify log format, fix 
caching error

Bug: T127133

Change-Id: Iaf91dbc5f4a7aa4da0424d483659825827aadb87
---
M CRM/Core/DAO.php
M CRM/Core/Error.php
2 files changed, 49 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/56/280156/1

diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php
index b0eb4d3..4fea0c8 100644
--- a/CRM/Core/DAO.php
+++ b/CRM/Core/DAO.php
@@ -1327,14 +1327,16 @@
   }
 
   /**
-   * @param $query
+   * Compose the query by merging the parameters into it.
+   *
+   * @param string $query
* @param array $params
* @param bool $abort
*
* @return string
* @throws Exception
*/
-  public static function composeQuery($query, &$params, $abort = TRUE) {
+  public static function composeQuery($query, $params, $abort = TRUE) {
 $tr = array();
 foreach ($params as $key => $item) {
   if (is_numeric($key)) {
diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php
index d240c9a..cc7d535 100644
--- a/CRM/Core/Error.php
+++ b/CRM/Core/Error.php
@@ -567,7 +567,10 @@
   }
 
   /**
-   * Display the error message on terminal.
+   * Display the error message on terminal and append it to the log file.
+   *
+   * Provided the user has the 'view debug output' the output should be 
displayed. In all
+   * cases it should be logged.
*
* @param $message
* @param bool $out
@@ -575,16 +578,20 @@
*
* @param string $comp
*   Message to be output.
+   * @param string $priority
+   * @param array $logFileOptions
+   *   Options to pass to the log file.
+   *
* @return string
*   format of the backtrace
*
*
*/
-  public static function debug_log_message($message, $out = FALSE, $comp = '') 
{
+  public static function debug_log_message($message, $out = FALSE, $comp = '', 
$priority = NULL, $logFileOptions = array()) {
 $config = CRM_Core_Config::singleton();
 
-$file_log = self::createDebugLogger($comp);
-$file_log->log("$message\n");
+$file_log = self::createDebugLogger($comp, $logFileOptions);
+$file_log->log("$message\n", $priority);
 
 $str = '' . htmlspecialchars($message) . '';
 if ($out && CRM_Core_Permission::check('view debug output')) {
@@ -600,6 +607,20 @@
 }
 
 return $str;
+  }
+
+  /**
+   * Log message without appending timestamp or error level.
+   *
+   * @param string $message
+   *   Message to output.
+   * @param bool $out
+   *   Should we print the output.
+   * @param string $prefix
+   *   String to append to the log file
+   */
+  public static function debug_raw_message($message, $out = FALSE, $prefix = 
'') {
+self::debug_log_message($message, $out, $prefix, NULL, array('lineFormat' 
=> '%4$s'));
   }
 
   /**
@@ -633,19 +654,31 @@
   /**
* Obtain a reference to the error log.
*
-   * @param string $comp
+   * @param string $prefix
+   * @param array $logConfig
+   *   Configuration options to pass to the logging class.
*
* @return Log
*/
-  public static function createDebugLogger($comp = '') {
-if (!isset(\Civi::$statics[__CLASS__]['logger_file' . $comp])) {
+  public static function createDebugLogger($prefix = '', $logConfig = array()) 
{
+self::generateLogFileName($prefix);
+return Log::singleton('file', \Civi::$statics[__CLASS__]['logger_file' . 
$prefix], '', $logConfig);
+  }
+
+  /**
+   * Generate the name of the logfile to use and store it as a static.
+   *
+   * This function includes poor man's log file management and a check as to 
whether the file exists.
+   *
+   * @param string $prefix
+   */
+  protected static function generateLogFileName($prefix) {
+if (!isset(\Civi::$statics[__CLASS__]['logger_file' . $prefix])) {
   $config = CRM_Core_Config::singleton();
 
-  if ($comp) {
-$comp = $comp . '.';
-  }
+  $prefixString = $prefix ? ($prefix . '.') : '';
 
-  $fileName = "{$config->configAndLogDir}CiviCRM." . $comp . 
md5($config->dsn) . '.log';
+  $fileName = $config->configAndLogDir . 'CiviCRM.' . $prefixString . 
md5($config->dsn) . '.log';
 
   // Roll log file monthly or if greater than 256M
   // note that PHP file functions have a limit of 2G and hence
@@ -662,9 +695,8 @@
   );
 }
   }
-  \Civi::$statics[__CLASS__]['logger_file' . $comp] = $fileName;
+  \Civi::$statics[__CLASS__]['logger_file' . $prefix] = $fileName;
 }
-return Log::singleton('file', \Civi::$statics[__CLASS__]['logger_file' . 
$comp]);
   }
 
   /**

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] add Wikidata browser test jobs for group0 - change (integration/config)

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

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

Change subject: add Wikidata browser test jobs for group0
..

add Wikidata browser test jobs for group0

i.e. test.wikidata.org

Bug: T101497
Change-Id: If5f2003cff69d14580e7139c276de5416a02d727
---
M jjb/browsertests.yaml
1 file changed, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/55/280155/1

diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml
index 54acd4e..0889910 100644
--- a/jjb/browsertests.yaml
+++ b/jjb/browsertests.yaml
@@ -416,6 +416,30 @@
  cucumber_tags: '@smoke'
  recipients: *emails-Wikidata-devs
 - project:
+name: WikidataTests-Group0
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-test.wikidata.org
+mediawiki_url: test.wikidata.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: WikidataBrowserTests.git
+repository_host: github.com/wmde
+browsertest_job_timeout: '240'
+# TODO
+cucumber_tags: '@wikidata.beta.wmflabs.org'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ name: WikidataTests-Group0-SmokeTests
+ browser: firefox
+ cucumber_tags: '@smoke'
+- project:
 name: WikidataTestsHeadless
 defaults: browsertests
 browser: firefox
@@ -453,6 +477,25 @@
  browser:
- firefox
- chrome
+- project:
+name: Wikibase-Group0
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-test.wikidata.org
+mediawiki_url: test.wikidata.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: mediawiki/extensions/Wikibase
+browsertest_job_timeout: '240'
+# TODO
+cucumber_tags: '@wikidata.beta.wmflabs.org'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
 
 # WikiLove
 - project:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5f2003cff69d14580e7139c276de5416a02d727
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] Add back groups for browsertests - change (mediawiki...Wikibase)

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

Change subject: Add back groups for browsertests
..


Add back groups for browsertests

that are there in WikidataBrowserTests.

Bug: T118727
Change-Id: I4828b96a82fb955aa4ce427ffb56c274225ad49c
---
M tests/browser/features/non_existing_item.feature
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/features/non_existing_item.feature 
b/tests/browser/features/non_existing_item.feature
index 0715bfe..d831599 100644
--- a/tests/browser/features/non_existing_item.feature
+++ b/tests/browser/features/non_existing_item.feature
@@ -4,7 +4,7 @@
 #
 # feature the functionality of a non existing item page
 
-@integration
+@integration @chrome @firefox @internet_explorer_10 @internet_explorer_11 
@local_config @wikidata.beta.wmflabs.org
 Feature: Non existing item
 
 Scenario: Edit tab

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4828b96a82fb955aa4ce427ffb56c274225ad49c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 
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] add Wikibase browser tests - change (integration/config)

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

Change subject: add Wikibase browser tests
..


add Wikibase browser tests

Bug: T118727
Change-Id: I17849a9e7e38f9788091a18fb5d10131b69c01f7
---
M jjb/browsertests.yaml
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml
index 889d67e..54acd4e 100644
--- a/jjb/browsertests.yaml
+++ b/jjb/browsertests.yaml
@@ -436,6 +436,23 @@
  name: SmokeTests
  cucumber_tags: '@smoke'
  recipients: *emails-Wikidata-devs
+- project:
+name: Wikibase-Beta
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-beta.wmflabs.org
+mediawiki_url: wikidata.beta.wmflabs.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: mediawiki/extensions/Wikibase
+browsertest_job_timeout: '240'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
 
 # WikiLove
 - project:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17849a9e7e38f9788091a18fb5d10131b69c01f7
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
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] Preferences: Add autocomplete="off" to preferences form - change (mediawiki/core)

2016-03-28 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Preferences: Add autocomplete="off" to preferences form
..

Preferences: Add autocomplete="off" to preferences form

This change adds a new method setAutocomplete to the class HTMLForm.
This method allows to set the HTML attribute autocomplete for the form.
This change uses this method to set autocomplete="off" for the preferences form.

Without autocomplete="off" the selections in the preferences get cached in
the browser. This can lead to wrong selected options when the settings get
changed on an other way, for example via API.

Bug: T131047
Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8
---
M includes/Preferences.php
M includes/htmlform/HTMLForm.php
2 files changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/280154/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index 54176a6..66a8152 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1301,6 +1301,7 @@
 
$htmlForm->setModifiedUser( $user );
$htmlForm->setId( 'mw-prefs-form' );
+   $htmlForm->setAutocomplete( 'off' );
$htmlForm->setSubmitText( $context->msg( 'saveprefs' )->text() 
);
# Used message keys: 'accesskey-preferences-save', 
'tooltip-preferences-save'
$htmlForm->setSubmitTooltip( 'preferences-save' );
diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index ba43244..bf46e55 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -198,6 +198,13 @@
 */
protected $mAction = false;
 
+   /**
+* Form attribute autocomplete. false does not set the attribute
+* @since 1.27
+* @var bool|string
+*/
+   protected $mAutocomplete = false;
+
protected $mUseMultipart = false;
protected $mHiddenFields = [];
protected $mButtons = [];
@@ -996,6 +1003,9 @@
if ( !empty( $this->mId ) ) {
$attribs['id'] = $this->mId;
}
+   if ( !empty( $this->mAutocomplete ) ) {
+   $attribs['autocomplete'] = $this->mAutocomplete;
+   }
return $attribs;
}
 
@@ -1677,4 +1687,20 @@
 
return $this->getTitle()->getLocalURL();
}
+
+   /**
+* Set the value for the autocomplete attribute of the form.
+* When set to false (which is the default state), the attribute get 
not set.
+*
+* @since 1.27
+*
+* @param string|bool $autocomplete
+*
+* @return HTMLForm $this for chaining calls
+*/
+   public function setAutocomplete( $autocomplete ) {
+   $this->mAutocomplete = $autocomplete;
+
+   return $this;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] add Wikibase browser tests - change (integration/config)

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

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

Change subject: add Wikibase browser tests
..

add Wikibase browser tests

Bug: T118727
Change-Id: I17849a9e7e38f9788091a18fb5d10131b69c01f7
---
M jjb/browsertests.yaml
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/53/280153/1

diff --git a/jjb/browsertests.yaml b/jjb/browsertests.yaml
index 889d67e..54acd4e 100644
--- a/jjb/browsertests.yaml
+++ b/jjb/browsertests.yaml
@@ -436,6 +436,23 @@
  name: SmokeTests
  cucumber_tags: '@smoke'
  recipients: *emails-Wikidata-devs
+- project:
+name: Wikibase-Beta
+defaults: browsertests
+folder: tests
+headless: 'false'
+mediawiki_credentials_id: WikidataTester-at-beta.wmflabs.org
+mediawiki_url: wikidata.beta.wmflabs.org
+platform: linux
+recipients: *emails-Wikidata-qa
+repository: mediawiki/extensions/Wikibase
+browsertest_job_timeout: '240'
+
+jobs:
+  - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+ browser:
+   - firefox
+   - chrome
 
 # WikiLove
 - project:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17849a9e7e38f9788091a18fb5d10131b69c01f7
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] Add back groups for browsertests - change (mediawiki...Wikibase)

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

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

Change subject: Add back groups for browsertests
..

Add back groups for browsertests

that are there in WikidataBrowserTests.

Change-Id: I4828b96a82fb955aa4ce427ffb56c274225ad49c
---
M tests/browser/features/non_existing_item.feature
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/browser/features/non_existing_item.feature 
b/tests/browser/features/non_existing_item.feature
index 0715bfe..d831599 100644
--- a/tests/browser/features/non_existing_item.feature
+++ b/tests/browser/features/non_existing_item.feature
@@ -4,7 +4,7 @@
 #
 # feature the functionality of a non existing item page
 
-@integration
+@integration @chrome @firefox @internet_explorer_10 @internet_explorer_11 
@local_config @wikidata.beta.wmflabs.org
 Feature: Non existing item
 
 Scenario: Edit tab

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4828b96a82fb955aa4ce427ffb56c274225ad49c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] add rake task test - change (mediawiki...Wikibase)

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

Change subject: add rake task test
..


add rake task test

Change-Id: I5e6498cf3f5fcd52ab699faf98ec7c173b5ce0a6
---
A .rubocop.yml
R Gemfile
A Rakefile
3 files changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 000..5d8088c
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1 @@
+# See https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby
diff --git a/tests/browser/Gemfile b/Gemfile
similarity index 100%
rename from tests/browser/Gemfile
rename to Gemfile
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 000..fb102b2
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,14 @@
+require 'bundler/setup'
+
+require 'rubocop/rake_task'
+RuboCop::RakeTask.new(:rubocop) do |task|
+  # if you use mediawiki-vagrant, rubocop will by default use it's .rubocop.yml
+  # the next line makes it explicit that you want .rubocop.yml from the 
directory
+  # where `bundle exec rake` is executed
+  task.options = ['-c', '.rubocop.yml']
+end
+
+task default: [:test]
+
+desc 'Run all build/tests commands (CI entry point)'
+task test: [] # TODO add :rubocop after files where moved from 
WikidataBrowsertests

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e6498cf3f5fcd52ab699faf98ec7c173b5ce0a6
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: JanZerebecki 
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


[MediaWiki-commits] [Gerrit] Add two Collaboration team boards - change (labs...wikibugs2)

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

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

Change subject: Add two Collaboration team boards
..

Add two Collaboration team boards

Change-Id: If695758ebdd54b36daa1947ca137153da4285553
---
M channels.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/51/280151/1

diff --git a/channels.yaml b/channels.yaml
index f907c37..7402085 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -31,8 +31,10 @@
 "#wikimedia-collaboration":
 # teams
 - Collaboration-Team(-.*)?
+- Collab-Team-2016-Q4
 # projects
 - Echo
+- Collab-Notifications-Page
 - Flow
 - MoodBar
 - MediaWiki-extensions-PageCuration

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If695758ebdd54b36daa1947ca137153da4285553
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
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] configure cp1008 for http2 - change (operations/puppet)

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

Change subject: configure cp1008 for http2
..


configure cp1008 for http2

Bug: T96848
Change-Id: I51a4cb8aa3ef13b3e8cb20efe2bed555b33d483a
---
M hieradata/hosts/cp1008.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/hosts/cp1008.yaml b/hieradata/hosts/cp1008.yaml
index 0898300..83fc5db 100644
--- a/hieradata/hosts/cp1008.yaml
+++ b/hieradata/hosts/cp1008.yaml
@@ -1,3 +1,4 @@
 debdeploy::grains:
   debdeploy-cp:
 value: canary
+tlsproxy::localssl::do_spdy: false

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

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

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


[MediaWiki-commits] [Gerrit] tlsproxy: use do_spdy to control http2-vs-spdy - change (operations/puppet)

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

Change subject: tlsproxy: use do_spdy to control http2-vs-spdy
..


tlsproxy: use do_spdy to control http2-vs-spdy

Bug: T96848
Change-Id: I9debd779e169e6dc99cac1472c53c6f1a3a43c8b
---
M modules/tlsproxy/manifests/instance.pp
M modules/tlsproxy/templates/localssl.erb
M modules/tlsproxy/templates/nginx.conf.erb
3 files changed, 26 insertions(+), 2 deletions(-)

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



diff --git a/modules/tlsproxy/manifests/instance.pp 
b/modules/tlsproxy/manifests/instance.pp
index 34a9da3..c1d1ecb 100644
--- a/modules/tlsproxy/manifests/instance.pp
+++ b/modules/tlsproxy/manifests/instance.pp
@@ -5,6 +5,7 @@
 
 $nginx_worker_connections = '32768'
 $nginx_ssl_conf = ssl_ciphersuite('nginx', 'compat')
+$do_spdy = hiera('tlsproxy::localssl::do_spdy', true)
 
 class { 'nginx': managed => false, }
 
diff --git a/modules/tlsproxy/templates/localssl.erb 
b/modules/tlsproxy/templates/localssl.erb
index 294155c..c95dca3 100644
--- a/modules/tlsproxy/templates/localssl.erb
+++ b/modules/tlsproxy/templates/localssl.erb
@@ -9,8 +9,8 @@
 
 # SSL proxying
 server {
-   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=4096 reuseport ipv6only=on " : "" %>ssl <% if @do_spdy %>spdy<% end %>;
-   listen 443 <%= @default_server ? "default_server deferred backlog=4096 
reuseport " : "" %>ssl <% if @do_spdy %>spdy<% end %>;
+   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=4096 reuseport ipv6only=on " : "" %>ssl <% if @do_spdy %>spdy<% else 
%>http2<% end %>;
+   listen 443 <%= @default_server ? "default_server deferred backlog=4096 
reuseport " : "" %>ssl <% if @do_spdy %>spdy<% else %>http2<% end %>;
ssl on;
server_name <%= ([@server_name] + @server_aliases).join(" ") %>;
 
@@ -45,7 +45,11 @@
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
+<% if @do_spdy -%>
proxy_set_header X-Connection-Properties "SPDY=$spdy_version; 
SSR=$session_reused; SSL=$ssl_protocol; C=$ssl_cipher;";
+<% else -%>
+   proxy_set_header X-Connection-Properties "H2=$h2; 
SSR=$session_reused; SSL=$ssl_protocol; C=$ssl_cipher;";
+<% end -%>
 
# This sets AE:gzip for all SPDY requests, see comments in main 
nginx.conf
proxy_set_header Accept-Encoding $accept_encoding;
diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 4db5ea5..fc1e84d 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -90,6 +90,7 @@
 # to be watched, experimented on, and tuned as more load comes in...
 ssl_buffer_size 1300;
 
+<% if @do_spdy -%>
 # default zlib compression level for SPDY response headers
 spdy_headers_comp 6;
 
@@ -107,6 +108,24 @@
 default $spdy;
 '' '0';
 }
+<% else -%>
+# TODO: not sure if this is still necessary with HTTP/2 and FF, as it was 
with SPDY
+# This is used to inject "Accept-Encoding: gzip" into all proxied HTTP/2 
requests
+# The other half of the solution is in the per-server proxy configuration 
in the
+# form of a line like: proxy_set_header Accept-Encoding $accept_encoding;
+# This is based on: http://trac.nginx.org/nginx/ticket/542#comment:1
+map $http2 $accept_encoding {
+default gzip;
+''  $http_accept_encoding;
+}
+
+# nginx's $http2 is either 'h2' or '' (empty string) for http/1
+# Map it to $h2 as a boolean string value '1' or '0' for use in headers
+map $http2 $h2 {
+default '1';
+'' '0';
+}
+<% end -%>
 
 # Nginx indicates session reuse with 'r' and '.', which is rather cryptic.
 # Map this value to '1' and '0' instead.

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

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

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


[MediaWiki-commits] [Gerrit] Updates revscoring to 1.1.8 - change (research...wheels)

2016-03-28 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged.

Change subject: Updates revscoring to 1.1.8
..


Updates revscoring to 1.1.8

Change-Id: I00726449197749bc8e3f956ad5b9d06d2d0144c8
---
R revscoring-1.1.8-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/revscoring-1.1.3-py2.py3-none-any.whl 
b/revscoring-1.1.8-py2.py3-none-any.whl
similarity index 75%
rename from revscoring-1.1.3-py2.py3-none-any.whl
rename to revscoring-1.1.8-py2.py3-none-any.whl
index 5afb8da..3c051e0 100644
--- a/revscoring-1.1.3-py2.py3-none-any.whl
+++ b/revscoring-1.1.8-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00726449197749bc8e3f956ad5b9d06d2d0144c8
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] CP cookie: update for HTTP/2 - change (operations/puppet)

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

Change subject: CP cookie: update for HTTP/2
..


CP cookie: update for HTTP/2

Bug: T118892
Change-Id: I53c7405afc7325496f34718426f136c77e9fe095
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index f9e1275..2409e42 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -345,7 +345,7 @@
std.collect(resp.http.X-Varnish);
 
// Set CP ('Connection Properties') cookie
-   if (req.http.X-Connection-Properties ~ "SPDY=3") {
+   if (req.http.X-Connection-Properties ~ "SPDY=3|H2=1") {
if (req.http.X-Orig-Cookie !~ "(^|;\s*)CP=H2" && 
req.http.Cookie !~ "(^|;\s*)CP=H2") {
header.append(resp.http.Set-Cookie, "CP=H2; Path=/");
}

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

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

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


[MediaWiki-commits] [Gerrit] Updates revscoring to 1.1.8 - change (research...wheels)

2016-03-28 Thread Halfak (Code Review)
Halfak has uploaded a new change for review.

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

Change subject: Updates revscoring to 1.1.8
..

Updates revscoring to 1.1.8

Change-Id: I00726449197749bc8e3f956ad5b9d06d2d0144c8
---
R revscoring-1.1.8-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/50/280150/1

diff --git a/revscoring-1.1.3-py2.py3-none-any.whl 
b/revscoring-1.1.8-py2.py3-none-any.whl
similarity index 75%
rename from revscoring-1.1.3-py2.py3-none-any.whl
rename to revscoring-1.1.8-py2.py3-none-any.whl
index 5afb8da..3c051e0 100644
--- a/revscoring-1.1.3-py2.py3-none-any.whl
+++ b/revscoring-1.1.8-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00726449197749bc8e3f956ad5b9d06d2d0144c8
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] tlsproxy: use do_spdy to control http2-vs-spdy - change (operations/puppet)

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

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

Change subject: tlsproxy: use do_spdy to control http2-vs-spdy
..

tlsproxy: use do_spdy to control http2-vs-spdy

Bug: T96848
Change-Id: I9debd779e169e6dc99cac1472c53c6f1a3a43c8b
---
M modules/tlsproxy/templates/localssl.erb
M modules/tlsproxy/templates/nginx.conf.erb
2 files changed, 25 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/280148/1

diff --git a/modules/tlsproxy/templates/localssl.erb 
b/modules/tlsproxy/templates/localssl.erb
index 294155c..c95dca3 100644
--- a/modules/tlsproxy/templates/localssl.erb
+++ b/modules/tlsproxy/templates/localssl.erb
@@ -9,8 +9,8 @@
 
 # SSL proxying
 server {
-   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=4096 reuseport ipv6only=on " : "" %>ssl <% if @do_spdy %>spdy<% end %>;
-   listen 443 <%= @default_server ? "default_server deferred backlog=4096 
reuseport " : "" %>ssl <% if @do_spdy %>spdy<% end %>;
+   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=4096 reuseport ipv6only=on " : "" %>ssl <% if @do_spdy %>spdy<% else 
%>http2<% end %>;
+   listen 443 <%= @default_server ? "default_server deferred backlog=4096 
reuseport " : "" %>ssl <% if @do_spdy %>spdy<% else %>http2<% end %>;
ssl on;
server_name <%= ([@server_name] + @server_aliases).join(" ") %>;
 
@@ -45,7 +45,11 @@
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
+<% if @do_spdy -%>
proxy_set_header X-Connection-Properties "SPDY=$spdy_version; 
SSR=$session_reused; SSL=$ssl_protocol; C=$ssl_cipher;";
+<% else -%>
+   proxy_set_header X-Connection-Properties "H2=$h2; 
SSR=$session_reused; SSL=$ssl_protocol; C=$ssl_cipher;";
+<% end -%>
 
# This sets AE:gzip for all SPDY requests, see comments in main 
nginx.conf
proxy_set_header Accept-Encoding $accept_encoding;
diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 4db5ea5..fc1e84d 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -90,6 +90,7 @@
 # to be watched, experimented on, and tuned as more load comes in...
 ssl_buffer_size 1300;
 
+<% if @do_spdy -%>
 # default zlib compression level for SPDY response headers
 spdy_headers_comp 6;
 
@@ -107,6 +108,24 @@
 default $spdy;
 '' '0';
 }
+<% else -%>
+# TODO: not sure if this is still necessary with HTTP/2 and FF, as it was 
with SPDY
+# This is used to inject "Accept-Encoding: gzip" into all proxied HTTP/2 
requests
+# The other half of the solution is in the per-server proxy configuration 
in the
+# form of a line like: proxy_set_header Accept-Encoding $accept_encoding;
+# This is based on: http://trac.nginx.org/nginx/ticket/542#comment:1
+map $http2 $accept_encoding {
+default gzip;
+''  $http_accept_encoding;
+}
+
+# nginx's $http2 is either 'h2' or '' (empty string) for http/1
+# Map it to $h2 as a boolean string value '1' or '0' for use in headers
+map $http2 $h2 {
+default '1';
+'' '0';
+}
+<% end -%>
 
 # Nginx indicates session reuse with 'r' and '.', which is rather cryptic.
 # Map this value to '1' and '0' instead.

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

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

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


[MediaWiki-commits] [Gerrit] CP cookie: update for HTTP/2 - change (operations/puppet)

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

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

Change subject: CP cookie: update for HTTP/2
..

CP cookie: update for HTTP/2

Bug: T118892
Change-Id: I53c7405afc7325496f34718426f136c77e9fe095
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/280147/1

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index f9e1275..2409e42 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -345,7 +345,7 @@
std.collect(resp.http.X-Varnish);
 
// Set CP ('Connection Properties') cookie
-   if (req.http.X-Connection-Properties ~ "SPDY=3") {
+   if (req.http.X-Connection-Properties ~ "SPDY=3|H2=1") {
if (req.http.X-Orig-Cookie !~ "(^|;\s*)CP=H2" && 
req.http.Cookie !~ "(^|;\s*)CP=H2") {
header.append(resp.http.Set-Cookie, "CP=H2; Path=/");
}

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

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

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


[MediaWiki-commits] [Gerrit] configure cp1008 for http2 - change (operations/puppet)

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

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

Change subject: configure cp1008 for http2
..

configure cp1008 for http2

Bug: T96848
Change-Id: I51a4cb8aa3ef13b3e8cb20efe2bed555b33d483a
---
M hieradata/hosts/cp1008.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/280149/1

diff --git a/hieradata/hosts/cp1008.yaml b/hieradata/hosts/cp1008.yaml
index 0898300..83fc5db 100644
--- a/hieradata/hosts/cp1008.yaml
+++ b/hieradata/hosts/cp1008.yaml
@@ -1,3 +1,4 @@
 debdeploy::grains:
   debdeploy-cp:
 value: canary
+tlsproxy::localssl::do_spdy: false

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] add rake task test - change (mediawiki...Wikibase)

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

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

Change subject: [WIP] add rake task test
..

[WIP] add rake task test

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e6498cf3f5fcd52ab699faf98ec7c173b5ce0a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] re-activate mw2090 in conftool - change (operations/puppet)

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

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

Change subject: re-activate mw2090 in conftool
..

re-activate mw2090 in conftool

mw2090 has been reinstalled as a regular appserver.

Change-Id: I1a8369d1683d0d52feab11039b814950f7317009
---
M conftool-data/nodes/codfw.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/280145/1

diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index 3841bc0..873b51b 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -40,6 +40,7 @@
   mw2047.codfw.wmnet: [apache2]
   mw2048.codfw.wmnet: [apache2]
   mw2049.codfw.wmnet: [apache2]
+  mw2090.codfw.wmnet: [apache2]
   mw2091.codfw.wmnet: [apache2]
   mw2092.codfw.wmnet: [apache2]
   mw2093.codfw.wmnet: [apache2]

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

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

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


[MediaWiki-commits] [Gerrit] dsh: add wasat, add comments - change (operations/puppet)

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

Change subject: dsh: add wasat, add comments
..


dsh: add wasat, add comments

Add new server wasat, equivalent of terbium in codfw.

Move server names around and add comments/sections.

Bug:T129930
Change-Id: I6245c8507780a39a2750dbabe2c775e176feb9d1
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 53a2942..cc192b0 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -1,10 +1,17 @@
 # !all names added here must be FQDN's now (T93983) !
 
-mira.codfw.wmnet
-silver.wikimedia.org
+# deployment
 tin.eqiad.wmnet
-terbium.eqiad.wmnet
+mira.codfw.wmnet
 
+# maintenance
+terbium.eqiad.wmnet
+wasat.codfw.wmnet
+
+# wikitech
+silver.wikimedia.org
+
+# eqiad
 snapshot1001.eqiad.wmnet
 snapshot1002.eqiad.wmnet
 snapshot1003.eqiad.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Use composer phpunit for GoogleLogin - change (integration/config)

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

Change subject: Use composer phpunit for GoogleLogin
..


Use composer phpunit for GoogleLogin

Required for the GoogleAPIClient dependency.

Change-Id: I2bd1b3b94a3a7b3e6056b4a5fa607f28ff038efd
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 75403bc..e413c01 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3279,7 +3279,7 @@
   - name: mediawiki/extensions/GoogleLogin
 template:
   - name: composer-test
-  - name: extension-unittests-generic
+  - name: extension-unittests-composer
   - name: npm
 check:
   - jsonlint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bd1b3b94a3a7b3e6056b4a5fa607f28ff038efd
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Florianschmidtwelzow 
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] dsh: add wasat, add comments - change (operations/puppet)

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

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

Change subject: dsh: add wasat, add comments
..

dsh: add wasat, add comments

add wasat, equivalent of terbium in codfw

add/adjust comments

Bug:T129930
Change-Id: I6245c8507780a39a2750dbabe2c775e176feb9d1
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/280144/1

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 53a2942..cc192b0 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -1,10 +1,17 @@
 # !all names added here must be FQDN's now (T93983) !
 
-mira.codfw.wmnet
-silver.wikimedia.org
+# deployment
 tin.eqiad.wmnet
-terbium.eqiad.wmnet
+mira.codfw.wmnet
 
+# maintenance
+terbium.eqiad.wmnet
+wasat.codfw.wmnet
+
+# wikitech
+silver.wikimedia.org
+
+# eqiad
 snapshot1001.eqiad.wmnet
 snapshot1002.eqiad.wmnet
 snapshot1003.eqiad.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] add rake for browsertests to ext:Wikibase - change (integration/config)

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

Change subject: add rake for browsertests to ext:Wikibase
..


add rake for browsertests to ext:Wikibase

Bug: T130038
Change-Id: I244275ed0e89465885b914d7b0bbca70285c7694
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..75403bc 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7472,6 +7472,7 @@
   - name: composer-test
   - name: extension-unittests-composer
   - name: extension-qunit-composer
+  - name: rake
 check:
   - jshint
   - jsonlint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I244275ed0e89465885b914d7b0bbca70285c7694
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] add rake for browsertests to ext:Wikibase - change (integration/config)

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

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

Change subject: add rake for browsertests to ext:Wikibase
..

add rake for browsertests to ext:Wikibase

Bug: T130038
Change-Id: I244275ed0e89465885b914d7b0bbca70285c7694
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/43/280143/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..75403bc 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7472,6 +7472,7 @@
   - name: composer-test
   - name: extension-unittests-composer
   - name: extension-qunit-composer
+  - name: rake
 check:
   - jshint
   - jsonlint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I244275ed0e89465885b914d7b0bbca70285c7694
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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] Update restbase to a97aa98 - change (mediawiki...deploy)

2016-03-28 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged.

Change subject: Update restbase to a97aa98
..


Update restbase to a97aa98

List of changes:
92d501a Improved error typing
56e4333 HotFix: Revert parametre rename for pageviews

Change-Id: Ibad6c023b2d4aca694801bfb3886a792a00f1573
---
M restbase
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/restbase b/restbase
index 32992df..a97aa98 16
--- a/restbase
+++ b/restbase
-Subproject commit 32992df96f30e7fc9f44ccf0091dbbcefc1d54b8
+Subproject commit a97aa989378859d2567de5b64d7379fe3cf77aec

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibad6c023b2d4aca694801bfb3886a792a00f1573
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] Update restbase to a97aa98 - change (mediawiki...deploy)

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

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

Change subject: Update restbase to a97aa98
..

Update restbase to a97aa98

List of changes:
92d501a Improved error typing
56e4333 HotFix: Revert parametre rename for pageviews

Change-Id: Ibad6c023b2d4aca694801bfb3886a792a00f1573
---
M restbase
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/42/280142/1

diff --git a/restbase b/restbase
index 32992df..a97aa98 16
--- a/restbase
+++ b/restbase
-Subproject commit 32992df96f30e7fc9f44ccf0091dbbcefc1d54b8
+Subproject commit a97aa989378859d2567de5b64d7379fe3cf77aec

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibad6c023b2d4aca694801bfb3886a792a00f1573
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] Remove / from Flow.namespaces.php - change (mediawiki...Flow)

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

Change subject: Remove / from Flow.namespaces.php
..


Remove / from Flow.namespaces.php

Reason since $dir = __DIR__ . '/'; already does it meaning two of / will
cause the file not to be found.

Change-Id: I0c9d948310c9de0314449c0ae9beb5bab6256bf4
---
M Flow.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Flow.php b/Flow.php
index 8bd161b..306ce72 100644
--- a/Flow.php
+++ b/Flow.php
@@ -88,7 +88,7 @@
 $wgHooks['BeforePageDisplay'][] = 'FlowHooks::onBeforePageDisplay';
 
 $wgMessagesDirs['Flow'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['FlowNamespaces'] = $dir . '/Flow.namespaces.php';
+$wgExtensionMessagesFiles['FlowNamespaces'] = $dir . 'Flow.namespaces.php';
 
 // This file is autogenerated by scripts/gen-autoload.php
 require __DIR__ . '/autoload.php';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c9d948310c9de0314449c0ae9beb5bab6256bf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Dump queue to file, leaving messages - change (wikimedia...SmashPig)

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

Change subject: Dump queue to file, leaving messages
..


Dump queue to file, leaving messages

Simple change lets you use EmptyQueueToDump to look at queue
contents in case your activeMQ console is hosed.

Change-Id: I28223fff968affa7fe4f703a17c4459c2c6034e7
---
M Maintenance/EmptyQueueToDump.php
1 file changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/Maintenance/EmptyQueueToDump.php b/Maintenance/EmptyQueueToDump.php
index 6af5f93..ea57bd6 100644
--- a/Maintenance/EmptyQueueToDump.php
+++ b/Maintenance/EmptyQueueToDump.php
@@ -29,6 +29,7 @@
$this->addOption( 'max-messages', 'At most consume  
messages, 0 is infinite', 10, 'm' );
$this->addOption( 'outfile', 'File to place JSON encoded 
messages into', 'messages.json', 'f' );
$this->addOption( 'raw', 'Do not ensure that extracted messages 
are SmashPig objects' );
+   $this->addOption( 'no-ack', 'Do not ack messages - leave them 
in the queue' );
$this->addArgument( 'selector', 'STOMP selector to use', false 
);
$this->addArgument( 'selector2', 'Additional STOMP 
selectors...', false );
}
@@ -44,6 +45,7 @@
$messageCount = 0;
 
$raw = $this->getOption( 'raw' );
+   $ignore = $this->getOption( 'no-ack' );
 
// Construct the selectors
$argId = 0;
@@ -82,7 +84,11 @@
Logger::warning( "Possibly caught an 
antimessage. Not adding to file.", null, $ex );
}
 
-   $this->datastore->queueAckObject();
+   if ( $ignore ) {
+   $this->datastore->queueIgnoreObject();
+   } else {
+   $this->datastore->queueAckObject();
+   }
 
$messageCount += 1;
 
@@ -96,4 +102,4 @@
 
 }
 
-require( RUN_MAINTENANCE_IF_MAIN );
\ No newline at end of file
+require( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28223fff968affa7fe4f703a17c4459c2c6034e7
Gerrit-PatchSet: 2
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] [WIP] Change meaning of validation variables - change (mediawiki...DonationInterface)

2016-03-28 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: [WIP] Change meaning of validation variables
..

[WIP] Change meaning of validation variables

There were two buckets of errors, "validation" and "manual".  As it turned
out, we were using the "manual" bucket to mean anything that was added outside
of the DataValidator, and we want to "manually" add both validation errors and
transaction errors.  Therefore, I'm changing calling code to be more careful to
agree to fail on any errors whatsoever be its bucket.

Bug: T98447
Change-Id: Ie7bdf1fba937bf620b1e83d6e45f0f7ca770714a
---
M amazon_gateway/amazon.api.php
M gateway_common/GatewayPage.php
M gateway_common/gateway.adapter.php
M tests/includes/test_gateway/TestingGenericAdapter.php
M worldpay_gateway/worldpay.api.php
5 files changed, 34 insertions(+), 37 deletions(-)


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

diff --git a/amazon_gateway/amazon.api.php b/amazon_gateway/amazon.api.php
index 4fdd87e..362d280 100644
--- a/amazon_gateway/amazon.api.php
+++ b/amazon_gateway/amazon.api.php
@@ -26,12 +26,9 @@
 
$adapter = new AmazonAdapter( $adapterParams );
 
-   if ( !$adapter->validatedOK() ) {
-   $output->addValue(
-   null,
-   'errors',
-   $adapter->getValidationErrors()
-   );
+   $errors = $adapter->getAllErrors();
+   if ( $errors ) {
+   $output->addValue( null, 'errors', $errors );
} else if ( $token && $adapter->checkTokens() ) {
if ( $recurring ) {
$adapter->addRequestData( array(
diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index d49f143..e8e38b0 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -139,14 +139,13 @@
 * a piece of mostly UI, this function needs to be moved inside the 
gateway 
 * adapter class.
 *
-* @return boolean Returns false on an error-free validation, otherwise 
true.
-* FIXME: that return value seems backwards to me.
+* @return array returns a list of all errors encountered.
 */
public function validateForm() {
 
-   $validated_ok = $this->adapter->revalidate();
+   $this->adapter->revalidate();
 
-   return !$validated_ok;
+   return $this->adapter->getAllErrors();
}
 
/**
@@ -428,6 +427,23 @@
if ( $result->isFailed() ) {
$this->logger->info( 'Displaying fail page for failed 
PaymentResult' );
$this->displayFailPage();
+   } elseif ( $errors = $result->getErrors() ) {
+   // FIXME: Creepy.  Currently, the form inspects adapter 
errors.  Use
+   // the stuff encapsulated in PaymentResult instead.
+   foreach ( 
$this->adapter->getTransactionResponse()->getErrors() as $code => 
$transactionError ) {
+   $message = $transactionError['message'];
+   $error = array();
+   if ( !empty( $transactionError['context'] ) ) {
+   $error[$transactionError['context']] = 
$message;
+   } else if ( strpos( $code, 'internal' ) === 0 ) 
{
+   $error['retryMsg'][ $code ] = $message;
+   }
+   else {
+   $error['general'][ $code ] = $message;
+   }
+   $this->adapter->addManualError( $error );
+   }
+   $this->displayForm();
} elseif ( $url = $result->getRedirect() ) {
$this->getOutput()->redirect( $url );
} elseif ( $url = $result->getIframe() ) {
@@ -445,23 +461,6 @@
$this->adapter->addRequestData( array(
'ffname' => $form,
) );
-   $this->displayForm();
-   } elseif ( $errors = $result->getErrors() ) {
-   // FIXME: Creepy.  Currently, the form inspects adapter 
errors.  Use
-   // the stuff encapsulated in PaymentResult instead.
-   foreach ( 
$this->adapter->getTransactionResponse()->getErrors() as $code => 
$transactionError ) {
-   $message = $transactionError['message'];
-   $error = array();
- 

[MediaWiki-commits] [Gerrit] speed-tests: Add samples for MobileFrontend lazy-load images - change (operations/mediawiki-config)

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

Change subject: speed-tests: Add samples for MobileFrontend lazy-load images
..


speed-tests: Add samples for MobileFrontend lazy-load images

* Barack_Obama.712412934.mobile-original.html

  Fresh copy from .

* Barack_Obama.712412934.mobile-lazyimage.html

  Applied to mw1099:

  > ++ wmf-config/mobile.php
  > + $wgMFLazyLoadImages = array( 'base' => true, 'beta' => true );

  Generated using:
  > curl -H 'X-Wikimedia-Debug: mw1099.eqiad.wmnet' 
'https://en.m.wikipedia.org/wiki/Barack_Obama'

Bug: T124390
Change-Id: I20a8d40830d16873751bb5185e354d6bb0a70955
---
A docroot/wikipedia.org/speed-tests/Barack_Obama.712412934.mobile-lazyimage.html
A docroot/wikipedia.org/speed-tests/Barack_Obama.712412934.mobile-original.html
M docroot/wikipedia.org/speed-tests/pages.html
3 files changed, 2,591 insertions(+), 0 deletions(-)

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




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

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

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


[MediaWiki-commits] [Gerrit] speed-tests: Add samples for MobileFrontend lazy-load images - change (operations/mediawiki-config)

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

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

Change subject: speed-tests: Add samples for MobileFrontend lazy-load images
..

speed-tests: Add samples for MobileFrontend lazy-load images

* Barack_Obama.712412934.mobile-original.html

  Fresh copy from .

* Barack_Obama.712412934.mobile-lazyimage.html

  Applied to mw1099:

  > ++ wmf-config/mobile.php
  > + $wgMFLazyLoadImages = array( 'base' => true, 'beta' => true );

  Generated using:
  > curl -H 'X-Wikimedia-Debug: mw1099.eqiad.wmnet' 
'https://en.m.wikipedia.org/wiki/Barack_Obama'

Bug: T124390
Change-Id: I20a8d40830d16873751bb5185e354d6bb0a70955
---
A docroot/wikipedia.org/speed-tests/Barack_Obama.712412934.mobile-lazyimage.html
A docroot/wikipedia.org/speed-tests/Barack_Obama.712412934.mobile-original.html
2 files changed, 2,588 insertions(+), 0 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] Add ol.references to ignored elements - change (mediawiki...TextExtracts)

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

Change subject: Add ol.references to ignored elements
..


Add ol.references to ignored elements

Bug: T74629
Change-Id: Iff299bd7eb430f27c682206bf7abc00ac0c5eefb
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 0e06e30..0ab9a45 100644
--- a/extension.json
+++ b/extension.json
@@ -43,6 +43,7 @@
"ul.gallery",
".mw-editsection",
"sup.reference",
+   "ol.references",
".error",
".nomobile",
".noprint",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff299bd7eb430f27c682206bf7abc00ac0c5eefb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Putnik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [FundraisingEmailUnsubscribe] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FundraisingEmailUnsubscribe] Add npm test and composer-test
..

[FundraisingEmailUnsubscribe] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires Ie9a7163c3bd92b5e75c723fb0d56d5fbb178af56

Change-Id: I7b69c96f58c551214c04cfa521866325f87c5423
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/39/280139/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..93f41ad 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4563,9 +4563,11 @@
 
   - name: mediawiki/extensions/FundraisingEmailUnsubscribe
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/Genderize
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b69c96f58c551214c04cfa521866325f87c5423
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] Add npm entry point - change (mediawiki...FundraisingEmailUnsubscribe)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Ie9a7163c3bd92b5e75c723fb0d56d5fbb178af56
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 32 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraisingEmailUnsubscribe
 refs/changes/38/280138/1

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9a7163c3bd92b5e75c723fb0d56d5fbb178af56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FundraisingEmailUnsubscribe
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] [Foxway] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [Foxway] Add npm test and composer-test
..

[Foxway] Add npm test and composer-test

Also move jsonlint and jshint to check: for non-whitelisted users.

Requires I9a68b91164bca8c0ec2001d61f9a04cef0d98238

Change-Id: I48565f887c9975615c0a26fe83b406579ae1a84b
---
M zuul/layout.yaml
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/37/280137/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..93e3144 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4557,9 +4557,12 @@
 
   - name: mediawiki/extensions/Foxway
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/FundraisingEmailUnsubscribe
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48565f887c9975615c0a26fe83b406579ae1a84b
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] Add npm entry point - change (mediawiki...Foxway)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I9a68b91164bca8c0ec2001d61f9a04cef0d98238
---
M .gitignore
A .jshintignore
A .jshintrc
A Gruntfile.js
A package.json
M resources/ext.foxway.debug.js
M resources/ext.foxway.debugloops.js
7 files changed, 79 insertions(+), 13 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}
diff --git a/resources/ext.foxway.debug.js b/resources/ext.foxway.debug.js
index 23f9ceb..5f32a1c 100644
--- a/resources/ext.foxway.debug.js
+++ b/resources/ext.foxway.debug.js
@@ -1,10 +1,10 @@
-(function ($) {
+( function ( $ ) {
 
-   $('.foxway_runtime').tipsy({
+   $( '.foxway_runtime' ).tipsy( {
html: true,
title: function () {
-   return jQuery.parseJSON(this.getAttribute('data'));
+   return jQuery.parseJSON( this.getAttribute( 'data' ) );
}
-   });
+   } );
 
-})(window.jQuery);
+}( jQuery ) );
diff --git a/resources/ext.foxway.debugloops.js 
b/resources/ext.foxway.debugloops.js
index cd1ea97..dbcd9fe 100644
--- a/resources/ext.foxway.debugloops.js
+++ b/resources/ext.foxway.debugloops.js
@@ -1,10 +1,10 @@
-(function ($) {
+( function ( $ ) {
 
$().ready(function () {
-$('.foxway_debug_loopbody').hide();
-$('.foxway_debug_loophead').click(function () {
-   $(this).next().toggle();
-});
-});
+$( '.foxway_debug_loopbody' ).hide();
+$( '.foxway_debug_loophead' ).click( function () {
+   $( this ).next().toggle();
+} );
+} );
 
-})(window.jQuery);
+}( jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a68b91164bca8c0ec2001d61f9a04cef0d98238
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Foxway
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] Add new env.normalizeAndResolvePageTitle helper and use it - change (mediawiki...parsoid)

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

Change subject: Add new env.normalizeAndResolvePageTitle helper and use it
..


Add new env.normalizeAndResolvePageTitle helper and use it

Change-Id: I28478eee403500504e0a21d8cab830ad9dce9afc
---
M bin/parse.js
M bin/roundtrip-test.js
M lib/api/apiUtils.js
M lib/api/routes.js
M lib/config/MWParserEnvironment.js
M lib/utils/DOMUtils.js
M tools/fetch-wt.js
7 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/bin/parse.js b/bin/parse.js
index 24213ac..6aee795 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -274,7 +274,7 @@
} else if (argv.html2wt || argv.html2html) {
env.log("fatal", "Pages start at wikitext.");
}
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest
.setPageSrcInfo(env, target, argv.oldid)
.then(function() { return env.page.src; });
diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index d754f38..2e34790 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -582,7 +582,7 @@
}).then(function(_env) {
env = _env;
env.profile = { time: { total: 0, start: Date.now() }, size: {} 
};
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest.setPageSrcInfo(env, target, null);
}).then(function() {
data.oldWt = env.page.src;
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 23e4850..df62116 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -357,7 +357,7 @@
 
var prefix = res.locals.iwp;
var oldid = res.locals.oldid;
-   var target = env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var p = Promise.resolve(wt);
 
diff --git a/lib/api/routes.js b/lib/api/routes.js
index a415adc..b4ddfbd 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -247,7 +247,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
@@ -277,7 +277,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
@@ -309,7 +309,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 5665436..338d444 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -471,6 +471,10 @@
return name;
 };
 
+MWParserEnvironment.prototype.normalizeAndResolvePageTitle = function() {
+   return this.resolveTitle(this.normalizeTitle(this.page.name), '');
+};
+
 MWParserEnvironment.prototype.isValidLinkTarget = function(href) {
var hrefToken = Util.tokensToString(href);
var subpageEnabled = false;
diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index e295a52..553e7f9 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -2613,7 +2613,7 @@
var steps = [];
if (needsWt) {
steps.push(function() {
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest.setPageSrcInfo(
env, target, env.page.id
).catch(function(err) {
diff --git a/tools/fetch-wt.js b/tools/fetch-wt.js
index c96bfe2..98c8225 100755
--- a/tools/fetch-wt.js
+++ b/tools/fetch-wt.js
@@ -60,7 +60,7 @@
}).then(function(_env) {
env = _env;
target = page ?
-   env.resolveTitle(env.normalizeTitle(env.page.name), '') 
: null;
+   env.normalizeAndResolvePageTitle() : null;
return TemplateRequest.setPageSrcInfo(env, target, revid);

[MediaWiki-commits] [Gerrit] [FormelApplet] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FormelApplet] Add npm test and composer-test
..

[FormelApplet] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires Iad999547d3c6d069d289938a4bd60726484b8705

Change-Id: I2b4d96852034a5a3f8401ba82ed8f1a539302df2
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/35/280135/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..0a6a4c8 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4551,9 +4551,11 @@
 
   - name: mediawiki/extensions/FormelApplet
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/Foxway
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b4d96852034a5a3f8401ba82ed8f1a539302df2
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] ApiUpload: Add debug logging for T130563 - change (mediawiki/core)

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

Change subject: ApiUpload: Add debug logging for T130563
..


ApiUpload: Add debug logging for T130563

We're getting 'missingparam' errors in UploadWizard and I don't know
what is causing them. Perhaps this will help.

(It's a lot easier to add debugging here, since there are several code
paths in UploadWizard leading to action=upload queries, and this debug
channel is already set up after 0fb104497c79b58d48a9414096f4acd654df550c.)

Bug: T130563
Change-Id: I9fa155045ea99e59fda2ef2e138d12892906e3e3
---
M includes/api/ApiUpload.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 326f8ba..344f60d 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -381,6 +381,10 @@
 
// chunk or one and only one of the following parameters is 
needed
if ( !$this->mParams['chunk'] ) {
+   if ( !$this->mParams['filekey'] && 
!$this->mParams['file'] && !$this->mParams['url'] ) {
+   wfDebugLog( 'upload', 'missingparam: ' . 
print_r( $this->mParams, true ) );
+   }
+
$this->requireOnlyOneParameter( $this->mParams,
'filekey', 'file', 'url' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9fa155045ea99e59fda2ef2e138d12892906e3e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FormelApplet)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Iad999547d3c6d069d289938a4bd60726484b8705
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 32 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad999547d3c6d069d289938a4bd60726484b8705
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FormelApplet
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] [FormatNum] Add npm entry pont and composer-test - change (integration/config)

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

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

Change subject: [FormatNum] Add npm entry pont and composer-test
..

[FormatNum] Add npm entry pont and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires I61916cd08519eebac5e9a3b6deb52df9fe7ed068

Change-Id: I71883487566d205a1607a906aa05da99ed0d2dab
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/33/280133/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..b79b3fb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4545,9 +4545,11 @@
 
   - name: mediawiki/extensions/FormatNum
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FormelApplet
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71883487566d205a1607a906aa05da99ed0d2dab
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] Add npm entry point - change (mediawiki...FormatNum)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I61916cd08519eebac5e9a3b6deb52df9fe7ed068
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 32 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61916cd08519eebac5e9a3b6deb52df9fe7ed068
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FormatNum
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] Enable Echo footer notice on all English language wikis - change (operations/mediawiki-config)

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

Change subject: Enable Echo footer notice on all English language wikis
..


Enable Echo footer notice on all English language wikis

Bug: T128937
Change-Id: I6260d514cc7f4c89b4ec1a750a770e84ec2d1bf8
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 42e9954..2ad0837 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15347,6 +15347,13 @@
 'wmgEchoShowFooterNotice' => array(
'default' => false,
'enwiki' => true,
+   'enwikibooks' => true,
+   'enwikinews' => true,
+   'enwikiquote' => true,
+   'enwikisource' => true,
+   'enwikiversity' => true,
+   'enwikivoyage' => true,
+   'enwiktionary' => true,
'testwiki' => true,
 ),
 'wmgEchoFooterNoticeURL' => array(

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki: make mw2090 normal appserver again - change (operations/puppet)

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

Change subject: mediawiki: make mw2090 normal appserver again
..


mediawiki: make mw2090 normal appserver again

mw2090 was the temporary equivalent of terbium in codfw.

Now it has been replaced by wasat.

Also include the ldap client class on wasat, so that it's actually
equal to terbium, but ONLY until we move that into a proper role
and figure out where it belongs, since it's actually not mediawiki
related.

Bug:T129930
Change-Id: I088d5167a1259cb606268773866a90e843df0fad
---
M manifests/site.pp
1 file changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 503ff08..cd88e36 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2073,14 +2073,8 @@
 role mediawiki::imagescaler
 }
 
-#mw2090 was terbium's equivalent, replaced by wasat
-node 'mw2090.codfw.wmnet' {
-role spare
-
-}
-
-#mw2091-mw2119 are appservers
-node /^mw2(09[1-9]|1[0-1][0-9])\.codfw\.wmnet$/ {
+#mw2090-mw2119 are appservers
+node /^mw2(09[0-9]|1[0-1][0-9])\.codfw\.wmnet$/ {
 role mediawiki::appserver
 include base::firewall
 }
@@ -2602,6 +2596,8 @@
 # mediawiki maintenance server (like terbium)
 node 'wasat.codfw.wmnet' {
 role mariadb::maintenance, mediawiki::maintenance
+
+include ldap::role::client::labs
 }
 
 # Wikidata query service

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

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

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


[MediaWiki-commits] [Gerrit] [FormatDates] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FormatDates] Add npm test and composer-test
..

[FormatDates] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires Ie8dabbb400921b8dfbf65206dad4455ad1826970

Change-Id: Ifd7be3000630ec1ab74a5808632a5e9cf00d78af
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/31/280131/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..faf886f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4539,9 +4539,11 @@
 
   - name: mediawiki/extensions/FormatDates
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FormatNum
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd7be3000630ec1ab74a5808632a5e9cf00d78af
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] mediawiki: make mw2090 normal appserver again - change (operations/puppet)

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

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

Change subject: mediawiki: make mw2090 normal appserver again
..

mediawiki: make mw2090 normal appserver again

mw2090 was the temporary equivalent of terbium in codfw.

Now it has been replaced by wasat.

Also include the ldap client class on wasat, so that it's actually
equal to terbium, but ONLY until we move that into a proper role
and figure out where it belongs, since it's actually not mediawiki
related.

Bug:T129930
Change-Id: I088d5167a1259cb606268773866a90e843df0fad
---
M manifests/site.pp
1 file changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/280130/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 503ff08..cd88e36 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2073,14 +2073,8 @@
 role mediawiki::imagescaler
 }
 
-#mw2090 was terbium's equivalent, replaced by wasat
-node 'mw2090.codfw.wmnet' {
-role spare
-
-}
-
-#mw2091-mw2119 are appservers
-node /^mw2(09[1-9]|1[0-1][0-9])\.codfw\.wmnet$/ {
+#mw2090-mw2119 are appservers
+node /^mw2(09[0-9]|1[0-1][0-9])\.codfw\.wmnet$/ {
 role mediawiki::appserver
 include base::firewall
 }
@@ -2602,6 +2596,8 @@
 # mediawiki maintenance server (like terbium)
 node 'wasat.codfw.wmnet' {
 role mariadb::maintenance, mediawiki::maintenance
+
+include ldap::role::client::labs
 }
 
 # Wikidata query service

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

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

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


[MediaWiki-commits] [Gerrit] Add translatable description and add npm entry point - change (mediawiki...FormatDates)

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

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

Change subject: Add translatable description and add npm entry point
..

Add translatable description and add npm entry point

Change-Id: Ie8dabbb400921b8dfbf65206dad4455ad1826970
---
M .gitignore
M FormatDates.php
A Gruntfile.js
A i18n/en.json
A i18n/qqq.json
A package.json
6 files changed, 50 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FormatDates 
refs/changes/29/280129/1

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/FormatDates.php b/FormatDates.php
index 20630f6..9e2c050 100644
--- a/FormatDates.php
+++ b/FormatDates.php
@@ -15,10 +15,6 @@
exit( 1 );
 }
 
-$wgAutoloadClasses['DateParser'] = dirname( __FILE__ ) . '/DateParser.php';
-$wgAutoloadClasses['FormattableDate'] = dirname( __FILE__ ) . 
'/FormattableDate.php';
-$wgHooks['ParserFirstCallInit'][] = 'efFormatDatesSetHook';
-
 $wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'Date Formatter',
@@ -26,6 +22,12 @@
'description' => 'Supports refactoring of unlinked dates through the 
 tag',
 );
 
+$wgMessagesDirs['DateFormatter'] = __DIR__ . '/i18n';
+
+$wgAutoloadClasses['DateParser'] = __DIR__ . '/DateParser.php';
+$wgAutoloadClasses['FormattableDate'] = __DIR__ . '/FormattableDate.php';
+$wgHooks['ParserFirstCallInit'][] = 'efFormatDatesSetHook';
+
 function efFormatDatesSetHook( $parser ) {
$parser->setHook( 'date', 'efFormatDate' );
return true;
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 000..59a0f59
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,6 @@
+{
+   "@metadata": {
+   "authors": []
+   },
+   "dateformatter-desc": "Supports refactoring of unlinked dates through 
the  tag"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..1085442
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,6 @@
+{
+   "@metadata": {
+   "authors": []
+   },
+   "dateformatter-desc": 
"{{desc|what=extension|name=DateFormatter|url=https://www.mediawiki.org/wiki/Extension:DateFormatter}};,
+}
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8dabbb400921b8dfbf65206dad4455ad1826970
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FormatDates
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] Change parameters for user survey footer message - change (mediawiki...Echo)

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

Change subject: Change parameters for user survey footer message
..


Change parameters for user survey footer message

Bug: T128937
Change-Id: Idd299293fad8264298174bc372318445cf26c4d3
(cherry picked from commit e0ffd26c23ff5bd5d45c4bcc69d4a6c6e0ac5057)
---
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
index a903fa6..7aa328d 100644
--- a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
@@ -109,7 +109,8 @@
if (
mw.config.get( 'wgEchoShowFooterNotice' ) &&
!mw.user.options.get( 'echo-dismiss-feedback-alert' ) &&
-   initialNotifCount >= 5
+   initialNotifCount >= 2 &&
+   mw.config.get( 'wgUserEditCount', 0 ) >= 100
) {
notice = new mw.echo.ui.FooterNoticeWidget( {
// This is probably not the right way of doing 
this

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd299293fad8264298174bc372318445cf26c4d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: MaxSem 
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] Roll out RESTBase usage to Android production app: 25% - change (mediawiki...MobileApp)

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

Change subject: Roll out RESTBase usage to Android production app: 25%
..


Roll out RESTBase usage to Android production app: 25%

Bug: T126934
Change-Id: I166c3776f2626bd5ae66bebc61547debcf414b10
(cherry picked from commit c6bc4b82ed04b75e95790ed31566d67345975346)
---
M config/config.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/config/config.json b/config/config.json
index 57651bd..dde64ec 100644
--- a/config/config.json
+++ b/config/config.json
@@ -5,5 +5,5 @@
 "searchLogSampleRate": 100,
 "tocLogSampleRate": 100,
 "restbaseBetaPercent": 100,
-"restbaseProdPercent": 2
+"restbaseProdPercent": 25
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I166c3776f2626bd5ae66bebc61547debcf414b10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: BearND 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [ForcePreview] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [ForcePreview] Add npm test and composer-test
..

[ForcePreview] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires I9253421341ef7d4ad52bbd7a7c7a05ab22109381

Change-Id: I291714c81a71393b9a3f42dfe442b7af6e670561
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/28/280128/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..fa1a1e6 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4533,9 +4533,11 @@
 
   - name: mediawiki/extensions/ForcePreview
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FormatDates
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I291714c81a71393b9a3f42dfe442b7af6e670561
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] admin: remove svn-group perms from ldap-admins - change (operations/puppet)

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

Change subject: admin: remove svn-group perms from ldap-admins
..


admin: remove svn-group perms from ldap-admins

This permission to run svn-group is from way back in the day
and not in use anymore. On terbium:

'svn-group' (No such file or directory)

Change-Id: Id2d5c94f3277b75cf857a2a44b865ebfac291d77
---
M modules/admin/data/data.yaml
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index ff46875..40bdccb 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -124,7 +124,6 @@
 privileges: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user',
- 'ALL = NOPASSWD: /usr/local/bin/svn-group',
  'ALL = NOPASSWD: /usr/local/sbin/add-labs-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-group']
   contint-users:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2d5c94f3277b75cf857a2a44b865ebfac291d77
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
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] Merge master into deployment - change (mediawiki...DonationInterface)

2016-03-28 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

29899a9c7e57e5aabdafaed98e4225abf4a7f6a1 Update package pointers

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idafe1d555ff65a1a2eb30da18c577d28e11ad694
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...ForcePreview)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I9253421341ef7d4ad52bbd7a7c7a05ab22109381
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 32 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9253421341ef7d4ad52bbd7a7c7a05ab22109381
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ForcePreview
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] admin: remove robla from ldap admins - change (operations/puppet)

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

Change subject: admin: remove robla from ldap admins
..


admin: remove robla from ldap admins

Robla said that this is from a long time ago,
and to not keep him in this group anymore nowadays.

Change-Id: I033c8ce2e97a02a9aeaf23363075414374523c50
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index cd63d7a..ff46875 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -120,7 +120,7 @@
   ldap-admins:
 gid: 715
 description: ldap admins
-members: [robla, reedy, demon]
+members: [reedy, demon]
 privileges: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I033c8ce2e97a02a9aeaf23363075414374523c50
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobLa 
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 package pointers - change (mediawiki...DonationInterface)

2016-03-28 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Update package pointers
..

Update package pointers

Change-Id: If9a3db8f96210f753a2b0283c4486e044af5b1e4
---
M composer.lock
1 file changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 4586e69..845d450 100644
--- a/composer.lock
+++ b/composer.lock
@@ -13,7 +13,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;,
-"reference": "24b31581d85c232a3b0f5038c2894d565c831392"
+"reference": "855d642f85f14c76ca810013b0323ae4ac37f1c6"
 },
 "require": {
 "ext-curl": "*",
@@ -44,7 +44,7 @@
 "payment",
 "payments"
 ],
-"time": "2015-08-24 21:48:53"
+"time": "2016-02-17 00:53:20"
 },
 {
 "name": "clio/clio",
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "4e3e6ebd093e8528fbb73204acfda4d09aa0a494"
+"reference": "c5a5200e3b5df3ec5f02ff27e8e6d9a07ce10b5e"
 },
 "require": {
 "clio/clio": "@stable",
@@ -147,7 +147,7 @@
 "queue",
 "transaction"
 ],
-"time": "2015-08-21 21:11:07"
+"time": "2015-08-25 20:02:50"
 },
 {
 "name": "fusesource/stomp-php",
@@ -313,16 +313,16 @@
 },
 {
 "name": "predis/predis",
-"version": "v1.0.1",
+"version": "v1.0.3",
 "source": {
 "type": "git",
 "url": "https://github.com/nrk/predis.git;,
-"reference": "7a170b3d8123c556597b4fbdb88631f99de180c2"
+"reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/nrk/predis/zipball/7a170b3d8123c556597b4fbdb88631f99de180c2;,
-"reference": "7a170b3d8123c556597b4fbdb88631f99de180c2",
+"url": 
"https://api.github.com/repos/nrk/predis/zipball/84060b9034d756b4d79641667d7f9efe1aeb8e04;,
+"reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04",
 "shasum": ""
 },
 "require": {
@@ -359,7 +359,7 @@
 "predis",
 "redis"
 ],
-"time": "2015-01-02 12:51:34"
+"time": "2015-07-30 18:34:15"
 },
 {
 "name": "psr/log",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9a3db8f96210f753a2b0283c4486e044af5b1e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] admin: remove svn-group perms from ldap-admins - change (operations/puppet)

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

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

Change subject: admin: remove svn-group perms from ldap-admins
..

admin: remove svn-group perms from ldap-admins

This permission to run svn-group is from way back in the day
and not in use anymore. On terbium:

'svn-group' (No such file or directory)

Change-Id: Id2d5c94f3277b75cf857a2a44b865ebfac291d77
---
M modules/admin/data/data.yaml
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index ff46875..40bdccb 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -124,7 +124,6 @@
 privileges: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user',
- 'ALL = NOPASSWD: /usr/local/bin/svn-group',
  'ALL = NOPASSWD: /usr/local/sbin/add-labs-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-group']
   contint-users:

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

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

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


[MediaWiki-commits] [Gerrit] Update packages - change (mediawiki...vendor)

2016-03-28 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Update packages
..

Update packages

Change-Id: I62bf4932ae0f5f640f392e668cc74e7ba1afdab7
---
A amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/BaseClient.php
D amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/Client.php
M amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/HttpCurl.php
A amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/Mocks/MockBaseClient.php
A 
amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/Mocks/MockPaymentsClient.php
A 
amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/Mocks/MockReportsClient.php
A 
amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/Mocks/MockResponseParser.php
A amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/PaymentsClient.php
R 
amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/PaymentsClientInterface.php
A amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/ReportsClient.php
A 
amzn/login-and-pay-with-amazon-sdk-php/PayWithAmazon/ReportsClientInterface.php
M amzn/login-and-pay-with-amazon-sdk-php/README.md
R amzn/login-and-pay-with-amazon-sdk-php/UnitTests/PaymentsClientTest.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
M composer/LICENSE
M composer/autoload_classmap.php
M composer/installed.json
M predis/predis/CHANGELOG.md
M predis/predis/README.md
M predis/predis/VERSION
M predis/predis/bin/create-single-file
M predis/predis/examples/custom_cluster_distributor.php
M predis/predis/examples/executing_redis_commands.php
M predis/predis/examples/lua_scripting_abstraction.php
M predis/predis/examples/monitor_consumer.php
M predis/predis/examples/pubsub_consumer.php
M predis/predis/examples/redis_collections_iterators.php
M predis/predis/examples/replication_complex.php
M predis/predis/examples/session_handler.php
M predis/predis/examples/shared.php
M predis/predis/examples/transaction_using_cas.php
M predis/predis/package.ini
M predis/predis/src/Autoloader.php
M predis/predis/src/Client.php
M predis/predis/src/ClientContextInterface.php
M predis/predis/src/Cluster/ClusterStrategy.php
M predis/predis/src/Cluster/Distributor/EmptyRingException.php
M predis/predis/src/Cluster/Distributor/HashRing.php
M predis/predis/src/Cluster/Distributor/KetamaRing.php
M predis/predis/src/Cluster/Hash/CRC16.php
M predis/predis/src/Cluster/PredisStrategy.php
M predis/predis/src/Cluster/RedisStrategy.php
M predis/predis/src/Collection/Iterator/CursorBasedIterator.php
M predis/predis/src/Collection/Iterator/HashKey.php
M predis/predis/src/Collection/Iterator/Keyspace.php
M predis/predis/src/Collection/Iterator/ListKey.php
M predis/predis/src/Collection/Iterator/SetKey.php
M predis/predis/src/Collection/Iterator/SortedSetKey.php
M predis/predis/src/Command/ConnectionAuth.php
M predis/predis/src/Command/ConnectionEcho.php
M predis/predis/src/Command/ConnectionPing.php
M predis/predis/src/Command/ConnectionQuit.php
M predis/predis/src/Command/ConnectionSelect.php
M predis/predis/src/Command/HashDelete.php
M predis/predis/src/Command/HashExists.php
M predis/predis/src/Command/HashGet.php
M predis/predis/src/Command/HashGetAll.php
M predis/predis/src/Command/HashGetMultiple.php
M predis/predis/src/Command/HashIncrementBy.php
M predis/predis/src/Command/HashIncrementByFloat.php
M predis/predis/src/Command/HashKeys.php
M predis/predis/src/Command/HashLength.php
M predis/predis/src/Command/HashScan.php
M predis/predis/src/Command/HashSet.php
M predis/predis/src/Command/HashSetMultiple.php
M predis/predis/src/Command/HashSetPreserve.php
M predis/predis/src/Command/HashValues.php
M predis/predis/src/Command/HyperLogLogAdd.php
M predis/predis/src/Command/HyperLogLogCount.php
M predis/predis/src/Command/HyperLogLogMerge.php
M predis/predis/src/Command/KeyDelete.php
M predis/predis/src/Command/KeyDump.php
M predis/predis/src/Command/KeyExists.php
M predis/predis/src/Command/KeyExpire.php
M predis/predis/src/Command/KeyExpireAt.php
M predis/predis/src/Command/KeyKeys.php
M predis/predis/src/Command/KeyMove.php
M predis/predis/src/Command/KeyPersist.php
M predis/predis/src/Command/KeyPreciseExpire.php
M predis/predis/src/Command/KeyPreciseExpireAt.php
M predis/predis/src/Command/KeyPreciseTimeToLive.php
M predis/predis/src/Command/KeyRandom.php
M predis/predis/src/Command/KeyRename.php
M predis/predis/src/Command/KeyRenamePreserve.php
M predis/predis/src/Command/KeyRestore.php
M predis/predis/src/Command/KeyScan.php
M predis/predis/src/Command/KeySort.php
M predis/predis/src/Command/KeyTimeToLive.php
M predis/predis/src/Command/KeyType.php
M predis/predis/src/Command/ListIndex.php
M predis/predis/src/Command/ListInsert.php
M predis/predis/src/Command/ListLength.php
M predis/predis/src/Command/ListPopFirst.php
M predis/predis/src/Command/ListPopFirstBlocking.php
M predis/predis/src/Command/ListPopLast.php
M predis/predis/src/Command/ListPopLastBlocking.php
M 

[MediaWiki-commits] [Gerrit] Prominent placement of the tag could - change (wikidata...gui)

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

Change subject: Prominent placement of the tag could
..


Prominent placement of the tag could

Removes the popover and places the tag cloud on top.

Change-Id: Ib88f35d40de056751d94980678629331400eaff6
---
M index.html
M style.css
M wikibase/queryService/ui/QueryExampleDialog.js
3 files changed, 28 insertions(+), 23 deletions(-)

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



diff --git a/index.html b/index.html
index 6b05a74..9f5e446 100644
--- a/index.html
+++ b/index.html
@@ -150,19 +150,12 @@



-   
-   
-   
-   
-   SPARQL Query Examples
-   

-   
- 
-   
-   
-   
+   
 
+   
+ 
+   



diff --git a/style.css b/style.css
index 5409f06..f298e18 100644
--- a/style.css
+++ b/style.css
@@ -208,12 +208,22 @@
Query example dialog
 **/
 
+.QueryExamples .tagCloud {
+   width: 100%;
+   height: 200px;
+}
+
+.QueryExamples .tag {
+   background-color: #337ab7;
+   background-image: none;
+}
+
 .QueryExamples input.tags-input {
visibility: hidden;
 }
 
 .QueryExamples .tagFilter {
-   padding-bottom: 0px!important;
+   padding-bottom: 5px!important;
 }
 
 .QueryExamples  .exampleTable {
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index ced5f3c..5cf96eb 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -61,12 +61,17 @@
 * @private
 **/
SELF.prototype._initFilter = function() {
+   var self = this;
+
this._$element.find( '.tableFilter' ).keyup( $.proxy( 
this._filterTable, this ));
 
//tags
this._$element.find( '.tagFilter' ).tags({
afterAddingTag: $.proxy( this._filterTable, this ),
-   afterDeletingTag: $.proxy( this._filterTable, this )
+   afterDeletingTag: function(){
+   self._filterTable();
+   self._drawTagCloud();
+   }
});
 
};
@@ -94,18 +99,14 @@
SELF.prototype._initTagCloud = function() {
var self = this;
 
-   this._$element.find( '.tagCloudPopover' ).popover({
-   placement: 'bottom',
-   trigger: 'click',
-   container: 'body',
-   content: '',
-   html: true
-   });
+   var interval = window.setInterval(function(){
+   if( self._$element.is( ':visible') ){
+   self._drawTagCloud();
+   clearInterval( interval );
+   }
 
-   this._$element.find( '.tagCloudPopover' ).click(function () {
-   self._drawTagCloud();
+   }, 300 );
 
-});
};
 
/**
@@ -124,6 +125,7 @@
 
$(".tagCloud").empty();
$(".tagCloud").jQCloud(jQCloudTags, {
+   delayedMode: true,
afterCloudRender: function( e ){
$(".tagCloud").find('a').click( function( e ){
e.preventDefault();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib88f35d40de056751d94980678629331400eaff6
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lydia Pintscher 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Support for Elastica 2.3.1 - change (mediawiki...CirrusSearch)

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

Change subject: Support for Elastica 2.3.1
..


Support for Elastica 2.3.1

2.3.x does an odd thing where it unwraps our suggest query, making
it invalid. This wraps the query a second time when using the offending
Elastica version to get arround the problem.

Bug: T127831
Change-Id: I03bd8d8a9ba3d46d3294227191d688d26a51d31c
---
M includes/Searcher.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/includes/Searcher.php b/includes/Searcher.php
index 92a530c..042cf37 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -1091,7 +1091,16 @@
$query->setHighlight( $highlight );
}
if ( $this->suggest ) {
-   $query->setParam( 'suggest', $this->suggest );
+   if ( interface_exists( 'Elastica\\ArrayableInterface' ) 
) {
+   // Elastica 2.3.x.  For some reason it unwraps 
our suggest
+   // query when we don't want it to, so wrap it 
one more time
+   // to make the unwrap do nothing.
+   $query->setParam( 'suggest', array(
+   'suggest' => $this->suggest,
+   ) );
+   } else {
+   $query->setParam( 'suggest', $this->suggest );
+   }
$query->addParam( 'stats', 'suggest' );
}
if( $this->offset ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03bd8d8a9ba3d46d3294227191d688d26a51d31c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [FlvHandler] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FlvHandler] Add npm test and composer-test
..

[FlvHandler] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires I09e3431f3f6837da735bef5582844617eb181734

Change-Id: I422e178a97a2cad7a00e536582f17760ace47604
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/22/280122/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..a6e0e1c 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4527,9 +4527,11 @@
 
   - name: mediawiki/extensions/FlvHandler
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/ForcePreview
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I422e178a97a2cad7a00e536582f17760ace47604
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] Merge master into deployment - change (mediawiki...DonationInterface)

2016-03-28 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

016478026a7f578f7366bf9715212fa166004d86 Fix undefined variable in logging
34201da71f03d1f9c683f7ca9f849afe034915f4 Localisation updates from 
https://translatewiki.net.
3f53295a2e83f5114b0c0fb3c081d6137c612d30 Enable fail page without adapter 
instance
cac78e9c863c91ceaf35a854a91ada927f83578e Localisation updates from 
https://translatewiki.net.
30485f300c9251568357a313964790482c63e57f Stop spinning onunload
2281b6ad086167a35fa5f333769a09943570c259 Catch and log errors in adapter 
constructors
17d47548e6a757754d68e79786d030ae50506544 Tests for new ResultPages functions
2ff3f28f4c3deca11971a3bd2deb325fd40cf062 Finish encapsulating Ingenico staging 
logic
150b9c3ae4f381b0449323fbc83041a7521aedf2 Encapsulate PayPal staging logic
d66acc24a8b963f6289aef2b181e4809971da8d2 Localisation updates from 
https://translatewiki.net.
63eaa785d704edabb6e9f6c210f555e2da2cdb82 Fix AstroPay submethod unstaging
08cc5fd4d619446e6c7a367ace7336dec1254ccd Localisation updates from 
https://translatewiki.net.
a3f324c36e6203a5a6df89485122b45e381f858c Prefer canonical parameter names in 
form chooser
1beaf23a6017a72f2f61db9f33b5d7ace0c0548b Fix language setup for AstroPay test
f49aa992e64684e31bd953411a4d73a6a6dc9a6b Fix fiscal number error messages

Change-Id: Ib4fbe83bc4ba4d7f65ae78c3102e5f1198f67bec
---
D tests/Adapter/Astropay/AstropayTest.php
D tests/Adapter/GatewayAdapterTest.php
D tests/FormChooserTest.php
D tests/includes/TestingGatewayPage.php
D tests/includes/test_page/TestingAmazonGateway.php
D tests/includes/test_page/TestingGlobalCollectGateway.php
D tests/includes/test_page/TestingWorldpayGateway.php
7 files changed, 0 insertions(+), 1,222 deletions(-)


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

diff --git a/tests/Adapter/Astropay/AstropayTest.php 
b/tests/Adapter/Astropay/AstropayTest.php
deleted file mode 100644
index 6be3e21..000
--- a/tests/Adapter/Astropay/AstropayTest.php
+++ /dev/null
@@ -1,585 +0,0 @@
-<<< HEAD   (53f84f Merge master into deployment)
-===
-testAdapterClass = 'TestingAstropayAdapter';
-   }
-
-   function setUp() {
-   parent::setUp();
-   $this->setMwGlobals( array(
-   'wgAstropayGatewayEnabled' => true,
-   ) );
-   }
-
-   /**
-* Ensure we're setting the right url for each transaction
-* @covers AstropayAdapter::getCurlBaseOpts
-*/
-   function testCurlUrl() {
-   $init = $this->getDonorTestData( 'BR' );
-   $gateway = $this->getFreshGatewayObject( $init );
-   $gateway->setCurrentTransaction( 'NewInvoice' );
-
-   $result = $gateway->getCurlBaseOpts();
-
-   $this->assertEquals(
-   
'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice',
-   $result[CURLOPT_URL],
-   'Not setting URL to transaction-specific value.'
-   );
-   }
-
-   /**
-* Test the NewInvoice transaction is making a sane request and signing
-* it correctly
-*/
-   function testNewInvoiceRequest() {
-   $init = $this->getDonorTestData( 'BR' );
-   $session['Donor']['order_id'] = '123456789';
-   $this->setUpRequest( $init, $session );
-   $this->setLanguage( $init['language'] );
-   $gateway = new TestingAstropayAdapter();
-
-   $gateway->do_transaction( 'NewInvoice' );
-   parse_str( $gateway->curled[0], $actual );
-
-   $expected = array(
-   'x_login' => 'createlogin',
-   'x_trans_key' => 'createpass',
-   'x_invoice' => '123456789',
-   'x_amount' => '100.00',
-   'x_currency' => 'BRL',
-   'x_bank' => 'TE',
-   'x_country' => 'BR',
-   'x_description' => wfMessage( 
'donate_interface-donation-description' )->inLanguage( $init['language'] 
)->text(),
-   'x_iduser' => 'nob...@example.org',
-   'x_cpf' => '3456789',
-   'x_name' => 'Nome Apelido',
-   'x_email' => 'nob...@example.org',
-   // 'x_address' => 'Rua Falso 123',
-   // 'x_zip' => '01110-111',
-   // 'x_city' => 'São Paulo',
-   // 'x_state' => 'SP',
-   'control' => 
'AC43664E0C4DF30607A26F271C8998BC4EE26511366E65AFB69B96E89BFD4359',
-   'type' => 'json',
-   );
-   $this->assertEquals( 

[MediaWiki-commits] [Gerrit] admin: remove robla from ldap admins - change (operations/puppet)

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

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

Change subject: admin: remove robla from ldap admins
..

admin: remove robla from ldap admins

Robla said that this is from a long time ago,
and to not keep him in this group anymore nowadays.

Change-Id: I033c8ce2e97a02a9aeaf23363075414374523c50
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/280119/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index cd63d7a..ff46875 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -120,7 +120,7 @@
   ldap-admins:
 gid: 715
 description: ldap admins
-members: [robla, reedy, demon]
+members: [reedy, demon]
 privileges: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user',
  'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user',

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

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

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FlvHandler)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I09e3431f3f6837da735bef5582844617eb181734
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09e3431f3f6837da735bef5582844617eb181734
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlvHandler
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] Hygiene: Embrace templates - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Embrace templates
..


Hygiene: Embrace templates

So much cleaner...
In future we can hope to kill methods such as getHeaderHtml
and include printTrail and closing body and html tags in the template

Change-Id: I667c1487be76e3ec9eaceffa9de7df47a149591a
---
M includes/skins/MinervaTemplate.php
A includes/skins/minerva.mustache
2 files changed, 29 insertions(+), 27 deletions(-)

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



diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 0e1e0f8..44681ff 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -320,35 +320,19 @@
protected function render( $data ) {
$templateParser = new TemplateParser( __DIR__ );
 
+   // prepare template data
+   $templateData = array(
+   'banners' => $data['banners'],
+   'headelement' => $data[ 'headelement' ],
+   'headerhtml' => $this->getHeaderHtml( $data ),
+   'mainmenuhtml' => $this->getMainMenuHtml( $data ),
+   'contenthtml' => $this->getContentWrapperHtml( $data ),
+   'footerhtml' => $this->getFooterHtml( $data ),
+   );
// begin rendering
-   echo $data[ 'headelement' ];
+   echo $templateParser->processTemplate( 'minerva', $templateData 
);
+   $this->printTrail();
?>
-   
-   
-   getMainMenuHtml( $data ); ?>
-   
-   
-   
-   processTemplate( 
'banners', $data );
-   ?>
-   
-   
-   getHeaderHtml( 
$data );
-   ?>
-   
-   
-   getContentWrapperHtml( 
$data );
-   ?>
-   
-   getFooterHtml( $data );
-   ?>
-   
-   
-   printTrail(); ?>



+   
+   {{{mainmenuhtml}}}
+   
+   
+   
+   {{>banners}}
+   
+   
+   {{{headerhtml}}}
+   
+   
+   {{{contenthtml}}}
+   
+   {{{footerhtml}}}
+   
+

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

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

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


[MediaWiki-commits] [Gerrit] Add new env.normalizeAndResolvePageTitle helper and use it - change (mediawiki...parsoid)

2016-03-28 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: Add new env.normalizeAndResolvePageTitle helper and use it
..

Add new env.normalizeAndResolvePageTitle helper and use it

Change-Id: I28478eee403500504e0a21d8cab830ad9dce9afc
---
M bin/parse.js
M bin/roundtrip-test.js
M lib/api/apiUtils.js
M lib/api/routes.js
M lib/config/MWParserEnvironment.js
M lib/utils/DOMUtils.js
M tools/fetch-wt.js
7 files changed, 12 insertions(+), 8 deletions(-)


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

diff --git a/bin/parse.js b/bin/parse.js
index 24213ac..6aee795 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -274,7 +274,7 @@
} else if (argv.html2wt || argv.html2html) {
env.log("fatal", "Pages start at wikitext.");
}
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest
.setPageSrcInfo(env, target, argv.oldid)
.then(function() { return env.page.src; });
diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index d754f38..2e34790 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -582,7 +582,7 @@
}).then(function(_env) {
env = _env;
env.profile = { time: { total: 0, start: Date.now() }, size: {} 
};
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest.setPageSrcInfo(env, target, null);
}).then(function() {
data.oldWt = env.page.src;
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 23e4850..df62116 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -357,7 +357,7 @@
 
var prefix = res.locals.iwp;
var oldid = res.locals.oldid;
-   var target = env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var p = Promise.resolve(wt);
 
diff --git a/lib/api/routes.js b/lib/api/routes.js
index a415adc..b4ddfbd 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -247,7 +247,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
@@ -277,7 +277,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
@@ -309,7 +309,7 @@
env.scrubWikitext = true;
}
 
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
 
var oldid = null;
if (req.query.oldid) {
diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 5665436..338d444 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -471,6 +471,10 @@
return name;
 };
 
+MWParserEnvironment.prototype.normalizeAndResolvePageTitle = function() {
+   return this.resolveTitle(this.normalizeTitle(this.page.name), '');
+};
+
 MWParserEnvironment.prototype.isValidLinkTarget = function(href) {
var hrefToken = Util.tokensToString(href);
var subpageEnabled = false;
diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index e295a52..553e7f9 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -2613,7 +2613,7 @@
var steps = [];
if (needsWt) {
steps.push(function() {
-   var target = 
env.resolveTitle(env.normalizeTitle(env.page.name), '');
+   var target = env.normalizeAndResolvePageTitle();
return TemplateRequest.setPageSrcInfo(
env, target, env.page.id
).catch(function(err) {
diff --git a/tools/fetch-wt.js b/tools/fetch-wt.js
index c96bfe2..98c8225 100755
--- a/tools/fetch-wt.js
+++ b/tools/fetch-wt.js
@@ -60,7 +60,7 @@
}).then(function(_env) {
env = _env;
target = page ?
-   env.resolveTitle(env.normalizeTitle(env.page.name), '') 
: null;
+   env.normalizeAndResolvePageTitle() : null;
return 

[MediaWiki-commits] [Gerrit] [FirstSteps] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FirstSteps] Add npm test and composer-test
..

[FirstSteps] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires I806906cb2dd71d68f322fb45e09c8f6e487be614

Change-Id: Ib48e5562a23e2fd53b7f957efdebee08c89b0b77
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/18/280118/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..f2d6f33 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4521,9 +4521,11 @@
 
   - name: mediawiki/extensions/FirstSteps
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FlvHandler
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib48e5562a23e2fd53b7f957efdebee08c89b0b77
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] Add npm entry point - change (mediawiki...FirstSteps)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I806906cb2dd71d68f322fb45e09c8f6e487be614
---
M .gitignore
D .jshintignore
D .jshintrc
A Gruntfile.js
A package.json
5 files changed, 32 insertions(+), 34 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index c976366..8f93bd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-.svn
 *~
 .*.swp
 *.kate-swp
@@ -9,3 +8,4 @@
 .settings
 *.bak
 tests/pagetranslation/*.fail
+node_modules/**
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 2371094..000
--- a/.jshintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# upstream libs
-resources/js/jquery.autosize.js
-resources/js/jquery.ui.position.js
-resources/jquery.chosen/
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index d7649a3..000
--- a/.jshintrc
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-   "camelcase": true,
-   "curly": true,
-   "eqeqeq": true,
-   "immed": true,
-   "latedef": true,
-   "newcap": true,
-   "noarg": true,
-   "noempty": true,
-   "nonew": true,
-   "quotmark": "single",
-   "trailing": true,
-   "undef": true,
-   "unused": true,
-   "onevar": true,
-   "bitwise": true,
-   "forin": false,
-   "regexp": false,
-   "strict": true,
-   "laxbreak": true,
-   "smarttabs": true,
-   "multistr": true,
-   "browser": true,
-   "predef": [
-   "mediaWiki",
-   "jQuery",
-   "QUnit"
-   ]
-}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I806906cb2dd71d68f322fb45e09c8f6e487be614
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FirstSteps
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] [FilterListUsers] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FilterListUsers] Add npm test and composer-test
..

[FilterListUsers] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires Ied1bc597013388ef198771648f529a8cec317ea8

Change-Id: I2f37b748deda692c0b662dcd9c892c1441df4583
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/14/280114/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..5a8ffcb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4515,9 +4515,11 @@
 
   - name: mediawiki/extensions/FilterListUsers
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FirstSteps
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f37b748deda692c0b662dcd9c892c1441df4583
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] Enable Echo footer notice on all English language wikis - change (operations/mediawiki-config)

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

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

Change subject: Enable Echo footer notice on all English language wikis
..

Enable Echo footer notice on all English language wikis

Bug: T128937
Change-Id: I6260d514cc7f4c89b4ec1a750a770e84ec2d1bf8
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 42e9954..2ad0837 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15347,6 +15347,13 @@
 'wmgEchoShowFooterNotice' => array(
'default' => false,
'enwiki' => true,
+   'enwikibooks' => true,
+   'enwikinews' => true,
+   'enwikiquote' => true,
+   'enwikisource' => true,
+   'enwikiversity' => true,
+   'enwikivoyage' => true,
+   'enwiktionary' => true,
'testwiki' => true,
 ),
 'wmgEchoFooterNoticeURL' => array(

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

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

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


[MediaWiki-commits] [Gerrit] Fix opt out fields for Civi imports - change (wikimedia...crm)

2016-03-28 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review.

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

Change subject: Fix opt out fields for Civi imports
..

Fix opt out fields for Civi imports

Allow Engage and other imports to use case insensitive 'yes' and 'true' values
for do_not_* and is_opt_out fields

Bug: T130768
Change-Id: I6259fa6ad2c1c214131eb8002b4cc65e82317a4c
---
M sites/all/modules/offline2civicrm/ChecksFile.php
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/13/280113/1

diff --git a/sites/all/modules/offline2civicrm/ChecksFile.php 
b/sites/all/modules/offline2civicrm/ChecksFile.php
index c92dbc3..366ae65 100644
--- a/sites/all/modules/offline2civicrm/ChecksFile.php
+++ b/sites/all/modules/offline2civicrm/ChecksFile.php
@@ -260,6 +260,22 @@
 $msg[$field] = wmf_common_date_parse_string( $msg[$field] );
 }
 }
+
+// Allow yes or true as inputs for opt-out fields
+$optOutFields = array(
+'do_not_email',
+'do_not_mail',
+'do_not_phone',
+'do_not_sms',
+'do_not_solicit',
+'is_opt_out',
+);
+foreach( $optOutFields as $field ){
+if ( isset($msg[$field]) && (strtolower($msg[$field]) == 'yes' || 
strtolower($msg[$field]) == 'true' )){
+$msg[$field] = 1;
+}
+}
+
 }
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] Change parameters for user survey footer message - change (mediawiki...Echo)

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

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

Change subject: Change parameters for user survey footer message
..

Change parameters for user survey footer message

Bug: T128937
Change-Id: Idd299293fad8264298174bc372318445cf26c4d3
(cherry picked from commit e0ffd26c23ff5bd5d45c4bcc69d4a6c6e0ac5057)
---
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
index a903fa6..7aa328d 100644
--- a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
@@ -109,7 +109,8 @@
if (
mw.config.get( 'wgEchoShowFooterNotice' ) &&
!mw.user.options.get( 'echo-dismiss-feedback-alert' ) &&
-   initialNotifCount >= 5
+   initialNotifCount >= 2 &&
+   mw.config.get( 'wgUserEditCount', 0 ) >= 100
) {
notice = new mw.echo.ui.FooterNoticeWidget( {
// This is probably not the right way of doing 
this

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd299293fad8264298174bc372318445cf26c4d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] archiveloader full pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: archiveloader full pylint and pep8
..

archiveloader full pylint and pep8

Change-Id: I67526d9b154d2b7a5aa9e38fb8561916aaefb454
---
M tools/archive.org/archiveuploader.py
1 file changed, 764 insertions(+), 649 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/02/280102/1

diff --git a/tools/archive.org/archiveuploader.py 
b/tools/archive.org/archiveuploader.py
index f3d7c72..62e5187 100644
--- a/tools/archive.org/archiveuploader.py
+++ b/tools/archive.org/archiveuploader.py
@@ -7,11 +7,10 @@
 import traceback
 import re
 import hashlib
-import subprocess
 from subprocess import Popen, PIPE
 import ConfigParser
 
-# todo: 
+# todo:
 # progress bar for large file uploads, or other way the user can figure
 #   out how much of the file upload has been done.
 # support multipart uploads for the really huge files
@@ -20,196 +19,411 @@
 #   than log in via icky old web interface and screen scraping
 # md5sum or sha1 of uploaded object??
 
+
+def api_matrix_json_to_dict(json_string):
+"""
+Convert the sitematrix json string to a dict for our use,
+keeping only the information we want: dbname, project name, lang code.
+"""
+matrix_json = json.loads(json_string)
+matrix = {}
+'''
+{ u'localname': u'Aromanian',
+  u'code': u'roa-rup',
+  u'name': u'Arm\xe3neashce',
+  u'site':
+  [
+   {u'url': u'http://roa-rup.wikipedia.org', \
+u'code': u'wiki', u'dbname': u'roa_rupwiki'},
+   {u'url': u'http://roa-rup.wiktionary.org', \
+u'code': u'wiktionary', u'dbname': u'roa_rupwiktionary'}
+  ]
+ }
+'''
+for key in matrix_json['sitematrix'].keys():
+if key == 'count':
+continue
+if key == 'specials':
+for site in range(0, len((matrix_json['sitematrix'][key]))):
+sitename = matrix_json['sitematrix'][key][site]['dbname']
+matrix[sitename] = {}
+matrix[sitename]['project'] = 
matrix_json['sitematrix'][key][site]['code']
+# special hack
+if matrix[sitename]['project'] == 'wiki':
+matrix[sitename]['project'] = 'wikipedia'
+matrix[sitename]['locallangname'] = None
+matrix[sitename]['lang'] = None
+else:
+for site in range(0, 
len((matrix_json['sitematrix'][key]['site']))):
+sitename = 
matrix_json['sitematrix'][key]['site'][site]['dbname']
+matrix[sitename] = {}
+matrix[sitename]['project'] = 
matrix_json['sitematrix'][key]['site'][site]['code']
+# special hack
+if matrix[sitename]['project'] == 'wiki':
+matrix[sitename]['project'] = 'wikipedia'
+matrix[sitename]['locallangname'] = 
matrix_json['sitematrix'][key]['localname']
+matrix[sitename]['lang'] = 
matrix_json['sitematrix'][key]['code']
+return matrix
+
+
+def get_archive_base_s3_url():
+"""Returns location of the base url for archive.org S3 requests"""
+return "http://s3.us.archive.org/;
+
+
+def get_archive_base_url():
+"""Returns location of the base url for regular archive.org requests"""
+return "http://www.archive.org/;
+
+
+def get_location_curl_arg():
+"""Returns the argument that causes curl to follow all redirects"""
+return ["--location"]
+
+
+def get_rest_of_login_curl_args():
+"""Returns some bizarre arguments needed for archive.org login
+partly cause we want to get thecookies without all the html, partly
+cause login failes without this 'test cookie', how is that possible? >_<"""
+return ['-s', '-c', '-', '-b', 'test-cookie=1', '-o', '/dev/null']
+
+
+def get_quiet_curl_arg():
+return ["-s"]
+
+
+def get_no_derive_curl_arg():
+"""This tag tells archive.org not to try to derive a bunch of other
+formats from this file (which it would do for videos, for example).
+We've been requested to add this since our files have no derivative
+formats."""
+return ["--header", "x-archive-queue-derive:0"]
+
+
+def get_head_req_curl_args():
+"""Returns the curl arguments needed to do head request and write
+out just the http return code"""
+args = get_quiet_curl_arg()
+args.extend(["--write-out", "%{http_code}", "-X", "HEAD"])
+return args
+
+
+def get_head_with_output_curl_args():
+"""Returns the curl arguments needed to do head request and write
+out everything"""
+return ["--head"]
+
+
+def get_show_headers_curl_arg():
+"""Returns the curl argument needed to do a normal (post or
+get) request and show the headers along with the output"""
+return ["--include"]
+
+
+def get_item_creation_curl_args():
+"""Returns the curl arguments needed to put an 

[MediaWiki-commits] [Gerrit] toy offline reader: pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: toy offline reader: pylint and pep8
..

toy offline reader: pylint and pep8

Change-Id: Ib0bbf9c3bb1db1a8029a7a7a3e660e82433634b7
---
M toys/bz2multistream/wikiarticles.py
M toys/bz2multistream/writetoc.py
2 files changed, 753 insertions(+), 673 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/09/280109/1

diff --git a/toys/bz2multistream/wikiarticles.py 
b/toys/bz2multistream/wikiarticles.py
index 6ebc5b0..27d1e99 100644
--- a/toys/bz2multistream/wikiarticles.py
+++ b/toys/bz2multistream/wikiarticles.py
@@ -1,209 +1,446 @@
-import getopt, os, sys, re, codecs, bz2, ConfigParser
+import getopt
+import os
+import sys
+import re
+import bz2
+import ConfigParser
+
+
+def get_choice_from_batch(titles, start, batch_size):
+'''
+display titles from start to start + batchsize, with count in front
+ask the caller for a title number or an action
+actions may be Q (quit), N (next batch), B (previous batch), R (redisplay)
+if caller enters nothing, treat that as default (R)
+if caller enters something else, whine and treat that as default (R) too
+arguments:
+titles -- full list of titles
+start  -- display from this point in the list
+batch_size -- how many titles to display
+returns a tuple of (action, title number) where one or the other of these
+may be None
+'''
+
+# yay python, it will silently ignore the fact that you requested
+# more things in the list than exist. (no this is not sarcasm)
+count = start
+for line in titles[start:start+batch_size]:
+print "%s) %s" % (count+1, WATitleMunger.un_normalize_title(line))
+count += 1
+print
+print("Enter number of choice, or Q/N/P/R to "
+  "quit/next page/prev page/redisplay page (default R): "),
+choice = sys.stdin.readline()
+choice = choice.strip()
+if not choice:
+choice = 'R'
+if choice.isdigit():
+num = int(choice)
+if num < 1 or num > len(titles):
+print "Bad number given."
+return "R", None
+return None, num
+else:
+choice = choice.capitalize()
+if choice in ['N', 'P', 'Q', 'R']:
+return choice, None
+else:
+print "Bad choice given."
+return "R", None
+
+
+def process_action(action, start, batch_size, total):
+'''
+given a caller action,
+update title list display pointer to the appropriate position
+arguments:
+action -- Q (quit), N (next batch), P (prev batch), or anything else
+start  -- title list display pointer, a batch of titles from the list
+  will be displayed starting from this number
+batch_size -- how many titles are dispayed in a batch
+total  -- total titles in the list
+returns: updated title list display pointer, or exits at user request
+(action Q)
+note that any action other than Q/N/P will result in the default R 
(redisplay
+current batch of titles) which means no change, return existing value.  
This
+includes the None action.
+'''
+if action == 'N' or action == 'n':
+if start + batch_size < total:
+start += batch_size
+else:
+print "End of list reached."
+elif action == 'P' or action == 'p':
+if start > batch_size:
+start = start - batch_size
+else:
+print "Beginning of list reached."
+elif action == 'Q' or action == 'q':
+print "Exiting at user's request."
+sys.exit(0)
+return start
+
+
+def get_user_title_choice(title_hash):
+'''
+show a numbered list of page titles on stdout and read the
+caller's choice on stdin
+I guess this is a poor person's pager
+arguments:
+titleHash -- hash of page titles and their offsets into the xml file
+returns: the offset into the xml file for the title selected
+'''
+titles = title_hash.keys()
+titles.sort()
+total = len(titles)
+
+choice = None
+start = 0
+batch_size = 30
+print "Multiple titles found, please choose from the following."
+while not choice:
+(action, choice) = get_choice_from_batch(titles, start, batch_size)
+if choice:
+return titles[choice-1]
+else:
+start = process_action(action, start, batch_size, total)
+
+
+def get_text(xml):
+'''
+get the contents of the ... tags if needed,
+returns the contents found or None if none found
+'''
+text = None
+if xml is not None:
+match = re.search("]*>(.*?)", xml, flags=re.DOTALL)
+if match:
+text = match.group(1)
+return text
+
+
+def get_redirect(text, localized_redir_string, verbose):
+'''
+look for and set page title 

[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FilterListUsers)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Ied1bc597013388ef198771648f529a8cec317ea8
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 32 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FilterListUsers 
refs/changes/11/280111/1

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied1bc597013388ef198771648f529a8cec317ea8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FilterListUsers
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] pylint and pep8 for wikiqueries scripts, runphpscriptlet, rs... - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: pylint and pep8 for wikiqueries scripts, runphpscriptlet, 
rsyncmedia
..

pylint and pep8 for wikiqueries scripts, runphpscriptlet, rsyncmedia

Change-Id: Id55b5f9774bdbceffe6e7eb158d4f601623039da
---
M xmldumps-backup/wikiqueries/listmediaperproject.py
M xmldumps-backup/wikiqueries/rsyncmedia.py
M xmldumps-backup/wikiqueries/runphpscriptletonallwikis.py
M xmldumps-backup/wikiqueries/wikiqueries.py
4 files changed, 382 insertions(+), 610 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/10/280110/1

diff --git a/xmldumps-backup/wikiqueries/listmediaperproject.py 
b/xmldumps-backup/wikiqueries/listmediaperproject.py
index 98993c7..c13fa65 100644
--- a/xmldumps-backup/wikiqueries/listmediaperproject.py
+++ b/xmldumps-backup/wikiqueries/listmediaperproject.py
@@ -3,63 +3,64 @@
 import getopt
 import time
 from subprocess import Popen, PIPE
-from wikiqueries import Config
+from dumps.WikiDump import Config
+
+
+def get_file_name_format(phase):
+return "{w}-{d}-" + phase + "-wikiqueries.gz"
 
 
 class MediaPerProject(object):
-def __init__(self, conf, outputDir, remoteRepoName,
- verbose, wqConfigFile, wqPath, overwrite, wiki=None):
+def __init__(self, conf, output_dir, remote_repo_name,
+ verbose, wq_config_file, wq_path, overwrite, wiki=None):
 self.conf = conf
-self.outputDir = outputDir
-self.remoteRepoName = remoteRepoName
+self.output_dir = output_dir
+self.remote_repo_name = remote_repo_name
 self.verbose = verbose
 self.date = time.strftime("%Y%m%d", time.gmtime())
-self.fileNameFormat = "{w}-{d}-wikiqueries.gz"
-self.wqConfigFile = wqConfigFile
-self.wqPath = wqPath
+self.file_name_format = "{w}-{d}-wikiqueries.gz"
+self.wq_config_file = wq_config_file
+self.wq_path = wq_path
 self.overwrite = overwrite
-if not os.path.exists(outputDir):
-os.makedirs(outputDir)
+if not os.path.exists(output_dir):
+os.makedirs(output_dir)
 if wiki is not None:
-self.wikisToDo = [wiki]
+self.wikis_to_do = [wiki]
 else:
-self.wikisToDo = [w for w in self.conf.allWikisList
-  if w not in self.conf.privateWikisList and
-  w not in self.conf.closedWikisList and
-  w not in self.conf.skipWikisList]
+self.wikis_to_do = [w for w in self.conf.db_list
+if w not in self.conf.private_list and
+w not in self.conf.closed_list and
+w not in self.conf.skip_db_list]
 
-def getFileNameFormat(self, phase):
-return "{w}-{d}-" + phase + "-wikiqueries.gz"
-
-def writeLocalMedia(self):
+def write_local_media(self):
 if self.verbose:
 print "Starting round one wikiqueries for image table"
-if len(self.wikisToDo) == 1:
-wiki = self.wikisToDo[0]
+if len(self.wikis_to_do) == 1:
+wiki = self.wikis_to_do[0]
 else:
 wiki = None
-self.doWikiQueries('select img_name, img_timestamp from image',
-   self.getFileNameFormat("local"), wiki)
+self.do_wiki_queries('select img_name, img_timestamp from image',
+ get_file_name_format("local"), wiki)
 if self.verbose:
 print "Done round one!!"
 
-def doWikiQueries(self, query, fileNameFormat, wiki=None):
-if not os.path.exists(wqConfigFile):
-print "config file  %s does not exist" % wqConfigFile
+def do_wiki_queries(self, query, file_name_format, wiki=None):
+if not os.path.exists(self.wq_config_file):
+print "config file  %s does not exist" % self.wq_config_file
 sys.exit(1)
-command = ["python", self.wqPath, "--configfile", wqConfigFile,
-   "--query", query, "--outdir", self.outputDir,
-   "--filenameformat", fileNameFormat]
+command = ["python", self.wq_path, "--configfile", self.wq_config_file,
+   "--query", query, "--outdir", self.output_dir,
+   "--filenameformat", file_name_format]
 if self.verbose:
 command.append("--verbose")
 if not self.overwrite:
 command.append("--nooverwrite")
 if wiki:
 command.append(wiki)
-commandString = " ".join(["'" + c + "'" for c in command])
+command_string = " ".join(["'" + c + "'" for c in command])
 
 if self.verbose:
-print "About to run wikiqueries:", commandString
+print "About to run 

[MediaWiki-commits] [Gerrit] hackdeploy pylint cleanup: invalid names, indentation, docst... - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: hackdeploy pylint cleanup: invalid names, indentation, 
docstrings mostly
..

hackdeploy pylint cleanup: invalid names, indentation, docstrings mostly

Change-Id: I408e068831e263779d808e14c622144dfbf5a424
---
M deployment/hack-deploy.py
1 file changed, 280 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/00/280100/1

diff --git a/deployment/hack-deploy.py b/deployment/hack-deploy.py
index 476b5ff..9553175 100755
--- a/deployment/hack-deploy.py
+++ b/deployment/hack-deploy.py
@@ -12,23 +12,80 @@
 # todo: test salt cmd_expandminions
 
 
+def condition_kwarg(arg, kwarg):
+'''
+Return a single arg structure for caller to use
+'''
+if isinstance(kwarg, dict):
+kw_ = []
+for key, val in kwarg.items():
+kw_.append('{0}={1}'.format(key, val))
+return list(arg) + kw_
+return arg
+
+
+def get_file_md5s(dirname, files, callback=None):
+'''
+given list of filenames in a directory,
+return a list of [md5, base filename]
+'''
+output = []
+for fname in files:
+md5out = None
+try:
+md5out = hashlib.md5(open(os.path.join(
+dirname, fname)).read()).hexdigest().strip()
+except:
+md5out = None
+if not md5out:
+sys.stderr.write("failed to get md5 of %s\n" % fname)
+return None
+if callback is not None:
+output.append([md5out, callback(fname)])
+else:
+output.append([md5out, fname])
+return output
+
+
+def get_md5s_ok_count(text):
+'''
+given output from md5sum -c -w on a list of files,
+return the number of files for which the result is 'OK'
+'''
+return len([line for line in text.split('\n')
+if line.endswith(': OK')])
+
+
+def check_date(date):
+'''
+check format of user specified date (mname-dd-) and return it
+or return today's date in that format if no user date is specified
+'''
+if date is None:
+print "No date specified, using today's date"
+date = time.strftime("%b-%d-%Y", time.gmtime(time.time()))
+return date[0].lower() + date[1:]
+else:
+# check the user's date for sanity
+date_regexp = ('^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)'
+   '-[0-9][0-9]-20[0-9][0-9]$')
+if not re.match(date, date_regexp):
+usage(None, "Bad format for datestring; expecting mon-dd-,"
+  " example: mar-12-2012")
+return date
+
+
+def get_tmp_filename(filename):
+'''use standard format for name of all temp files'''
+return filename + "_tmp"
+
+
 class LocalClientPlus(salt.client.LocalClient):
 '''
 extend the salt LocalClient module with methods for showing
 list of known minions that match the specified expression,
 and for copying file content to a newly created remote file
 '''
-
-def condition_kwarg(self, arg, kwarg):
-'''
-Return a single arg structure for caller to use
-'''
-if isinstance(kwarg, dict):
-kw_ = []
-for key, val in kwarg.items():
-kw_.append('{0}={1}'.format(key, val))
-return list(arg) + kw_
-return arg
 
 def cmd_expandminions(self, tgt, fun, arg=(), timeout=None,
   expr_form='glob', ret='',
@@ -43,7 +100,7 @@
   salt "$deployhosts" -v --out raw test.ping |
   grep '{' | mawk -F"'" '{ print $2 }'
 '''
-arg = self.condition_kwarg(arg, kwarg)
+arg = condition_kwarg(arg, kwarg)
 pub_data = self.run_job(tgt, fun, arg, expr_form, ret,
 timeout, **kwargs)
 
@@ -77,69 +134,53 @@
 expr_form='glob')
 
 
-class Dirdate(object):
-'''
-handle date strings in directory names, used for
-prep/staging area primarily
-'''
-def __init__(self, date=None):
-self.date = self.check_date(date)
-
-def check_date(self, date):
-if date is None:
-print "No date specified, using today's date"
-date = time.strftime("%b-%d-%Y", time.gmtime(time.time()))
-return date[0].lower() + date[1:]
-else:
-# check the user's date for sanity
-date_regexp = ('^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)'
-   '-[0-9][0-9]-20[0-9][0-9]$')
-if not re.match(date, date_regexp):
-usage(None, "Bad format for datestring; expecting mon-dd-,"
-  " example: mar-12-2012")
-return date
-
-
 class Conf(object):
 '''
 manage configuration dict from python file
 '''
-def __init__(self, 

[MediaWiki-commits] [Gerrit] thumbFilesSizesCounts: full pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: thumbFilesSizesCounts: full pylint and pep8
..

thumbFilesSizesCounts: full pylint and pep8

Change-Id: I390a5d0ece37f842d93b49536086b50f39e0d161
---
M tools/thumbs/crunchinglogs/datascripts/thumbFilesSizesCounts.py
1 file changed, 43 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/05/280105/1

diff --git a/tools/thumbs/crunchinglogs/datascripts/thumbFilesSizesCounts.py 
b/tools/thumbs/crunchinglogs/datascripts/thumbFilesSizesCounts.py
index bbba0ce..373f70b 100644
--- a/tools/thumbs/crunchinglogs/datascripts/thumbFilesSizesCounts.py
+++ b/tools/thumbs/crunchinglogs/datascripts/thumbFilesSizesCounts.py
@@ -6,25 +6,36 @@
 import time
 import getopt
 
-def usage(message=None):
-print "Usage: %s [--sdate=date --edate=date [filename]" % sys.argv[0]
-print "sdate: start date for which to print stats, default: earliest 
date in file "
-print "edate: end date for which to print stats, default: latest date 
in file"
-print "Date format: -mm-dd"
-print "If filename is not specified, reads from stdin"
-   print ""
-   print "Format of input file: (sample line)"
-   print "2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg"
-   print "date in -mm-dd format, time in hh:mm::ss format, size in 
bytes, thumb directory/thumb filename"
-sys.exit(1)
 
-if __name__ == "__main__":
+def usage(message=None):
+if message is not None:
+sys.stderr.write(message + "\n")
+usage_message = """
+Usage: thumbFilesSizesCount [--sdate=date --edate=date [filename]
+
+  --sdate: start date for which to print stats, default: earliest date in file
+  --edate: end date for which to print stats, default: latest date in file
+
+Date format: -mm-dd
+
+If filename is not specified, reads from stdin
+
+Format of input file: (sample line)
+
+2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg
+date in -mm-dd format, time in hh:mm::ss format, size in bytes, thumb 
directory/thumb filename
+"""
+sys.stderr.write(usage_message)
+sys.exit(1)
+
+
+def do_main():
 sdate = None
 edate = None
 
 try:
 (options, remainder) = getopt.gnu_getopt(sys.argv[1:], "",
- [ 'sdate=', 'edate=', ])
+ ['sdate=', 'edate='])
 except:
 usage("Unknown option specified")
 
@@ -35,39 +46,40 @@
 edate = val
 
 dateexp = re.compile(r"^\d{4}-\d{2}-\d{2}$")
-for d in filter(None, [ sdate, edate ]):
-if not dateexp.match(d):
+for date in filter(None, [sdate, edate]):
+if not dateexp.match(date):
 usage("Bad date format.")
 
 if len(remainder) == 1:
-inputFile = remainder[0]
-fHandle = open(inputFile,"r")
+input_file = remainder[0]
+f_handle = open(input_file, "r")
 elif len(remainder) == 0:
-fHandle = sys.stdin
+f_handle = sys.stdin
 else:
 usage("Too many arguments.")
 
 sizes = {}
 counts = {}
-totalSize = 0
-totalNum = 0
-for line in fHandle:
+for line in f_handle:
 try:
-( fDate, fTime, fSize, fName ) = line.rstrip().split()
+(f_date, ftime_unused, f_size, fname_unused) = 
line.rstrip().split()
 except:
 print >> sys.stderr, "skipping badly formatted line: ", 
line.rstrip()
 continue
-if (sdate and (fDate >= sdate)) or not sdate:
-if (edate and (fDate <= edate)) or not edate:
-if not fDate in sizes:
-sizes[fDate] = 0
-counts[fDate] = 0
-sizes[fDate] = sizes[fDate] + int(fSize)
-counts[fDate] = counts[fDate] + 1
+if (sdate and (f_date >= sdate)) or not sdate:
+if (edate and (f_date <= edate)) or not edate:
+if f_date not in sizes:
+sizes[f_date] = 0
+counts[f_date] = 0
+sizes[f_date] = sizes[f_date] + int(f_size)
+counts[f_date] = counts[f_date] + 1
 
 dates = sizes.keys()
 dates.sort()
-for d in dates:
-print "Date:", d, "Bytes:", sizes[d], "Files:", counts[d]
+for date in dates:
+print "Date:", date, "Bytes:", sizes[date], "Files:", counts[date]
 sys.exit(0)
 
+
+if __name__ == "__main__":
+do_main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I390a5d0ece37f842d93b49536086b50f39e0d161
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] thumbDateAnalysis full pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: thumbDateAnalysis full pylint and pep8
..

thumbDateAnalysis full pylint and pep8

Change-Id: I81310c994c52f841eb3d93491a6b129efad07564
---
M tools/thumbs/crunchinglogs/datascripts/thumbDateAnalysis.py
1 file changed, 73 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/04/280104/1

diff --git a/tools/thumbs/crunchinglogs/datascripts/thumbDateAnalysis.py 
b/tools/thumbs/crunchinglogs/datascripts/thumbDateAnalysis.py
index 5576798..cbadfd3 100644
--- a/tools/thumbs/crunchinglogs/datascripts/thumbDateAnalysis.py
+++ b/tools/thumbs/crunchinglogs/datascripts/thumbDateAnalysis.py
@@ -1,34 +1,41 @@
 # -*- coding: utf-8  -*-
 
-import os
 import re
 import sys
-import time
 import getopt
 
+
 def usage(message=None):
-print "Usage: %s [--sdate=date --edate=date --created [filename]" % 
sys.argv[0]
-print "sdate: start date for which to print stats, default: earliest date 
in file "
-print "edate: end date for which to print stats, default: latest date in 
file"
-print "created: show only the number of files and sizes on the date the 
first thumb"
-print "was created (presumably the date the image itself was first 
uploaded)"
-print ""
-print "Date format for sdate and edate: -mm-dd"
-print ""
-print "If no filename is specified, input is read from stdin"
-print
-print "Format of input file: (sample line)"
-print "2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg"
-print "date in -mm-dd format, time in hh:mm::ss format, size in bytes, 
thumb directory/thumb filename"
+if message is not None:
+sys.stderr.write(message + "\n")
+usage_message = """
+Usage: thumbDateAnalysis.py [--sdate=date --edate=date --created [filename]
+
+  --sdate:   start date for which to print stats, default: earliest date in 
file
+  --edate:   end date for which to print stats, default: latest date in file
+  --created: show only the number of files and sizes on the date the first 
thumb
+ was created (presumably the date the image itself was first 
uploaded)
+
+Date format for sdate and edate: -mm-dd
+
+If no filename is specified, input is read from stdin.
+
+Format of input file: (sample line)
+
+2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg
+date in -mm-dd format, time in hh:mm::ss format, size in bytes, thumb 
directory/thumb filename
+"""
+sys.stderr.write(usage_message)
 sys.exit(1)
 
-if __name__ == "__main__":
+
+def do_main():
 sdate = None
 edate = None
 created = False
 try:
-(options, remainder) = getopt.gnu_getopt(sys.argv[1:], "",
- [ 'sdate=', 'edate=', 
'created' ])
+(options, remainder) = getopt.gnu_getopt(
+sys.argv[1:], "", ['sdate=', 'edate=', 'created'])
 except:
 usage("Unknown option specified")
 
@@ -41,71 +48,73 @@
 created = True
 
 dateexp = re.compile(r"^\d{4}-\d{2}-\d{2}$")
-for d in filter(None, [ sdate, edate ]):
-if not dateexp.match(d):
+for date in filter(None, [sdate, edate]):
+if not dateexp.match(date):
 usage("Bad date format.")
 
 if len(remainder) == 1:
-inputFile = remainder[0]
-fHandle = open(inputFile,"r")
+input_file = remainder[0]
+f_handle = open(input_file, "r")
 elif len(remainder) == 0:
-fHandle = sys.stdin
+f_handle = sys.stdin
 else:
 usage("Too many arguments.")
 
-lastDirName = None
-numFilesSameDate = 0
-byteCountSameDate = 0
-fileCounts = {}
-byteCounts = {}
-for line in fHandle:
+last_dir_name = None
+file_counts = {}
+byte_counts = {}
+for line in f_handle:
 try:
-( fDate, fTime, fSize, path ) = line.rstrip().split()
+(f_date, ftime_unused, f_size, path) = line.rstrip().split()
 except:
 print >> sys.stderr, "skipping badly formatted line: ", 
line.rstrip()
 continue
-( dirName, fName ) = path.split('/',2)
-if not lastDirName:
-lastDirName = dirName
-if dirName != lastDirName:
-# should just print the number of files for every date sorted by 
date order, plus the dir name of course"
-if (sdate and (fDate >= sdate)) or not sdate:
-if (edate and (fDate <= edate)) or not edate:
+(dir_name, fname_unused) = path.split('/', 2)
+if not last_dir_name:
+last_dir_name = dir_name
+if dir_name != last_dir_name:
+# should just print the number of files
+# for every 

[MediaWiki-commits] [Gerrit] misc tiny thumb scripts: pylint, pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: misc tiny thumb scripts: pylint, pep8
..

misc tiny thumb scripts: pylint, pep8

Change-Id: If1a4420fc7b6f0e36f45806e211e094be8d2a4d1
---
M tools/thumbs/crunchinglogs/otherscripts/listFileNames.py
M tools/thumbs/crunchinglogs/otherscripts/listThumbFilesByDir.py
M tools/thumbs/crunchinglogs/otherscripts/removeThumbDirs.py
3 files changed, 64 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/07/280107/1

diff --git a/tools/thumbs/crunchinglogs/otherscripts/listFileNames.py 
b/tools/thumbs/crunchinglogs/otherscripts/listFileNames.py
index f8c9fff..4412bcf 100644
--- a/tools/thumbs/crunchinglogs/otherscripts/listFileNames.py
+++ b/tools/thumbs/crunchinglogs/otherscripts/listFileNames.py
@@ -1,30 +1,35 @@
 # -*- coding: utf-8  -*-
 
-import os
-import re
+'''
+convert image filenames (with _) to
+full path with hash, for use by other scripts
+'''
+
 import sys
-import time
 import hashlib
 
-# convert image filenames (with _) to 
-# full path with hash, for use by other scripts
 
-def getHashPathForLevel( name, levels ):
+def get_hash_path_for_level(name, levels):
 if levels == 0:
 return ''
 else:
 summer = hashlib.md5()
-summer.update( name )
-md5Hash = summer.hexdigest()
+summer.update(name)
+md5_hash = summer.hexdigest()
 path = ''
-for i in range( 1,levels+1 ):
-path = path + md5Hash[0:i] + '/'
+for i in range(1, levels+1):
+path = path + md5_hash[0:i] + '/'
 return path
 
-if __name__ == "__main__":
-basedir="/export/thumbs/wikipedia/commons/thumb/"
+
+def do_main():
+basedir = "/export/thumbs/wikipedia/commons/thumb/"
 for line in sys.stdin:
 fname = line.rstrip()
-hashpath = getHashPathForLevel(fname,2)
-   result = basedir + hashpath + fname
-   print result
+hashpath = get_hash_path_for_level(fname, 2)
+result = basedir + hashpath + fname
+print result
+
+
+if __name__ == "__main__":
+do_main()
diff --git a/tools/thumbs/crunchinglogs/otherscripts/listThumbFilesByDir.py 
b/tools/thumbs/crunchinglogs/otherscripts/listThumbFilesByDir.py
index 453239a..8d9c8c7 100644
--- a/tools/thumbs/crunchinglogs/otherscripts/listThumbFilesByDir.py
+++ b/tools/thumbs/crunchinglogs/otherscripts/listThumbFilesByDir.py
@@ -1,28 +1,36 @@
 # -*- coding: utf-8  -*-
 
+
+'''
+given a list of thumb dirs, list the files in
+each dir, not sorted in any fashion, for input
+to other scripts
+'''
+
+
 import os
-import re
 import sys
 import time
 
-# given a list of thumb dirs, list the files in 
-# each dir, not sorted in any fashion, for input
-# to other scripts
 
-def listFiles(dirName):
-for f in os.listdir(dirName):
-fName = dirName + "/" + f
-if os.path.isfile(fName):
-stat = os.stat(fName)
-fileDate = time.strftime("%Y-%m-%d  
%H:%M:%S",time.gmtime(stat.st_mtime))
-fileSize = stat.st_size
-print fileDate, " ", fileSize, " ", fName
+def list_files(dir_name):
+for fname in os.listdir(dir_name):
+path = dir_name + "/" + fname
+if os.path.isfile(path):
+stat = os.stat(path)
+file_date = time.strftime("%Y-%m-%d  %H:%M:%S",
+  time.gmtime(stat.st_mtime))
+file_size = stat.st_size
+print file_date, " ", file_size, " ", path
 
-if __name__ == "__main__":
-count = 0
+
+def do_main():
 for line in sys.stdin:
-dName = line.rstrip()
-if os.path.isdir(dName):
-listFiles(dName)
+d_name = line.rstrip()
+if os.path.isdir(d_name):
+list_files(d_name)
 sys.exit(0)
 
+
+if __name__ == "__main__":
+do_main()
diff --git a/tools/thumbs/crunchinglogs/otherscripts/removeThumbDirs.py 
b/tools/thumbs/crunchinglogs/otherscripts/removeThumbDirs.py
index b6f1cc5..f4921ce 100644
--- a/tools/thumbs/crunchinglogs/otherscripts/removeThumbDirs.py
+++ b/tools/thumbs/crunchinglogs/otherscripts/removeThumbDirs.py
@@ -1,29 +1,37 @@
 # -*- coding: utf-8  -*-
 
+
+'''
+given a list of thumb dirs for cleanup,
+toss all files in them and also the dirs themselves
+'''
+
+
 import os
-import re
 import sys
 import time
 
-# given a list of thumb dirs for cleanup, 
-# toss all files in them and also the dirs themselves
 
-def rmDirAndFiles(dirName):
-for f in os.listdir(dirName):
-if os.path.isfile(dirName + "/" + f):
-os.remove(dirName + "/" + f)
-os.rmdir(dirName)
+def rm_dir_and_files(dir_name):
+for fname in os.listdir(dir_name):
+if os.path.isfile(dir_name + "/" + fname):
+os.remove(dir_name + "/" + fname)
+os.rmdir(dir_name)
 
-if __name__ == "__main__":
+

[MediaWiki-commits] [Gerrit] prep-dumps-deploy full pylint and pep8 cleanup - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: prep-dumps-deploy full pylint and pep8 cleanup
..

prep-dumps-deploy full pylint and pep8 cleanup

Change-Id: I1d80b9d4679e6e51ca2ce9df5e9360a3c8ff04e5
---
M deployment/obsolete/prep-dumps-deploy.py
1 file changed, 100 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/01/280101/1

diff --git a/deployment/obsolete/prep-dumps-deploy.py 
b/deployment/obsolete/prep-dumps-deploy.py
index e81edd0..6d18151 100644
--- a/deployment/obsolete/prep-dumps-deploy.py
+++ b/deployment/obsolete/prep-dumps-deploy.py
@@ -1,56 +1,71 @@
-import os, sys, time, shutil, re
-# this script copies the most recent files into a deployment directory with 
the current date
-# run on fenari/bastion host as root or fail.
+import os
+import sys
+import time
+import shutil
+import re
 
-basedir = "/home/wikipedia/downloadserver/snapshothosts/dumps"
-deploy = "deploy" # subdir where deployment trees are stored by date
-confs = "confs" # subdir where config files live
+'''
+this script copies the most recent files into
+ a deployment directory with the current date
+run on fenari/bastion host as root or fail.
+'''
+
+BASEDIR = "/home/wikipedia/downloadserver/snapshothosts/dumps"
+DEPLOY = "deploy"  # subdir where deployment trees are stored by date
+CONFS = "confs"# subdir where config files live
+MONTHNAMES = ["jan", "feb", "mar", "apr", "may", "jun",
+  "jul", "aug", "sep", "oct", "nov", "dec"]
+
 
 class Error(Exception):
 """Base class for exceptions in this module."""
 pass
 
-def dateToDigits(dateString):
-if '-' not in dateString:
+
+def date_to_digits(date_string):
+if '-' not in date_string:
 return None
-month, day, year  = dateString.split('-', 2)
+month, day, year = date_string.split('-', 2)
 if not month.isdigit():
-if not month in monthNames:
+if month not in MONTHNAMES:
 return None
 else:
-month = int(monthNames.index(month)) + 1
+month = int(MONTHNAMES.index(month)) + 1
 day = int(day)
-return "%s%02d%02d" % ( year, month, day)
+return "%s%02d%02d" % (year, month, day)
 
-def getLatestDeployDate(deploydir):
+
+def get_latest_depl_date(deploydir):
 try:
 subdirs = os.listdir(deploydir)
 except:
 sys.stderr.write("Failed to read contents of %s\n" % deploydir)
 raise
-deployDates = {}
-for d in subdirs:
-if not os.path.isdir(os.path.join(deploydir, d)):
+deploy_dates = {}
+for dname in subdirs:
+if not os.path.isdir(os.path.join(deploydir, dname)):
 continue
 # expect mon-dd-
-canonicalDirName = dateToDigits(d)
-if not canonicalDirName:
+canonical_dirname = date_to_digits(dname)
+if not canonical_dirname:
 continue
-deployDates[canonicalDirName] = d
-if not len(deployDates.keys()):
+deploy_dates[canonical_dirname] = dname
+if not len(deploy_dates.keys()):
 return None
-dates = deployDates.keys()
-dates.sort(reverse = True)
-return deployDates[dates[0]]
+dates = deploy_dates.keys()
+dates.sort(reverse=True)
+return deploy_dates[dates[0]]
+
 
 # modified from the python copytree implementation
-def doCopy(sourcedir, targetdir):
+def do_copy(sourcedir, targetdir):
 """only for regular files, symlinks, dirs:
 will attempt to remove files/symlinks in target dir that
 are to be copied from the source dir, leaving any other contents
 of target dir tree in place"""
 names = os.listdir(sourcedir)
 
+errors = []
 if not os.path.isdir(targetdir):
 # if this fails we want to give up on the spot since
 # there will be no target directory to receive the contents
@@ -58,10 +73,9 @@
 os.makedirs(targetdir)
 # fixme is this the right set of errors?
 except (IOError, os.error), why:
-errors.append((sourcepath, targetpath, str(why)))
+errors.append((sourcedir, targetdir, str(why)))
 raise Error(errors)
-
-errors = []
+
 for name in names:
 sourcepath = os.path.join(sourcedir, name)
 targetpath = os.path.join(targetdir, name)
@@ -79,14 +93,14 @@
 linkto = os.readlink(sourcepath)
 os.symlink(linkto, targetpath)
 elif os.path.isdir(sourcepath):
-doCopy(sourcepath, targetpath)
+do_copy(sourcepath, targetpath)
 elif os.path.isfile(sourcepath):
 shutil.copy2(sourcepath, targetpath)
 else:
 errors.append("refusingto remove %s, not file or dir or 
symlink\n")
 except (IOError, os.error), why:
 errors.append((sourcepath, targetpath, 

[MediaWiki-commits] [Gerrit] fixup-interwikis: full pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: fixup-interwikis: full pylint and pep8
..

fixup-interwikis: full pylint and pep8

Change-Id: I22fd2d5141c6276f5b6017af48ed0fe65847ba4a
---
M tools/interwikis/fixup-interwikis.py
1 file changed, 253 insertions(+), 189 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/03/280103/1

diff --git a/tools/interwikis/fixup-interwikis.py 
b/tools/interwikis/fixup-interwikis.py
index b43e2ef..0ec4c7c 100644
--- a/tools/interwikis/fixup-interwikis.py
+++ b/tools/interwikis/fixup-interwikis.py
@@ -1,138 +1,173 @@
-import os, re, sys, time, getopt, cdb, urllib
+import re
+import sys
+import getopt
+import cdb
+import urllib
 from os.path import exists
 
+
 class IWCdbUpdater(object):
-def __init__(self, wikiDbName, wikiTablePrefix, cdbFile, siteType, 
wikiLangCode, dryrun, verbose):
-self.wikiDbName = wikiDbName
-self.wikiTablePrefix = wikiTablePrefix
-self.cdbFile = cdbFile
-self.newCdbFile = cdbFile + ".new"
-self.siteType = siteType
-self.wikiLangCode = wikiLangCode
+def __init__(self, wiki_db_name, wiki_table_prefix, cdb_file,
+ site_type, wiki_lang_code, dryrun, verbose):
+self.wiki_db_name = wiki_db_name
+self.wiki_table_prefix = wiki_table_prefix
+self.cdb_file = cdb_file
+self.new_cdb_file = cdb_file + ".new"
+self.site_type = site_type
+self.wiki_lang_code = wiki_lang_code
 self.dryrun = dryrun
 self.verbose = verbose
 
-self.wikiName = self.getWikiName()
+self.wiki_name = self.get_wiki_name()
 
 # if we can't find it, try to download it
-if not exists(self.cdbFile):
+if not exists(self.cdb_file):
 if self.dryrun:
-sys.stderr.write("No such file %s, would download Wikimedia 
interwiki cdb file\n" % self.cdbFile)
+sys.stderr.write("No such file %s, would download "
+ "Wikimedia interwiki cdb file\n" % 
self.cdb_file)
 elif self.verbose:
-sys.stderr.write("No such file %s, downloading Wikimedia 
interwiki cdb file\n" % self.cdbFile)
+sys.stderr.write("No such file %s, downloading "
+ "Wikimedia interwiki cdb file\n" % 
self.cdb_file)
 url = "https://noc.wikimedia.org/conf/interwiki.cdb;
-urllib.urlretrieve(url, self.cdbFile)
+urllib.urlretrieve(url, self.cdb_file)
 
-self.oldcdbfd = cdb.init(self.cdbFile)
+self.oldcdbfd = cdb.init(self.cdb_file)
 self.newcdbfd = None
+self.update_these = {}
 
-def getWikiName(self):
-if self.wikiTablePrefix:
-return("%s-%s" % (self.wikiDbName, self.wikiTablePrefix))
+def get_wiki_name(self):
+'''
+return the wiki name including table prefix if needed
+'''
+if self.wiki_table_prefix:
+return "%s-%s" % (self.wiki_db_name, self.wiki_table_prefix)
 else:
-return self.wikiDbName
+return self.wiki_db_name
 
 @staticmethod
-def getKnownSiteTypesDict():
-return { "wikibooks": "b", "wikimedia": "chapter", "wikidata": "d", 
"wikinews": 'n', "wikiquote": 'q', "wikisource": "s", "wikiversity": 'v', 
"wikivoyage": "voy", "wiki": 'w', "wiktionary": "wikt" }
+def get_known_site_types_dict():
+'''
+return wiki types along with their abbreviations
+'''
+return {"wikibooks": "b", "wikimedia": "chapter",
+"wikidata": "d", "wikinews": 'n', "wikiquote": 'q',
+"wikisource": "s", "wikiversity": 'v',
+"wikivoyage": "voy", "wiki": 'w', "wiktionary": "wikt"}
 
 @staticmethod
-def getKnownSiteTypes():
-return IWCdbUpdater.getKnownSiteTypesDict().keys()
+def get_known_site_types():
+'''
+return the list of known wiki types
+'''
+return IWCdbUpdater.get_known_site_types_dict().keys()
 
 @staticmethod
-def getAbbrevs():
-return IWCdbUpdater.getKnownSiteTypesDict().values()
+def get_abbrevs():
+'''
+return the list of abbreviations of known wiki types
+'''
+return IWCdbUpdater.get_known_site_types_dict().values()
 
 @staticmethod
-def getAbbrevFromSiteType(siteType):
-return IWCdbUpdater.getKnownSiteTypesDict()[siteType]
+def get_abbrev_from_site_type(site_type):
+'''
+given a wiki type, return its abbreviation
+'''
+return IWCdbUpdater.get_known_site_types_dict()[site_type]
 
 @staticmethod
-def getSiteUrl(langCode, siteType):
-if siteType == 'wiki':
+def get_site_url(lang_code, site_type):
+'''
+given the language code 

[MediaWiki-commits] [Gerrit] thumbPxSize: full pylint and pep8 - change (operations/dumps)

2016-03-28 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: thumbPxSize: full pylint and pep8
..

thumbPxSize: full pylint and pep8

Change-Id: I4b4fefebe05951eae3e20f43df0f58ca52a544c1
---
M tools/thumbs/crunchinglogs/datascripts/thumbPxSize.py
1 file changed, 68 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/06/280106/1

diff --git a/tools/thumbs/crunchinglogs/datascripts/thumbPxSize.py 
b/tools/thumbs/crunchinglogs/datascripts/thumbPxSize.py
index 6f96d41..30cbefc 100644
--- a/tools/thumbs/crunchinglogs/datascripts/thumbPxSize.py
+++ b/tools/thumbs/crunchinglogs/datascripts/thumbPxSize.py
@@ -1,31 +1,38 @@
 # -*- coding: utf-8  -*-
 
-import os
 import re
 import sys
-import time
 import getopt
 
 
 def usage(message=None):
-print "Usage: %s [--sdate=date --edate=date [filename]" % sys.argv[0]
-print "sdate: start date for which to print stats, default: earliest date 
in file "
-print "edate: end date for which to print stats, default: latest date in 
file"
-print "Date format: -mm-dd"
-print "If filename is not specified, reads from stdin"
-print ""
-print "Format of input file: (sample line)"
-print "2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg"
-print "date in -mm-dd format, time in hh:mm::ss format, size in bytes, 
thumb directory/thumb filename"
+if message is not None:
+sys.stderr.write(message + "\n")
+usage_message = """
+Usage: thumbPxSize [--sdate=date --edate=date [filename]
+
+  --sdate: start date for which to print stats, default: earliest date in file
+  --edate: end date for which to print stats, default: latest date in file
+
+Date format: -mm-dd
+
+If filename is not specified, reads from stdin
+
+Format of input file: (sample line)
+2011-10-29  01:57:51   100311   
Festiwal_Słowian_i_Wikingów_2009_121.jpg/640px-Festiwal_Słowian_i_Wikingów_2009_121.jpg
+date in -mm-dd format, time in hh:mm::ss format, size in bytes, thumb 
directory/thumb filename
+"""
+sys.stderr.write(usage_message)
 sys.exit(1)
 
-if __name__ == "__main__":
+
+def do_main():
 sdate = None
 edate = None
 
 try:
 (options, remainder) = getopt.gnu_getopt(sys.argv[1:], "",
- [ 'sdate=', 'edate=', ])
+ ['sdate=', 'edate='])
 except:
 usage("Unknown option specified")
 
@@ -36,72 +43,76 @@
 edate = val
 
 dateexp = re.compile(r"^\d{4}-\d{2}-\d{2}$")
-for d in filter(None, [ sdate, edate ]):
-if not dateexp.match(d):
+for date in filter(None, [sdate, edate]):
+if not dateexp.match(date):
 usage("Bad date format.")
 
 if len(remainder) == 1:
-inputFile = remainder[0]
-fHandle = open(inputFile,"r")
+input_file = remainder[0]
+f_handle = open(input_file, "r")
 elif len(remainder) == 0:
-fHandle = sys.stdin
+f_handle = sys.stdin
 else:
 usage("Too many arguments.")
 
-lastDirName = None
-fileCounts = {}
+last_dir_name = None
+file_counts = {}
 sizes = {}
-for line in fHandle:
+for line in f_handle:
 try:
-( fDate, fTime, fSize, path ) = line.rstrip().split()
+(f_date, ftime_unused, fsize_unused, path) = line.rstrip().split()
 except:
 print >> sys.stderr, "skipping badly formatted line: ", 
line.rstrip()
 continue
 try:
-( dirName, fName ) = path.split('/',2)
+(dir_name, f_name) = path.split('/', 2)
 except:
 continue
-if not lastDirName:
-lastDirName = dirName
-if dirName != lastDirName:
-if (sdate and (fDate >= sdate)) or not sdate:
-if (edate and (fDate <= edate)) or not edate:
+if not last_dir_name:
+last_dir_name = dir_name
+if dir_name != last_dir_name:
+if (sdate and (f_date >= sdate)) or not sdate:
+if (edate and (f_date <= edate)) or not edate:
 # print the stats
-dateStrings = fileCounts.keys()
-dateStrings.sort()
-for d in dateStrings:
-print "Date:", d, "ThumbsForFileThisDate:", 
fileCounts[d], "PixelSizes:",
-for k in sizes[d].keys():
-print "%s:%s" % (k, sizes[d][k]),
-print "Dir:", lastDirName
-lastDirName = dirName
+date_strings = file_counts.keys()
+date_strings.sort()
+for date in date_strings:
+print("Date:", date, 

[MediaWiki-commits] [Gerrit] [FeedsFromPrivateWikis] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FeedsFromPrivateWikis] Add npm test and composer-test
..

[FeedsFromPrivateWikis] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires If56ffd50cf03b117a93497a7fb64b950d161b560

Change-Id: Id0c0bacb5f1150f9c16d99ff13b9d05f8667c25a
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/99/280099/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..5b641fe 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4509,9 +4509,11 @@
 
   - name: mediawiki/extensions/FeedsFromPrivateWikis
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/FilterListUsers
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0c0bacb5f1150f9c16d99ff13b9d05f8667c25a
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] Use eventbus topic config from mediawiki/event-schemas repo - change (operations/puppet)

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

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

Change subject: Use eventbus topic config from mediawiki/event-schemas repo
..

Use eventbus topic config from mediawiki/event-schemas repo

Change-Id: I6dc638197f479e6de130ef310f454ccd4eabc5c4
---
M modules/role/manifests/eventbus/eventbus.pp
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/280097/1

diff --git a/modules/role/manifests/eventbus/eventbus.pp 
b/modules/role/manifests/eventbus/eventbus.pp
index 3ef4fc1..638d017 100644
--- a/modules/role/manifests/eventbus/eventbus.pp
+++ b/modules/role/manifests/eventbus/eventbus.pp
@@ -23,17 +23,8 @@
 manage_user   => false,
 }
 
-file { '/etc/eventbus':
-ensure => 'directory',
-}
-
-file { '/etc/eventbus/topics.yaml':
-source => 'puppet:///modules/role/eventbus/topics.yaml',
-}
-
 $kafka_brokers_array = $role::kafka::main::config::brokers_array
 $kafka_base_uri  = inline_template('kafka:///<%= 
@kafka_brokers_array.join(":9092,") + ":9092" %>')
-
 
 $outputs = [
 # When events are produced to kafka, the
@@ -53,7 +44,7 @@
 # TODO: Deploy mediawiki/event-schemas separately
 # from the submodule in EventLogging repo?
 schemas_path  => "${::eventschemas::path}/jsonschema",
-topic_config  => '/etc/eventbus/topics.yaml',
+topic_config  => 
"${::eventschemas::path}/config/eventbus-topics.yaml",
 outputs   => $outputs,
 statsd=> hiera('statsd'),
 statsd_prefix => 'eventbus',

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

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

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FeedsFromPrivateWikis)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: If56ffd50cf03b117a93497a7fb64b950d161b560
---
M .gitignore
M FeedsFromPrivateWikis.php
A Gruntfile.js
A i18n/qqq.json
A package.json
5 files changed, 39 insertions(+), 2 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/FeedsFromPrivateWikis.php b/FeedsFromPrivateWikis.php
index eb80974..d8b5d15 100644
--- a/FeedsFromPrivateWikis.php
+++ b/FeedsFromPrivateWikis.php
@@ -24,7 +24,7 @@
'descriptionmsg' => 'feedsfromprivatewikis-desc',
 );
 
-$dir = dirname( __FILE__ ) . '/';
+$dir = __DIR__ . '/';
 $wgMessagesDirs['FeedsFromPrivateWikis'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['FeedsFromPrivateWikis'] = $dir . 
'FeedsFromPrivateWikis.i18n.php';
 
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..ad2140b
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,6 @@
+{
+   "@metadata": {
+   "authors": []
+   },
+   "feedsfromprivatewikis-desc": 
"{{desc|what=extension|name=FeedsFromPrivateWikis|url=https://www.mediawiki.org/wiki/Extension:FeedsFromPrivateWikis}};
+}
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If56ffd50cf03b117a93497a7fb64b950d161b560
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FeedsFromPrivateWikis
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] Fix separation of text into sentences. - change (mediawiki...TextExtracts)

2016-03-28 Thread Putnik (Code Review)
Putnik has uploaded a new change for review.

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

Change subject: Fix separation of text into sentences.
..

Fix separation of text into sentences.

Some space characters like  or $thinsp; usually is not indicate to the 
end of sentence, so shouldn't be used as separators.

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


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

diff --git a/includes/ExtractFormatter.php b/includes/ExtractFormatter.php
index 644dcaa..e18952e 100644
--- a/includes/ExtractFormatter.php
+++ b/includes/ExtractFormatter.php
@@ -80,7 +80,7 @@
public static function getFirstSentences( $text, 
$requestedSentenceCount ) {
// Based on code from OpenSearchXml by Brion Vibber
$endchars = array(
-   '[^\p{Lu}]\.\s', '\!\s', '\?\s', // regular ASCII
+   '[^\p{Lu}]\.[ \n]', '\![ \n]', '\?[ \n]', // regular 
ASCII
'。', // full-width ideographic full-stop
'.', '!', '?', // double-width roman forms
'。', // half-width ideographic full stop

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb56b0ef723dd299f848ea88b66613d92977bef0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Putnik 

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


[MediaWiki-commits] [Gerrit] Treat a 302 from RESTBase like a 404 - change (mediawiki...VisualEditor)

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

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

Change subject: Treat a 302 from RESTBase like a 404
..

Treat a 302 from RESTBase like a 404

Should be tested before merge

Bug: T130757
Change-Id: I21c553e7c4e67586895b12e3d18d5416f53ddb3f
---
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
index 3e4e4ad..2dce272 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
@@ -180,7 +180,7 @@
return [ data, 
jqxhr.getResponseHeader( 'etag' ) ];
},
function ( response ) {
-   if ( response.status === 404 ) {
+   if ( response.status === 404 || 
response.status === 302 ) {
// Page does not exist, 
so let the user start with a blank document.
return 
$.Deferred().resolve( [ '', undefined ] ).promise();
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21c553e7c4e67586895b12e3d18d5416f53ddb3f
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] [FanBoxes] Add npm test and composer-test - change (integration/config)

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

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

Change subject: [FanBoxes] Add npm test and composer-test
..

[FanBoxes] Add npm test and composer-test

Also move jsonlint to check: for non-whitelisted users and add jshint
since there are js files.

Requires Ifbb3eaa80fd554cf79aae409b4f255c7ab332527

Change-Id: I80f8586ab2bb27441f086d26b84432167fbfb69f
---
M zuul/layout.yaml
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/94/280094/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a781f3c..376c8bc 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4503,9 +4503,12 @@
 
   - name: mediawiki/extensions/FanBoxes
 template:
-  - name: jshint
-  - name: jsonlint
+  - name: composer-test
   - name: extension-unittests-non-voting
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/FeedsFromPrivateWikis
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80f8586ab2bb27441f086d26b84432167fbfb69f
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] Use topic config for eventbus from mediawiki/event-schemas repo - change (mediawiki/vagrant)

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

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

Change subject: Use topic config for eventbus from mediawiki/event-schemas repo
..

Use topic config for eventbus from mediawiki/event-schemas repo

Change-Id: Ia016d2a1d209616ff4de58a417b696fb3deb7e61
---
D puppet/modules/role/files/eventbus/topics.yaml
M puppet/modules/role/manifests/eventbus.pp
2 files changed, 1 insertion(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/93/280093/1

diff --git a/puppet/modules/role/files/eventbus/topics.yaml 
b/puppet/modules/role/files/eventbus/topics.yaml
deleted file mode 100644
index 090dcdf..000
--- a/puppet/modules/role/files/eventbus/topics.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-# NOTE: This file is managed by puppet
-
-#
-# Topic config file.  This file specifies which schemas are allowed to
-# be produced to topics.
-#
-
-mediawiki.page_delete:
-  schema_name: page_delete
-
-mediawiki.page_move:
-  schema_name: page_move
-
-mediawiki.page_restore:
-  schema_name: page_restore
-
-mediawiki.revision_visibility_set:
-  schema_name: revision_visibility_set
-
-mediawiki.revision_create:
-  schema_name: revision_create
-
-wmf.resource_change:
-  schema_name: resource_change
diff --git a/puppet/modules/role/manifests/eventbus.pp 
b/puppet/modules/role/manifests/eventbus.pp
index 8fec7ae..49d99e3 100644
--- a/puppet/modules/role/manifests/eventbus.pp
+++ b/puppet/modules/role/manifests/eventbus.pp
@@ -17,11 +17,6 @@
 },
 }
 
-$topic_config = "${::eventlogging::path}/config/eventbus-topics.yaml"
-file { $topic_config:
-source => 'puppet:///modules/role/eventbus/topics.yaml',
-}
-
 $outputs = [
 # Output to Kafka.  All messages will produced to topics prefixed
 # with a datacenter name.
@@ -33,7 +28,7 @@
 eventlogging::service { 'eventbus':
 port => 8085,
 schemas_path => "${::eventschemas::path}/jsonschema",
-topic_config => $topic_config,
+topic_config => "${::eventschemas::path}/config/eventbus-topics.yaml",
 outputs  => $outputs,
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia016d2a1d209616ff4de58a417b696fb3deb7e61
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] Correctly log the language button position for the Main_Page - change (mediawiki...MobileFrontend)

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

Change subject: Correctly log the language button position for the Main_Page
..


Correctly log the language button position for the Main_Page

The language switcher button is at the bottom of the page on
the Main Page (both beta and stable).

Bug: T131093
Change-Id: I64a92778ae7641e5aa4f56581da5d1be00ed9864
---
M resources/skins.minerva.scripts/init.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/skins.minerva.scripts/init.js 
b/resources/skins.minerva.scripts/init.js
index 2107016..b7ade83 100644
--- a/resources/skins.minerva.scripts/init.js
+++ b/resources/skins.minerva.scripts/init.js
@@ -53,7 +53,8 @@
function initButton() {
// FIXME: remove .languageSelector when cache clears
var $languageSwitcherBtn = $( '#language-switcher, 
.languageSelector' ),
-   languageButtonVersion = context.isBetaGroupMember() ? 
'top-of-article' : 'bottom-of-article';
+   languageButtonVersion = ( !page.isMainPage() && 
context.isBetaGroupMember() ) ?
+   'top-of-article' : 'bottom-of-article';
 
/**
 * Log impression when the language button is seen by the user

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

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

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


[MediaWiki-commits] [Gerrit] ApiUpload: Add debug logging for T130563 - change (mediawiki/core)

2016-03-28 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: ApiUpload: Add debug logging for T130563
..

ApiUpload: Add debug logging for T130563

We're getting 'missingparam' errors in UploadWizard and I don't know
what is causing them. Perhaps this will help.

(It's a lot easier to add debugging here, since there are several code
paths in UploadWizard leading to action=upload queries, and this debug
channel is already set up after 0fb104497c79b58d48a9414096f4acd654df550c.)

Bug: T130563
Change-Id: I9fa155045ea99e59fda2ef2e138d12892906e3e3
---
M includes/api/ApiUpload.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/280092/1

diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 326f8ba..344f60d 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -381,6 +381,10 @@
 
// chunk or one and only one of the following parameters is 
needed
if ( !$this->mParams['chunk'] ) {
+   if ( !$this->mParams['filekey'] && 
!$this->mParams['file'] && !$this->mParams['url'] ) {
+   wfDebugLog( 'upload', 'missingparam: ' . 
print_r( $this->mParams, true ) );
+   }
+
$this->requireOnlyOneParameter( $this->mParams,
'filekey', 'file', 'url' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fa155045ea99e59fda2ef2e138d12892906e3e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Bump s-maxage for purged endpoints. - change (operations/puppet)

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

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

Change subject: Bump s-maxage for purged endpoints.
..

Bump s-maxage for purged endpoints.

Caching and purging were life for almost 2 weeks now and
there was no issues with it, so bump max age to 1 week.

Change-Id: Idf9ff9418c2590b765d7e58f204b1ab98a5d2daf
---
M modules/restbase/templates/config.labs.yaml.erb
M modules/restbase/templates/config.yaml.erb
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index ac057af..410c69f 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -39,7 +39,7 @@
 related:
   cache_control: s-maxage=86400, max-age=86400
 # Cache headers for purged end points.
-purged_cache_control: s-maxage=3600, max-age=3600
+purged_cache_control: s-maxage=604800, max-age=0, must-revalidate
 
 # A different project template, sharing configuration options.
 wikimedia.org: 
diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index f47c02a..bc256e9 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -62,7 +62,7 @@
 related:
   cache_control: s-maxage=86400, max-age=3600
 # Cache headers for purged end points.
-purged_cache_control: s-maxage=172800, max-age=0, must-revalidate
+purged_cache_control: s-maxage=604800, max-age=0, must-revalidate
 
 # A different project template, sharing configuration options.
 wikimedia.org: 

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

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

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FanBoxes)

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

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Ifbb3eaa80fd554cf79aae409b4f255c7ab332527
---
M .gitignore
A .jshintignore
A .jshintrc
M FanBoxes.js
A Gruntfile.js
M color-picker.js
A package.json
7 files changed, 82 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FanBoxes 
refs/changes/90/280090/1

diff --git a/.gitignore b/.gitignore
index 98b092a..1689d7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+node_modules/**
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/FanBoxes.js b/FanBoxes.js
index b09e1ac..09ff251 100644
--- a/FanBoxes.js
+++ b/FanBoxes.js
@@ -153,7 +153,7 @@
var $container = jQuery( '#show-message-container' + fantagId );
 
jQuery.post(
-   mw.util.wikiScript( 'api' ), {
+   mediaWiki.util.wikiScript( 'api' ), {
action: 'fanboxes',
what: 'showAddRemoveMessage',
'addRemove': addRemove,
@@ -175,7 +175,7 @@
$container.fadeOut( 1000 );
 
jQuery.post(
-   mw.util.wikiScript( 'api' ), {
+   mediaWiki.util.wikiScript( 'api' ), {
action: 'fanboxes',
what: 'messageAddRemoveUserPage',
'addRemove': addRemove,
@@ -197,7 +197,7 @@
 */
createFantag: function() {
if ( !document.getElementById( 'inputRightSide' ).value ) {
-   alert( mw.msg( 'fanbox-mustenter-right-or' ) );
+   alert( mediaWiki.msg( 'fanbox-mustenter-right-or' ) );
return '';
}
 
@@ -206,18 +206,18 @@
!document.getElementById( 'fantag_image_name' ).value
)
{
-   alert( mw.msg( 'fanbox-mustenter-left' ) );
+   alert( mediaWiki.msg( 'fanbox-mustenter-left' ) );
return '';
}
 
var title = document.getElementById( 'wpTitle' ).value;
if ( !title ) {
-   alert( mw.msg( 'fanbox-mustenter-title' ) );
+   alert( mediaWiki.msg( 'fanbox-mustenter-title' ) );
return '';
}
 
if ( title.indexOf( '#' ) > -1 ) {
-   alert( mw.msg( 'fanbox-hash' ) );
+   alert( mediaWiki.msg( 'fanbox-hash' ) );
return '';
}
 
@@ -225,7 +225,7 @@
title = title.replace( '&', '%26' );
 
jQuery.post(
-   mw.util.wikiScript( 'api' ), {
+   mediaWiki.util.wikiScript( 'api' ), {
action: 'fanboxes',
what: 'checkTitleExistence',
page_name: encodeURIComponent( 
document.getElementById( 'wpTitle' ).value ),
@@ -248,7 +248,7 @@
 */
createFantagSimple: function() {
if ( !document.getElementById( 'inputRightSide' ).value ) {
-   alert( mw.msg( 'fanbox-mustenter-right' ) );
+   alert( mediaWiki.msg( 'fanbox-mustenter-right' ) );
return '';
}
 
@@ -257,7 +257,7 @@
!document.getElementById( 'fantag_image_name' ).value
)
{
-   alert( mw.msg( 'fanbox-mustenter-left' ) );
+   alert( mediaWiki.msg( 'fanbox-mustenter-left' ) );
return '';
}
 
@@ -266,14 +266,14 @@
 
resetUpload: function() {
var frame = document.getElementById( 'imageUpload-frame' );
-   frame.src = mw.config.get( 'wgScriptPath' ) + 
'/index.php?title=Special:FanBoxAjaxUpload';
+   frame.src = mediaWiki.config.get( 'wgScriptPath' ) + 

[MediaWiki-commits] [Gerrit] mw:maintenance: also move mariadb maintenance class - change (operations/puppet)

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

Change subject: mw:maintenance: also move mariadb maintenance class
..


mw:maintenance: also move mariadb maintenance class

The mariadb::maintenance class also moves from mw2090 over to wasat,
just like mediawiki::maintenance.

Bug:T129930
Change-Id: Idbee3dcba19ce3a2b3a150e26da2e8c2cfaea77b
---
M manifests/site.pp
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 5f092b3..503ff08 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2073,9 +2073,9 @@
 role mediawiki::imagescaler
 }
 
-#mw2090 is terbium's equivalent
+#mw2090 was terbium's equivalent, replaced by wasat
 node 'mw2090.codfw.wmnet' {
-role mariadb::maintenance
+role spare
 
 }
 
@@ -2601,7 +2601,7 @@
 
 # mediawiki maintenance server (like terbium)
 node 'wasat.codfw.wmnet' {
-role mediawiki::maintenance
+role mariadb::maintenance, mediawiki::maintenance
 }
 
 # Wikidata query service

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbee3dcba19ce3a2b3a150e26da2e8c2cfaea77b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Jcrespo 
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] mw:maintenance: also move mariadb maintenance class - change (operations/puppet)

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

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

Change subject: mw:maintenance: also move mariadb maintenance class
..

mw:maintenance: also move mariadb maintenance class

The mariadb::maintenance class also moves from mw2090 over to wasat,
just like mediawiki::maintenance.

Bug:T129930
Change-Id: Idbee3dcba19ce3a2b3a150e26da2e8c2cfaea77b
---
M manifests/site.pp
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/280089/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 5f092b3..503ff08 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2073,9 +2073,9 @@
 role mediawiki::imagescaler
 }
 
-#mw2090 is terbium's equivalent
+#mw2090 was terbium's equivalent, replaced by wasat
 node 'mw2090.codfw.wmnet' {
-role mariadb::maintenance
+role spare
 
 }
 
@@ -2601,7 +2601,7 @@
 
 # mediawiki maintenance server (like terbium)
 node 'wasat.codfw.wmnet' {
-role mediawiki::maintenance
+role mariadb::maintenance, mediawiki::maintenance
 }
 
 # Wikidata query service

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

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

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


[MediaWiki-commits] [Gerrit] Add CiviCRM activity to put against the deleted contact - change (wikimedia...crm)

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

Change subject: Add CiviCRM activity to put against the deleted contact
..


Add CiviCRM activity to put against the deleted contact

Bug: T119246
Change-Id: I805b3a3afa2ad0919f397406390922b93c26edcf
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index f5e6df7..66b2949 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -1945,3 +1945,19 @@
 wmf_civicrm_bootstrap_civi();
 wmf_civicrm_create_option_values( 'payment_instrument', 
$payment_instruments );
 }
+
+/**
+ * Add contact deleted by merge activity.
+ *
+ * CRM-18106 / T119246.
+ */
+function wmf_civicrm_update_7200() {
+  civicrm_initialize();
+  CRM_Core_BAO_OptionValue::ensureOptionValueExists(array(
+'option_group_id' => 'activity_type',
+'name' => 'Contact Deleted by Merge',
+'label' => ts('Contact Deleted by Merge'),
+'description' => ts('Contact was merged into another contact'),
+'is_active' => TRUE,
+  ));
+}

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

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

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


[MediaWiki-commits] [Gerrit] sync-gh-pages: Fix "oojs-ui-apex.vector.css" 404 Not Found - change (VisualEditor/VisualEditor)

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

Change subject: sync-gh-pages: Fix "oojs-ui-apex.vector.css" 404 Not Found
..


sync-gh-pages: Fix "oojs-ui-apex.vector.css" 404 Not Found

The buttons currently fallback to plain anchor links due to the
stylesheet having been renamed in a recent release.

See 

Change-Id: Iba7c8b0742ef405ef7fec11cd1c48123bb3a9d71
---
M bin/sync-gh-pages.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bin/sync-gh-pages.sh b/bin/sync-gh-pages.sh
index 4060b70..b9098ed 100755
--- a/bin/sync-gh-pages.sh
+++ b/bin/sync-gh-pages.sh
@@ -14,7 +14,7 @@
 html='
 
 VisualEditor
-
+
 
 

  1   2   3   >