[MediaWiki-commits] [Gerrit] Bump composer-merge-plugin to v1.3.0 - change (mediawiki/core)

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

Change subject: Bump composer-merge-plugin to v1.3.0
..


Bump composer-merge-plugin to v1.3.0

Update composer-merge-plugin and enable the new feature of omitting
"require-dev" sections from merged files. This will help prevent
Composer package conflicts when used with extensions that have dev
requirements which are not reconcilable with those of MediaWiki itself.

Requires: I7453f68e671b9d519ec3f7dfaa22de6ec8f252e9
Change-Id: I768cf21c6601496e34f2b63199df04cbc0090145
---
M composer.json
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/composer.json b/composer.json
index 78c23ce..1cdf813 100644
--- a/composer.json
+++ b/composer.json
@@ -29,7 +29,7 @@
"wikimedia/base-convert": "1.0.1",
"wikimedia/cdb": "1.3.0",
"wikimedia/cldr-plural-rule-parser": "1.0.0",
-   "wikimedia/composer-merge-plugin": "1.2.1",
+   "wikimedia/composer-merge-plugin": "1.3.0",
"wikimedia/ip-set": "1.0.1",
"wikimedia/relpath": "1.0.3",
"wikimedia/running-stat": "1.1.0",
@@ -82,7 +82,8 @@
"merge-plugin": {
"include": [
"composer.local.json"
-   ]
+   ],
+   "merge-dev": false
}
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Bump composer-merge-plugin to v1.3.0 - change (mediawiki/vendor)

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

Change subject: Bump composer-merge-plugin to v1.3.0
..


Bump composer-merge-plugin to v1.3.0

Includes support for excluding merging of require-dev sections which will be
enabled for MediaWiki core to assist in preventing Composer package conflict
when used with extensions that have dev requirements which are not reconcilable
with those of MediaWiki itself.

Needed-By: I768cf21c6601496e34f2b63199df04cbc0090145
Change-Id: I7453f68e671b9d519ec3f7dfaa22de6ec8f252e9
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/installed.json
A wikimedia/composer-merge-plugin/.arcconfig
A wikimedia/composer-merge-plugin/.arclint
M wikimedia/composer-merge-plugin/README.md
M wikimedia/composer-merge-plugin/composer.json
A wikimedia/composer-merge-plugin/src/Logger.php
A wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php
A wikimedia/composer-merge-plugin/src/Merge/MissingFileException.php
A wikimedia/composer-merge-plugin/src/Merge/PluginState.php
A wikimedia/composer-merge-plugin/src/Merge/StabilityFlags.php
M wikimedia/composer-merge-plugin/src/MergePlugin.php
14 files changed, 1,427 insertions(+), 479 deletions(-)

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



diff --git a/composer.json b/composer.json
index fc6b29d..27bb608 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
"wikimedia/base-convert": "1.0.1",
"wikimedia/cdb": "1.3.0",
"wikimedia/cldr-plural-rule-parser": "1.0.0",
-   "wikimedia/composer-merge-plugin": "1.2.1",
+   "wikimedia/composer-merge-plugin": "1.3.0",
"wikimedia/ip-set": "1.0.1",
"wikimedia/relpath": "1.0.3",
"wikimedia/running-stat": "1.1.0",
diff --git a/composer.lock b/composer.lock
index 93e71f3..23c7311 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "8d214923ae0bbeb39360f3acb290300c",
-"content-hash": "a69ca0cc1e246d83af0b32a359803a68",
+"hash": "5bc963e06bea9445e49482d7e8ff5d45",
+"content-hash": "225a9474fbaaff1115e0fb91cdabc2b4",
 "packages": [
 {
 "name": "composer/semver",
@@ -921,16 +921,16 @@
 },
 {
 "name": "wikimedia/composer-merge-plugin",
-"version": "v1.2.1",
+"version": "v1.3.0",
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/composer-merge-plugin.git;,
-"reference": "c455fb5ca09da6b970355b19185e27415bc15756"
+"reference": "bfed1f8d4eb97e9ba80eee57ea46229d7e5364d9"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/c455fb5ca09da6b970355b19185e27415bc15756;,
-"reference": "c455fb5ca09da6b970355b19185e27415bc15756",
+"url": 
"https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/bfed1f8d4eb97e9ba80eee57ea46229d7e5364d9;,
+"reference": "bfed1f8d4eb97e9ba80eee57ea46229d7e5364d9",
 "shasum": ""
 },
 "require": {
@@ -940,12 +940,14 @@
 "require-dev": {
 "composer/composer": "1.0.*@dev",
 "jakub-onderka/php-parallel-lint": "~0.8",
-"phpspec/prophecy-phpunit": "~1.0",
-"phpunit/phpunit": "~4.0",
+"phpunit/phpunit": "~4.8|~5.0",
 "squizlabs/php_codesniffer": "~2.1.0"
 },
 "type": "composer-plugin",
 "extra": {
+"branch-alias": {
+"dev-master": "1.3.x-dev"
+},
 "class": "Wikimedia\\Composer\\MergePlugin"
 },
 "autoload": {
@@ -964,7 +966,7 @@
 }
 ],
 "description": "Composer plugin to merge multiple composer.json 
files",
-"time": "2015-07-03 03:24:58"
+"time": "2015-11-06 20:31:16"
 },
 {
 "name": "wikimedia/ip-set",
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index ce215c8..f9788c8 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -560,7 +560,12 @@
 'Wikimedia\\Assert\\PostconditionException' => $vendorDir . 
'/wikimedia/assert/src/PostconditionException.php',
 'Wikimedia\\Assert\\PreconditionException' => $vendorDir . 
'/wikimedia/assert/src/PreconditionException.php',
 'Wikimedia\\Assert\\Test\\AssertTest' => $vendorDir . 
'/wikimedia/assert/tests/phpunit/AssertTest.php',
+

[MediaWiki-commits] [Gerrit] [Timeless] Add Jenkins tests for this skin - change (integration/config)

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

Change subject: [Timeless] Add Jenkins tests for this skin
..


[Timeless] Add Jenkins tests for this skin

Adds npm.

Adds jsonlint, jshint and phplint to check: for non-whitelisted users.

Repo is at https://git.wikimedia.org/summary/mediawiki%2Fskins%2FTimeless

Change-Id: Ib8a8fb11ac43cc8020c5c0a7b6e889aa1583a199
---
M zuul/layout.yaml
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d309e33..73507e8 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2463,6 +2463,23 @@
 check:
  - jsonlint
 
+  - name: mediawiki/skins/Timeless
+template:
+ - name: npm
+check:
+ - jsonlint
+ - jshint
+ - phplint
+ - php-composer-validate
+test:
+ - phplint
+ - php-composer-validate
+gate-and-submit:
+ - phplint
+ - php-composer-validate
+experimental:
+ - php-composer-test
+
   - name: mediawiki/skins/Tomas
 template:
  - name: mw-checks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8a8fb11ac43cc8020c5c0a7b6e889aa1583a199
Gerrit-PatchSet: 7
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Exclude refunded donations in 'latest' calculation - change (wikimedia...tools)

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

Change subject: Exclude refunded donations in 'latest' calculation
..


Exclude refunded donations in 'latest' calculation

No need to filter in the lifetime total because refunded donations
should each have a matching negative refund.

Bug: T117931
Change-Id: I42b7361f0106bb783d6921b591fdabed252ba865
---
M silverpop_export/update_table.sql
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index 9ca18df..af4619e 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -83,7 +83,9 @@
 civicrm.wmf_contribution_extra ex
   WHERE
 e.contact_id = ct.contact_id AND
-ex.entity_id = ct.id
+ex.entity_id = ct.id AND
+ct.total_amount > 0 AND -- Refunds don't count
+ct.contribution_status_id = 1 -- 'Completed'
   GROUP BY
 e.email
   HAVING

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

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

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


[MediaWiki-commits] [Gerrit] Enable VisualEditor for draft namespace in fawiki - change (operations/mediawiki-config)

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

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

Change subject: Enable VisualEditor for draft namespace in fawiki
..

Enable VisualEditor for draft namespace in fawiki

Change-Id: I8d6a60f6ffa6991b1f666fe9431cf6884e7fd015
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 301b51b..a66ce23 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12823,6 +12823,9 @@
108 /* Book */ => true, // T58001
118 /* Draft */ => true
),
+'+fawiki' => array(
+118 /* Draft */ => true
+),
'+frwiki' => array(
102 /* Wikiprojet */ => true // T116603
),

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

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

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


[MediaWiki-commits] [Gerrit] Update README - change (mediawiki...Gadgets)

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

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

Change subject: Update README
..

Update README

* Requires 1.27
* require_once is not a function
* BeforePageDisplay does run in modern versions of the CologneBlue skin.
* User code typically runs after Gadgets now, and they do have access to
things defined in gadgets.

Change-Id: I37431940693abdc2df840980025ff517e95f4a09
---
M README
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/76/251676/1

diff --git a/README b/README
index 5fb3c35..b7bea4f 100644
--- a/README
+++ b/README
@@ -16,7 +16,7 @@
 they should be mentioned in each file individually.
 
 == Prerequisites ==
-This version of Gadgets requires MediaWiki 1.19 or later. To get a version
+This version of Gadgets requires MediaWiki 1.27 or later. To get a version
 compatible with earlier MediaWiki release, visit
 https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Gadgets
 
@@ -25,7 +25,7 @@
 MediaWiki installation. Then add the following lines to your
 LocalSettings.php file (near the end):
 
-  require_once( "$IP/extensions/Gadgets/Gadgets.php" );
+  require_once "$IP/extensions/Gadgets/Gadgets.php";
 
 == Usage ==
 See http://www.mediawiki.org/wiki/Extension:Gadgets#Usage
@@ -35,8 +35,3 @@
 * Gadgets do not apply to Special:Preferences, Special:UserLogin and
   Special:ResetPass so users can always disable any broken gadgets they
   may have enabled, and malicious gadgets will be unable to steal passwords.
-* Uses BeforePageDisplay hook, thus only works with MonoBook based skins;
-  specifically, does not work with CologneBlue.
-* Gadget code is included after user code - that means that user JS has no
-  access to things defined in gadgets, and user CSS is overwritten by CSS
-  from gadgets. (pending a better way to insert things into the HTML head)

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

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

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


[MediaWiki-commits] [Gerrit] [Example] Update Jenkins tests - change (integration/config)

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

Change subject: [Example] Update Jenkins tests
..


[Example] Update Jenkins tests

Remove mw-checks-test as all its jobs are
now included in the rest.

jshint is run through npm since:
https://gerrit.wikimedia.org/r/#/c/250306/

Change-Id: Ic21468c31769a44ec0ad0fdf8d5e0a37ea1c4edb
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 73507e8..e493352 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2362,9 +2362,8 @@
 
   - name: mediawiki/skins/Example
 template:
- - name: mw-checks-test
- - name: npm
  - name: composer-test
+ - name: npm
 check:
  - jsonlint
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic21468c31769a44ec0ad0fdf8d5e0a37ea1c4edb
Gerrit-PatchSet: 7
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Explicitly load BaseChecksFileTest in test bootstrap - change (wikimedia...crm)

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

Change subject: Explicitly load BaseChecksFileTest in test bootstrap
..


Explicitly load BaseChecksFileTest in test bootstrap

And remove it from the module's .info file, since
Drupal should never need to load it.

Change-Id: I6124ae5791aa9589c6749a8bb0228ff247fe3a5f
---
M sites/all/modules/offline2civicrm/offline2civicrm.info
M sites/default/bootstrap-phpunit.php
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/offline2civicrm/offline2civicrm.info 
b/sites/all/modules/offline2civicrm/offline2civicrm.info
index 031a57e..976e200 100644
--- a/sites/all/modules/offline2civicrm/offline2civicrm.info
+++ b/sites/all/modules/offline2civicrm/offline2civicrm.info
@@ -24,5 +24,4 @@
 files[] = TrilogyFile.php
 files[] = WmfImportFile.php
 files[] = WmfOrgImportFile.php
-files[] = tests/includes/BaseChecksFileTest.php
 
diff --git a/sites/default/bootstrap-phpunit.php 
b/sites/default/bootstrap-phpunit.php
index 0df07c8..08a36d1 100644
--- a/sites/default/bootstrap-phpunit.php
+++ b/sites/default/bootstrap-phpunit.php
@@ -2,6 +2,7 @@
 
 define( 'DRUPAL_ROOT', realpath( __DIR__ ) . "/../../drupal" );
 require_once( DRUPAL_ROOT . 
"/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php" 
);
+require_once( DRUPAL_ROOT . 
"/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php" );
 
 // Argh.  Crib from _drush_bootstrap_drupal_site_validate
 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6124ae5791aa9589c6749a8bb0228ff247fe3a5f
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
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] Move failed jobs to damaged message queue - change (wikimedia...SmashPig)

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

Change subject: Move failed jobs to damaged message queue
..


Move failed jobs to damaged message queue

Try to decrease failmail spam.  "The definition of insanity..."
and all that.

Bug: T117447
Change-Id: I496381c5f48b6d4ed3dcdf2cf520e5c2609abbd5
---
M Maintenance/StompJobRunner.php
1 file changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/Maintenance/StompJobRunner.php b/Maintenance/StompJobRunner.php
index 132aaa3..916d595 100644
--- a/Maintenance/StompJobRunner.php
+++ b/Maintenance/StompJobRunner.php
@@ -15,10 +15,12 @@
 class StompJobRunner extends MaintenanceBase {
 
protected $datastore = null;
+   protected $damagedDatastore = null;
 
public function __construct() {
parent::__construct();
$this->addOption( 'queue', 'queue name to consume from', 'jobs' 
);
+   $this->addOption( 'damaged-queue', 'name of queue to hold 
failed job messages', 'jobs-damaged' );
$this->addOption( 'time-limit', 'Try to keep execution under 
 seconds', 60, 't' );
$this->addOption( 'max-messages', 'At most consume  
messages', 10, 'm' );
}
@@ -28,6 +30,7 @@
 */
public function execute() {
$this->datastore = new StompDataStore( $this->getOption( 
'queue' ) );
+   $this->damagedDatastore = new StompDataStore( $this->getOption( 
'damaged-queue' ) );
 
$startTime = time();
$messageCount = 0;
@@ -46,13 +49,15 @@
$successCount += 1;
$this->datastore->queueAckObject();
} else {
-   Logger::info( "Job tells us that it did 
not successfully execute. Re-queueing for later.", $jobObj );
-   $this->datastore->queueIgnoreObject();
+   Logger::info( "Job tells us that it did 
not successfully execute. Sending to damaged message queue.", $jobObj );
+   
$this->damagedDatastore->queueAddObject( $jobObj );
+   $this->datastore->queueAckObject();
}
} else {
-   $this->datastore->queueIgnoreObject();
+   $this->damagedDatastore->queueAddObject( 
$jobObj );
+   $this->datastore->queueAckObject();
Logger::warning(
-   get_class( $jobObj ) . " is not an 
instance of RunnableJob. Could not execute and re-queueing."
+   get_class( $jobObj ) . " is not an 
instance of RunnableJob. Could not execute and sending to damaged message 
queue."
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I496381c5f48b6d4ed3dcdf2cf520e5c2609abbd5
Gerrit-PatchSet: 4
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] Improve LB handling - change (mediawiki...WikimediaMaintenance)

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

Change subject: Improve LB handling
..


Improve LB handling

Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
---
M getPageCounts.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/getPageCounts.php b/getPageCounts.php
index 7eeef52..7828f74 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -43,8 +43,8 @@
if ( isset( $exclude[$wiki] ) ) {
continue;
}
-   $lb = LBFactory::singleton()->getMainLB( $wiki );
-   $dbr = $lb->getConnection( DB_SLAVE );
+   $lb = wfGetLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE, array(), $wiki );
$row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
if ( !$row ) {
$this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
@@ -53,7 +53,7 @@
'pages' => $row->ss_total_pages,
'contentPages' => $row->ss_good_articles
);
-   $lb->closeAll();
+   $lb->reuseConnection( $dbr );
}
$this->output( FormatJson::encode( $counts, true ) . "\n" );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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] Always defer the log publish() in recordUpload2 - change (mediawiki/core)

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

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

Change subject: Always defer the log publish() in recordUpload2
..

Always defer the log publish() in recordUpload2

This is more performant and simplifies the code a bit.

Change-Id: I7a30e000ae4eff47519b83eb6bdde57eeb8a18f6
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/251670/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index cd64f0d..12d4007 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1365,8 +1365,6 @@
$logId = $logEntry->insert();
 
if ( $descTitle->exists() ) {
-   // Page exists, do RC entry now (otherwise we wait for 
later)
-   $logEntry->publish( $logId );
// Use own context to get the action text in content 
language
$formatter = LogFormatter::newFromEntry( $logEntry );
$formatter->setContext( 
RequestContext::newExtraneousContext( $descTitle ) );
@@ -1407,6 +1405,8 @@
) {
# Update memcache after the commit
$that->invalidateCache();
+   # Page exists, do RC entry now (otherwise we wait for 
later)
+   $logEntry->publish( $logId );
 
if ( $newPageContent ) {
# New file page; create the description page.
@@ -1423,7 +1423,6 @@
// Now that the page exists, make an RC entry.
// This relies on the resetArticleID() call in 
WikiPage::insertOn(),
// which is triggered on $descTitle by 
doEditContent() above.
-   $logEntry->publish( $logId );
if ( isset( $status->value['revision'] ) ) {
/** @var $rev Revision */
$rev = $status->value['revision'];

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

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

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


[MediaWiki-commits] [Gerrit] More default config for damaged job queue - change (wikimedia...SmashPig)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: More default config for damaged job queue
..

More default config for damaged job queue

D'oh - last patch was incomplete.

Bug: T117447
Change-Id: I8c1d471f509b3a946e2aea8fd8594b32f8bf7c87
---
M config_defaults.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/68/251668/1

diff --git a/config_defaults.php b/config_defaults.php
index d77bf36..b8c9c5f 100644
--- a/config_defaults.php
+++ b/config_defaults.php
@@ -53,6 +53,7 @@
'pending' => '/queue/pending',
'refund' => '/queue/refund',
'jobs' => '/queue/job-requests',
+   'jobs-damaged' => '/queue/jobs-damaged',
),
),
),

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

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

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


[MediaWiki-commits] [Gerrit] Trim dblist entries - change (mediawiki...WikimediaMaintenance)

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

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

Change subject: Trim dblist entries
..

Trim dblist entries

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


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

diff --git a/getPageCounts.php b/getPageCounts.php
index 7828f74..c291903 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -72,7 +72,7 @@
$this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
return array();
}
-   return file( $fileName );
+   return array_map( 'trim', file( $fileName ) );
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Trim dblist entries - change (mediawiki...WikimediaMaintenance)

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

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

Change subject: Trim dblist entries
..

Trim dblist entries

Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
(cherry picked from commit 079ea6301f302352aa91706bb02acf6aa6fa9b08)
---
M getPageCounts.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/71/251671/1

diff --git a/getPageCounts.php b/getPageCounts.php
index 7828f74..c291903 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -72,7 +72,7 @@
$this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
return array();
}
-   return file( $fileName );
+   return array_map( 'trim', file( $fileName ) );
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Add triggeringRevisionId to LinksUpdate JobSpec - change (mediawiki/core)

2015-11-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has submitted this change and it was merged.

Change subject: Add triggeringRevisionId to LinksUpdate JobSpec
..


Add triggeringRevisionId to LinksUpdate JobSpec

Bug: T117860
Change-Id: I8c730a434b8bdda7664fd1e3bb3fbc8840804950
---
M includes/changes/RecentChange.php
M includes/deferred/LinksUpdate.php
M includes/jobqueue/jobs/RefreshLinksJob.php
3 files changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index 9025736..7c6fbb9 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -800,7 +800,6 @@
$ip = '',
$deleted = 0
) {
-
$rc = new RecentChange;
$rc->mTitle = $categoryTitle;
$rc->mPerformer = $user;
diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index 9a24b96..dbfdab0d 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -1011,6 +1011,13 @@
} else {
$userInfo = false;
}
+
+   if ( $this->mRevision ) {
+   $triggeringRevisionId = $this->mRevision->getId();
+   } else {
+   $triggeringRevisionId = false;
+   }
+
return array(
'wiki' => $this->mDb->getWikiID(),
'job'  => new JobSpecification(
@@ -1020,6 +1027,7 @@
'rootJobTimestamp' => 
$this->mParserOutput->getCacheTime(),
'useRecursiveLinksUpdate' => 
$this->mRecursive,
'triggeringUser' => $userInfo,
+   'triggeringRevisionId' => 
$triggeringRevisionId,
),
array( 'removeDuplicates' => true ),
$this->getTitle()
diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 26f4520..25c3ba4 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -229,6 +229,16 @@
}
$update->setTriggeringUser( $user );
}
+   if ( isset( 
$this->params['triggeringRevisionId'] ) && 
$this->params['triggeringRevisionId'] ) {
+   $revision = Revision::newFromId( 
$this->params['triggeringRevisionId'] );
+   if ( $revision === null ) {
+   $revision = Revision::newFromId(
+   
$this->params['triggeringRevisionId'],
+   Revision::READ_LATEST
+   );
+   }
+   $update->setRevision( $revision );
+   }
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c730a434b8bdda7664fd1e3bb3fbc8840804950
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] More default config for damaged job queue - change (wikimedia...SmashPig)

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

Change subject: More default config for damaged job queue
..


More default config for damaged job queue

D'oh - last patch was incomplete.

Bug: T117447
Change-Id: I8c1d471f509b3a946e2aea8fd8594b32f8bf7c87
---
M config_defaults.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/config_defaults.php b/config_defaults.php
index d77bf36..b8c9c5f 100644
--- a/config_defaults.php
+++ b/config_defaults.php
@@ -53,6 +53,7 @@
'pending' => '/queue/pending',
'refund' => '/queue/refund',
'jobs' => '/queue/job-requests',
+   'jobs-damaged' => '/queue/jobs-damaged',
),
),
),

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

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

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


[MediaWiki-commits] [Gerrit] Enforce stricter slave lag limits for bot API requests - change (mediawiki/core)

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

Change subject: Enforce stricter slave lag limits for bot API requests
..


Enforce stricter slave lag limits for bot API requests

* All users with the bot right sending requests to
  write APIs will get a read-only error when slave
  lag is high. The lag tolerance is configured via
  $wgAPIMaxLagThreshold.
* Making this lower than 'max lag' in the LBFactory
  config means bots get read-only errors before other
  users, which is sensible.
* The default LoadBalancer 'max lag' is now 10 instead
  of 30, which now matches the timeout used for waiting
  on MASTER_POS_WAIT() for ChronologyProtector. This is
  better for assuring that users see their own changes.

Bug: T95501
Change-Id: I56a7f3538278378c67fa3ef5ff0ba4aa6a9a8c64
---
M RELEASE-NOTES-1.27
M includes/DefaultSettings.php
M includes/api/ApiMain.php
M includes/db/loadbalancer/LoadBalancer.php
4 files changed, 53 insertions(+), 7 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 13b9ba2..2701593 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -67,6 +67,8 @@
 * Extensions can now return detailed error information via the API when
   preventing user actions using 'getUserPermissionsErrors' and similar hooks
   by using ApiMessage instances instead of strings for the $result value.
+* $wgAPIMaxLagThreshold was added to limit bot changes when databases lag
+  becomes too high.
 
  External libraries 
 
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 6032ba3..bf6e245 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7326,6 +7326,13 @@
 $wgAPIMaxUncachedDiffs = 1;
 
 /**
+ * Maximum amount of DB lag on a majority of DB slaves to tolerate
+ * before forcing bots to retry any write requests via API errors.
+ * This should be lower than the 'max lag' value in $wgLBFactoryConf.
+ */
+$wgAPIMaxLagThreshold = 7;
+
+/**
  * Log file or URL (TCP or UDP) to log API requests to, or false to disable
  * API request logging
  */
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 86a8a87..e4ab7a5 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1002,7 +1002,6 @@
 */
protected function checkMaxLag( $module, $params ) {
if ( $module->shouldCheckMaxlag() && isset( $params['maxlag'] ) 
) {
-   // Check for maxlag
$maxLag = $params['maxlag'];
list( $host, $lag ) = wfGetLB()->getMaxLag();
if ( $lag > $maxLag ) {
@@ -1148,20 +1147,20 @@
) {
$this->dieUsageMsg( 'readrequired' );
}
+
if ( $module->isWriteMode() ) {
if ( !$this->mEnableWrite ) {
$this->dieUsageMsg( 'writedisabled' );
} elseif ( !$user->isAllowed( 'writeapi' ) ) {
$this->dieUsageMsg( 'writerequired' );
-   } elseif ( wfReadOnly() ) {
-   $this->dieReadOnly();
-   }
-   if ( $this->getRequest()->getHeader( 
'Promise-Non-Write-API-Action' ) ) {
+   } elseif ( $this->getRequest()->getHeader( 
'Promise-Non-Write-API-Action' ) ) {
$this->dieUsage(
"Promise-Non-Write-API-Action HTTP 
header cannot be sent to write API modules",
'promised-nonwrite-api'
);
}
+
+   $this->checkReadOnly( $module );
}
 
// Allow extensions to stop execution for arbitrary reasons.
@@ -1172,6 +1171,42 @@
}
 
/**
+* Check if the DB is read-only for this user
+* @param ApiBase $module An Api module
+*/
+   protected function checkReadOnly( $module ) {
+   if ( wfReadOnly() ) {
+   $this->dieReadOnly();
+   }
+
+   if ( $module->isWriteMode()
+   && in_array( 'bot', $this->getUser()->getGroups() )
+   && wfGetLB()->getServerCount() > 1
+   ) {
+   // Figure out how many servers have passed the lag 
threshold
+   $numLagged = 0;
+   $lagLimit = $this->getConfig()->get( 
'APIMaxLagThreshold' );
+   foreach ( wfGetLB()->getLagTimes() as $lag ) {
+   if ( $lag > $lagLimit ) {
+   ++$numLagged;
+   }
+   }
+   // If a majority 

[MediaWiki-commits] [Gerrit] Put "Support Wikipedia" in the same Nav group as "Settings" - change (apps...wikipedia)

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

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

Change subject: Put "Support Wikipedia" in the same Nav group as "Settings"
..

Put "Support Wikipedia" in the same Nav group as "Settings"

Per Design request, there should only be a single divider above Settings,
not below.

Bug: T116591
Change-Id: Iccbef6c3c699eb78e137a1e596f0da17932e5cfc
---
M app/src/main/res/menu/menu_nav_drawer.xml
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/res/menu/menu_nav_drawer.xml 
b/app/src/main/res/menu/menu_nav_drawer.xml
index 62a8c3d..8fedd84 100644
--- a/app/src/main/res/menu/menu_nav_drawer.xml
+++ b/app/src/main/res/menu/menu_nav_drawer.xml
@@ -44,8 +44,6 @@
 
-
-
 

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

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

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


[MediaWiki-commits] [Gerrit] Add sanitize wrapper fn to WmfFramework - change (mediawiki...DonationInterface)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add sanitize wrapper fn to WmfFramework
..

Add sanitize wrapper fn to WmfFramework

Change-Id: I1a388d8301b7b5577628c6be10e61b12e87f2b44
---
M gateway_common/MessageUtils.php
M gateway_common/WmfFramework.drupal.php
M gateway_common/WmfFramework.mediawiki.php
3 files changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/gateway_common/MessageUtils.php b/gateway_common/MessageUtils.php
index 77c9fb5..df84960 100644
--- a/gateway_common/MessageUtils.php
+++ b/gateway_common/MessageUtils.php
@@ -91,6 +91,6 @@
$stripped = preg_replace( '/[^-_\w]/', '', $string );
 
// theoretically this is overkill, but better safe than sorry
-   return wfEscapeWikiText( htmlspecialchars( $stripped ) );
+   return WmfFramework::sanitize( htmlspecialchars( $stripped ) );
}
 }
diff --git a/gateway_common/WmfFramework.drupal.php 
b/gateway_common/WmfFramework.drupal.php
index 35b56ac..26e3b98 100644
--- a/gateway_common/WmfFramework.drupal.php
+++ b/gateway_common/WmfFramework.drupal.php
@@ -86,4 +86,8 @@
static function isPosted() {
return false;
}
+
+   static function sanitize( $text ) {
+   return filter_xss( $text );
+   }
 }
diff --git a/gateway_common/WmfFramework.mediawiki.php 
b/gateway_common/WmfFramework.mediawiki.php
index d513c5d..02a355d 100644
--- a/gateway_common/WmfFramework.mediawiki.php
+++ b/gateway_common/WmfFramework.mediawiki.php
@@ -69,4 +69,8 @@
global $wgRequest;
return $wgRequest->wasPosted();
}
+
+   static function sanitize( $text ) {
+   return wfEscapeWikiText( $text );
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Assign IPs for public labtest hosts. - change (operations/dns)

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

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

Change subject: Assign IPs for public labtest hosts.
..

Assign IPs for public labtest hosts.

Change-Id: I4fe10bb58bf9d7ead4f7c149de5f79446c04376a
---
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/55/251655/1

diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index f9c1026..9dd2859 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -47,6 +47,8 @@
 44  1H  IN PTR  nembus.wikimedia.org.
 45  1H  IN PTR  mx2001.wikimedia.org.
 46  1H  IN PTR  wiki-mail-codfw.wikimedia.org.
+47  1H  IN PTR  labtestcontrol2001.wikimedia.org.
+48  1H  IN PTR  labtestservices2001.wikimedia.org.
 
 ; 208.80.153.64/27 (public1-c-codfw)
 65  1H  IN PTR  vrrp-gw-2003.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index c5e5776..2a943db 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -133,6 +133,8 @@
 labcontrol1002  1H  IN A208.80.154.95
 labcontrol2001  1H  IN A208.80.153.14
 labservices1001 1H  IN A208.80.155.117
+labtestcontrol2001  1H  IN A208.80.153.47
+labtestservices2001  1H  IN A208.80.153.48
 lead1H  IN A208.80.154.89
 1H  IN  2620:0:861:3:208:80:154:89
 lvs1001 1H  IN A208.80.154.55
@@ -444,6 +446,7 @@
 
 labs-puppetmaster-eqiad 300 IN CNAME  labcontrol1001.wikimedia.org.
 labs-puppetmaster-codfw 300 IN CNAME  labcontrol2001.wikimedia.org.
+labtest-puppetmaster-codfw 300 IN CNAME  labtestcontrol2001.wikimedia.org.
 
 
 ; don't want this for anything but wikimedia.org domain

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fe10bb58bf9d7ead4f7c149de5f79446c04376a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Explicitly load BaseChecksFileTest in test bootstrap - change (wikimedia...crm)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Explicitly load BaseChecksFileTest in test bootstrap
..

Explicitly load BaseChecksFileTest in test bootstrap

Don't rely on it being in Drupal's cache, since it's missing from
deployment branch.

Change-Id: I6124ae5791aa9589c6749a8bb0228ff247fe3a5f
---
M sites/default/bootstrap-phpunit.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/54/251654/1

diff --git a/sites/default/bootstrap-phpunit.php 
b/sites/default/bootstrap-phpunit.php
index 0df07c8..08a36d1 100644
--- a/sites/default/bootstrap-phpunit.php
+++ b/sites/default/bootstrap-phpunit.php
@@ -2,6 +2,7 @@
 
 define( 'DRUPAL_ROOT', realpath( __DIR__ ) . "/../../drupal" );
 require_once( DRUPAL_ROOT . 
"/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php" 
);
+require_once( DRUPAL_ROOT . 
"/sites/all/modules/offline2civicrm/tests/includes/BaseChecksFileTest.php" );
 
 // Argh.  Crib from _drush_bootstrap_drupal_site_validate
 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';

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

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

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


[MediaWiki-commits] [Gerrit] build: Simplify Grunt configuration - change (mediawiki...RelatedArticles)

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

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

Change subject: build: Simplify Grunt configuration
..

build: Simplify Grunt configuration

* Remove file pattern whitelist for JSHint and JSCS. Instead,
  use the ignore list (which we need to specify anyway to avoid
  errors when using IDE plugins and/or running these from the
  command-line directly.

* Remove redundant '*.json' pattern for banana. '**/*.json' covers
  this already as '**' is recursive from the current directory,
  otherwise it would be '*/**'.

* Remove redundant 'name' and 'version' property. These were likely
  added to suppress warnings by npm-install. However those warnings
  are intended for packages published to npmjs.org. For local build
  tools, adding private:true also suppress these warnings. For
  extensions, name and versions are already maintained in other files
  such as extension.json and others.

* Remove redundant '$' entry in jshintrc. There's no need to tolerate
  use of global variable '$'. The convention is to use 'jQuery' and
  alias it locally, which this extension already does everywhere.

* Set 'jQuery' to false instead of true in jshint globals. True
  means it allows and expects this package to assign or expose
  the 'jQuery' identifier. However that is not the case. If this
  code overwrites jQuery, that should probably trigger a warning,
  thus set to false, which means read-only global.

Change-Id: I0b159b6d684f67933e0dae506db1eb3800a6f192
---
M .jscsrc
M .jshintrc
M Gruntfile.js
M package.json
4 files changed, 6 insertions(+), 12 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index 9d22e3f..3c38e54 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -1,3 +1,4 @@
 {
-   "preset": "wikimedia"
+   "preset": "wikimedia",
+   "excludeFiles": [ "node_modules/**" ]
 }
diff --git a/.jshintrc b/.jshintrc
index a8fc35c..1f58bfc 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -8,14 +8,12 @@
"nonew": true,
"undef": true,
"unused": true,
-   "strict": false,
 
// Environment
"browser": true,
 
"globals": {
"mw": false,
-   "$": false,
-   "jQuery": true
+   "jQuery": false
}
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index aec6ea4..dda371c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,20 +10,16 @@
options: {
jshintrc: true
},
-   all: [
-   '*.js',
-   'resources/**/*.js'
-   ]
+   all: '.'
},
jscs: {
-   src: '<%= jshint.all %>'
+   src: '.'
},
banana: {
all: 'i18n/'
},
jsonlint: {
all: [
-   '*.json',
'**/*.json',
'!node_modules/**'
]
diff --git a/package.json b/package.json
index 9f8f1ab..3c970e6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,5 @@
 {
-  "name": "RelatedArticles",
-  "version": "1.0.1",
+  "private": true,
   "scripts": {
 "test": "grunt test"
   },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b159b6d684f67933e0dae506db1eb3800a6f192
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: dev
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Version saved pages - change (apps...wikipedia)

2015-11-06 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Version saved pages
..

Version saved pages

Pages saved that were downloaded from MW API still need all the original DOM 
transformations,
irrespective of the current "useRestBase" setting.
At the very least, we wouldn't want to move the first paragraph in the lead 
section up twice.
Then the content would be displayed in the wrong order. We want this to happen 
exactly once.

Conversely, pages saved which were downloaded from the Mobile Content Service 
should
only get some of the DOM transformations.

Change-Id: Iadc31079e54c83488c7bf74d792b5b70e06c102f
---
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
M app/src/main/java/org/wikipedia/page/Page.java
A app/src/test/java/org/wikipedia/page/PageTest.java
M app/src/test/java/org/wikipedia/server/BasePageLeadTest.java
4 files changed, 95 insertions(+), 5 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 
b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
index becee7c..48172f6 100644
--- a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
+++ b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
@@ -17,7 +17,6 @@
 import org.wikipedia.pageimages.PageImagesTask;
 import org.wikipedia.savedpages.LoadSavedPageTask;
 import org.wikipedia.search.SearchBarHideHandler;
-import org.wikipedia.settings.Prefs;
 import org.wikipedia.util.DimenUtil;
 import org.wikipedia.util.L10nUtil;
 import org.wikipedia.util.PageLoadUtil;
@@ -572,7 +571,7 @@
 .put("isBeta", app.isPreProdRelease()) // True for any 
non-production release type
 .put("siteLanguage", 
model.getTitle().getSite().getLanguageCode())
 .put("isMainPage", page.isMainPage())
-.put("fromRestBase", Prefs.useRestBase())
+.put("fromRestBase", page.isFromRestBase())
 .put("apiLevel", Build.VERSION.SDK_INT);
 } catch (JSONException e) {
 throw new RuntimeException(e);
diff --git a/app/src/main/java/org/wikipedia/page/Page.java 
b/app/src/main/java/org/wikipedia/page/Page.java
index abf31f3..5102cfd 100755
--- a/app/src/main/java/org/wikipedia/page/Page.java
+++ b/app/src/main/java/org/wikipedia/page/Page.java
@@ -4,6 +4,10 @@
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.wikipedia.page.gallery.GalleryCollection;
+import org.wikipedia.settings.Prefs;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.VisibleForTesting;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -12,6 +16,11 @@
  * Represents a particular page along with its full contents.
  */
 public class Page {
+@VisibleForTesting
+static final int MW_VERSION = 0;
+@VisibleForTesting
+static final int RESTBASE_VERSION = 1;
+
 private final PageTitle title;
 private final List sections;
 private final PageProperties pageProperties;
@@ -23,6 +32,15 @@
  * activity will then be able to retrieve the page's gallery collection 
from cache.
  */
 private GalleryCollection galleryCollection;
+
+/**
+ * An indicator what payload version the page content was originally 
retrieved from.
+ * If it's set to RESTBASE_VERSION the it came from the Mobile Content 
Service
+ * (via RESTBase). This is esp. useful for saved pages, so that an older 
saved page will get the
+ * correct kind of DOM transformations applied.
+ */
+private int version = MW_VERSION;
+
 public GalleryCollection getGalleryCollection() {
 return galleryCollection;
 }
@@ -31,17 +49,39 @@
 }
 
 /** Regular constructor */
-public Page(PageTitle title, List sections, PageProperties 
pageProperties) {
+public Page(@NonNull PageTitle title, @NonNull List sections,
+@NonNull PageProperties pageProperties) {
+if (Prefs.useRestBase()) {
+this.version = RESTBASE_VERSION;
+}
+this.title = title;
+this.sections = sections;
+this.pageProperties = pageProperties;
+}
+
+@VisibleForTesting
+Page(@NonNull PageTitle title, @NonNull List sections,
+ @NonNull PageProperties pageProperties, int version) {
+this.version = version;
 this.title = title;
 this.sections = sections;
 this.pageProperties = pageProperties;
 }
 
 /** Copy constructor */
-public Page(Page orig) {
+public Page(@NonNull Page orig) {
+this.version = orig.version;
 this.title = orig.title;
 this.sections = orig.sections;
 this.pageProperties = orig.pageProperties;
+}
+
+/**
+ * This could also be called getVersion but 

[MediaWiki-commits] [Gerrit] Add an Icinga check for Graphite metric freshness - change (operations/puppet)

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

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

Change subject: Add an Icinga check for Graphite metric freshness
..

Add an Icinga check for Graphite metric freshness

Checks a Graphite metric and generates WARNING or CRITICAL states if the most
recent datapoint is older than the required freshness threshold.

Change-Id: I2dcb8b08f2aa70108ead46c9510cfcb521abe158
---
A modules/monitoring/manifests/graphite_freshness.pp
A modules/nagios_common/files/check_commands/check_graphite_freshness
A modules/nagios_common/files/check_commands/check_graphite_freshness.cfg
M modules/nagios_common/manifests/commands.pp
4 files changed, 141 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/251675/1

diff --git a/modules/monitoring/manifests/graphite_freshness.pp 
b/modules/monitoring/manifests/graphite_freshness.pp
new file mode 100644
index 000..2f4aa3d
--- /dev/null
+++ b/modules/monitoring/manifests/graphite_freshness.pp
@@ -0,0 +1,53 @@
+# == Define: monitoring::graphite_freshness
+#
+# Provisions an Icinga check that ensures a Graphite metric is 'fresh':
+# that is, continuing to receive updates.
+#
+# === Parameters
+#
+# [*metric*]
+#   Graphite metric name. For example: 'reqstats.500'.
+#   Defaults to the resource title.
+#
+# [*warning*]
+#   Warn if most recent datapoint is older than this value.
+#   Value suffix may be one of 's', 'm', 'h' or 'd' for seconds,
+#   minutes, hours, or days, respectively.
+#
+# [*critical*]
+#   Crit if most recent datapoint is older than this value.
+#   Value suffix may be one of 's', 'm', 'h' or 'd' for seconds,
+#   minutes, hours, or days, respectively.
+#
+# [*graphite_url*]
+#   URL of Graphite's render API endpoint.
+#   Defaults to 'https://graphite.wikimedia.org/render'.
+#
+# [*contact_group*]
+#   Icinga contact group that should receive alerts.
+#   Defaults to 'admins'.
+#
+# === Examples
+#
+#  # Emit a warning if most recent datapoint for metric 'reqerror.500'
+#  # is older than 5 minutes, and a critical alert if older than 10.
+#  monitoring::graphite_freshness { 'reqerror.500':
+#warning  => '5m',
+#critical => '10m',
+#  }
+#
+define monitoring::graphite_freshness(
+$warning,
+$critical,
+   $metric= $title,
+$ensure= present,
+$graphite_url  = 'https://graphite.wikimedia.org/render',
+$contact_group = 'admins'
+) {
+monitoring::service { $title:
+ensure=> $ensure,
+description   => "'${metric}' Graphite freshness",
+check_command => 
"check_graphite_freshness!${metric}!${graphite_url}!${warning}!${critical}",
+contact_group => $contact_group,
+}
+}
diff --git 
a/modules/nagios_common/files/check_commands/check_graphite_freshness 
b/modules/nagios_common/files/check_commands/check_graphite_freshness
new file mode 100755
index 000..bc6fb7e
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_graphite_freshness
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+  check_graphite_freshness
+  
+
+  Checks a Graphite metric and generates WARNING or CRITICAL states if
+  the most recent datapoint is older than the required freshness threshold.
+
+  Usage:
+check_graphite_freshness [-w THRESHOLD] [-c THRESHOLD] METRIC RENDER_URL
+
+  Positional arguments:
+METRICmetric name
+RENDER_URLURL of graphite's render API
+
+  Optional arguments:
+-w THRESHOLD, --warning THRESHOLD   warn if most recent datapoint
+is older than this value
+-c THRESHOLD, --critical THRESHOLD  alert if most recent datapoint
+is older than this value
+
+"""
+from __future__ import print_function
+
+import sys
+reload(sys)
+sys.setdefaultencoding("utf-8")
+
+import argparse
+import datetime
+import json
+import time
+import urllib2
+
+
+def time_spec(spec_string):
+"""Parse a time specification string consisting of a number
+followed by an optional letter specifying the unit."""
+units = {'s': 'seconds', 'm': 'minutes', 'h': 'hours', 'd': 'days'}
+if spec_string[-1].isalpha():
+unit = units[spec_string[-1]]
+count = int(spec_string[:-1])
+else:
+unit = 'seconds'
+count = int(spec_string)
+return datetime.timedelta(**{unit: count})
+
+
+ap = argparse.ArgumentParser(description='Graphite staleness alert')
+ap.add_argument('metric', help='metric name')
+ap.add_argument('render_url', help="URL of graphite's render API")
+ap.add_argument('-w', '--warning', type=time_spec, metavar='THRESHOLD',
+help='warn if most recent datapoint is older than this value')
+ap.add_argument('-c', '--critical', type=time_spec, metavar='THRESHOLD',
+  

[MediaWiki-commits] [Gerrit] Hotlink InstantCommons images by default to speed up parsing - change (mediawiki/core)

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

Change subject: Hotlink InstantCommons images by default to speed up parsing
..


Hotlink InstantCommons images by default to speed up parsing

The configuration, tested on wiki.wikimedia.it, generally improves
performance for all parties involved.

Bug: T114098
Change-Id: I76a34e8782908a28523531b2a928ea4ef7710b19
---
M RELEASE-NOTES-1.27
M includes/Setup.php
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 13b9ba2..c2c88d3 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -45,7 +45,11 @@
creation of passwordless "system" users for logged actions.
 * $wgMaxSquidPurgeTitles was removed.
 * $wgAjaxWatch was removed. This is now enabled by default.
-* (T27397) WebP is enabled by default as an uploadable filetype
+* $wgUseInstantCommons now hotlinks Commons images by default instead of 
+  downloading originals and thumbnailing them locally. This allows wikis to 
save
+  on CPU and bandwidth while reducing time to first byte for pages, even 
without
+  a thumbnail handler. See $wgForeignFileRepos documentation for tweaks.
+* (T27397) WebP is enabled by default as an uploadable filetype.
 
 === New features in 1.27 ===
 * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as
diff --git a/includes/Setup.php b/includes/Setup.php
index 0b6b018..69a041e 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -238,7 +238,10 @@
'class' => 'ForeignAPIRepo',
'name' => 'wikimediacommons',
'apibase' => 'https://commons.wikimedia.org/w/api.php',
+   'url' => 'https://upload.wikimedia.org/wikipedia/commons',
+   'thumbUrl' => 
'https://upload.wikimedia.org/wikipedia/commons/thumb',
'hashLevels' => 2,
+   'transformVia404' => true,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
'apiThumbCacheExpiry' => 86400,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76a34e8782908a28523531b2a928ea4ef7710b19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Gergő Tisza 
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 README - change (mediawiki...Gadgets)

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

Change subject: Update README
..


Update README

* Requires 1.27
* require_once is not a function
* BeforePageDisplay does run in modern versions of the CologneBlue skin.
* User code typically runs after Gadgets now, and they do have access to
things defined in gadgets.

Change-Id: I37431940693abdc2df840980025ff517e95f4a09
---
M README
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/README b/README
index 5fb3c35..b7bea4f 100644
--- a/README
+++ b/README
@@ -16,7 +16,7 @@
 they should be mentioned in each file individually.
 
 == Prerequisites ==
-This version of Gadgets requires MediaWiki 1.19 or later. To get a version
+This version of Gadgets requires MediaWiki 1.27 or later. To get a version
 compatible with earlier MediaWiki release, visit
 https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Gadgets
 
@@ -25,7 +25,7 @@
 MediaWiki installation. Then add the following lines to your
 LocalSettings.php file (near the end):
 
-  require_once( "$IP/extensions/Gadgets/Gadgets.php" );
+  require_once "$IP/extensions/Gadgets/Gadgets.php";
 
 == Usage ==
 See http://www.mediawiki.org/wiki/Extension:Gadgets#Usage
@@ -35,8 +35,3 @@
 * Gadgets do not apply to Special:Preferences, Special:UserLogin and
   Special:ResetPass so users can always disable any broken gadgets they
   may have enabled, and malicious gadgets will be unable to steal passwords.
-* Uses BeforePageDisplay hook, thus only works with MonoBook based skins;
-  specifically, does not work with CologneBlue.
-* Gadget code is included after user code - that means that user JS has no
-  access to things defined in gadgets, and user CSS is overwritten by CSS
-  from gadgets. (pending a better way to insert things into the HTML head)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37431940693abdc2df840980025ff517e95f4a09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove unused jquery.visibleText library - change (VisualEditor/VisualEditor)

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

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

Change subject: Remove unused jquery.visibleText library
..

Remove unused jquery.visibleText library

Was here from before the mediawiki/extensions/VisualEditor repository
was split off from VisualEditor core.

There, the use of getVisibleText was phased out in March 2015
with 97d7da664373661.

Change-Id: I34aeeb7f849e98b4a5341dd3a8998d01b8127517
---
D lib/jquery/jquery.visibleText.js
1 file changed, 0 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/80/251680/1

diff --git a/lib/jquery/jquery.visibleText.js b/lib/jquery/jquery.visibleText.js
deleted file mode 100644
index b49d75a..000
--- a/lib/jquery/jquery.visibleText.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * jQuery visibleText plugin 0.1.0
- * https://github.com/Krinkle/jquery-visibleText
- *
- * @author Timo Tijhof, 2012
- * @source This plugin is based on Sizzle.getText.
- *  Copyright 2012 jQuery Foundation and other contributors http://jquery.com/
- * @license MIT License 
- */
-(function ($) {
-
-   /**
-* @param {Array|jQuery|HTMLElement} elem
-*/
-   var getVisibleText = $.getVisibleText = function (elem) {
-   var node,
-   i = 0,
-   ret = '',
-   nodeType = elem.nodeType;
-
-   if (nodeType) {
-   if (nodeType === 1 || nodeType === 9 || nodeType === 
11) {
-   // Traverse the children
-   for (elem = elem.firstChild; elem; elem = 
elem.nextSibling) {
-   ret += $.expr.filters.hidden(elem) ?
-   '' :
-   getVisibleText(elem);
-   }
-   } else if (nodeType === 3 || nodeType === 4) {
-   return elem.nodeValue;
-   }
-   } else {
-
-   // If no nodeType, this is expected to be an array (or 
jQuery object)
-   for (; (node = elem[i]); i++) {
-   ret += getVisibleText(node);
-   }
-   }
-   return ret;
-   };
-
-   $.fn.visibleText = function () {
-   return getVisibleText(this);
-   };
-
-}(jQuery));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34aeeb7f849e98b4a5341dd3a8998d01b8127517
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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 header to flag API POST requests with no write intentions - change (mediawiki/core)

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

Change subject: Add header to flag API POST requests with no write intentions
..


Add header to flag API POST requests with no write intentions

This performs sanity check that request *is* for a non-write module.
By handling the validation, the CDN layer can simply use the presence
of this header to route POST requests to the local datacenter.
Without validation, users could cause strange traffic patterns and slow
cross-DC database writes (which can involve many RTTs).

This is useful for AJAX widgets that need to post a payload to get a
response, but that don't actually change anything in the process. They
should be able to use the local datacenter.

Bug: T91820
Change-Id: I34248ddee33033e3d1d86c3391236259d917d4a7
---
M includes/WebStart.php
M includes/api/ApiMain.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 32 insertions(+), 4 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Anomie: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/WebStart.php b/includes/WebStart.php
index b095577..adce346 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -141,3 +141,25 @@
 if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 
'POST' ) {
ignore_user_abort( true );
 }
+
+if ( !defined( 'MW_API' ) &&
+   RequestContext::getMain()->getRequest()->getHeader( 
'Promise-Non-Write-API-Action' )
+) {
+   header( 'Cache-Control: no-cache' );
+   header( 'Content-Type: text/html; charset=utf-8' );
+   HttpStatus::header( 400 );
+   $error = wfMessage( 'nonwrite-api-promise-error' )->escaped();
+   $content = <<
+
+
+
+$error
+
+
+
+EOT;
+   header( 'Content-Length: ' . strlen( $content ) );
+   echo $content;
+   die();
+}
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index c641c95..86a8a87 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1151,13 +1151,17 @@
if ( $module->isWriteMode() ) {
if ( !$this->mEnableWrite ) {
$this->dieUsageMsg( 'writedisabled' );
-   }
-   if ( !$user->isAllowed( 'writeapi' ) ) {
+   } elseif ( !$user->isAllowed( 'writeapi' ) ) {
$this->dieUsageMsg( 'writerequired' );
-   }
-   if ( wfReadOnly() ) {
+   } elseif ( wfReadOnly() ) {
$this->dieReadOnly();
}
+   if ( $this->getRequest()->getHeader( 
'Promise-Non-Write-API-Action' ) ) {
+   $this->dieUsage(
+   "Promise-Non-Write-API-Action HTTP 
header cannot be sent to write API modules",
+   'promised-nonwrite-api'
+   );
+   }
}
 
// Allow extensions to stop execution for arbitrary reasons.
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index d62913a..c4e7d92 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -323,6 +323,7 @@
"missingarticle-rev": "(revision#: $1)",
"missingarticle-diff": "(Diff: $1, $2)",
"readonly_lag": "The database has been automatically locked while the 
slave database servers catch up to the master",
+   "nonwrite-api-promise-error" : "The 'Promise-Non-Write-API-Action' HTTP 
header was sent but the request was to an API write module.",
"internalerror": "Internal error",
"internalerror_info": "Internal error: $1",
"internalerror-fatal-exception": "Fatal exception of type \"$1\"",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 7298f4e..34240d4 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -497,6 +497,7 @@
"missingarticle-rev": "Used as $2 in 
{{msg-mw|Missing-article}}\n\nPreceded by the page 
title.\n\n[{{canonicalurl:Translating:Tasks|oldid=371789000}} Click here] to 
see an example of such an error message.\n\nParameters:\n* $1 - revision# of 
the requested ID",
"missingarticle-diff": "Used as $2 in 
{{msg-mw|Missing-article}}\n\nPreceded by the page 
title.\n\n[{{canonicalurl:Translating:Tasks|diff=372398=371789000}} Click 
here] to see an example of such an error message.\n\nParameters:\n* $1 - the 
old revision ID\n* $2 - the revision ID to build the diff with",
"readonly_lag": "Error message displayed when the database is locked.",
+   "nonwrite-api-promise-error": "Error message displayed when the 
'Promise-Non-Write-API-Action' HTTP header is misused.",
"internalerror": "{{Identical|Internal 

[MediaWiki-commits] [Gerrit] labtest* hosts pxe and install setup - change (operations/puppet)

2015-11-06 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labtest* hosts pxe and install setup
..

labtest* hosts pxe and install setup

Bug: T117097
Change-Id: Ibeba47ba87c3281eaeb748752285ae6ccf3e71cd
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 43 insertions(+), 0 deletions(-)


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

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index f55cf48..e801b8e 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -86,6 +86,7 @@
labsdb100[45]) echo partman/osmlabsdb.cfg ;; \
labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \
labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \
+   labtest*) echo partman/raid1.cfg ;; \
labvirt100[1-9]) echo partman/virt-hp.cfg ;; \
labvirt101[0-1]) echo partman/labvirt-ssd.cfg ;; \
logstash100[1-3]) echo partman/raid1-lvm-ext4.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 1e58e07..88ba725 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2631,6 +2631,48 @@
fixed-address labservices1001.wikimedia.org;
 }
 
+host labtestcontrol2001 {
+   hardware ethernet 90:B1:1C:23:31:85;
+   fixed-address labtestcontrol2001.wikimedia.org;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestmetal2001 {
+   hardware ethernet 78:2b:cb:49:00:15;
+   fixed-address labtestmetal2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestnet2001 {
+   hardware ethernet 90:B1:1C:23:20:4D;
+   fixed-address labtestnet2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestneutron2001 {
+   hardware ethernet 78:2b:cb:48:f9:61;
+   fixed-address labtestneutron2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestservices2001 {
+   hardware ethernet d4:be:d9:af:68:4f;
+   fixed-address labtestservices2001.wikimedia.org;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestvirt2001 {
+   hardware ethernet 90:B1:1C:2D:7E:B9;
+   fixed-address labtestvirt2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labvirt1001 {
 hardware ethernet 28:80:23:9a:d4:08;
 fixed-address labvirt1001.eqiad.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] Enable DynamicPageList on officewiki - change (operations/mediawiki-config)

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

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

Change subject: Enable DynamicPageList on officewiki
..

Enable DynamicPageList on officewiki

Per Fluffernutter on IRC

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5afe49a..db71a72 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10611,6 +10611,7 @@
'mediawikiwiki' => true, // T71974
'metawiki' => true,
'ptwiki' => true, // T37308
+   'officewiki' => true,
'otrs_wikiwiki' => true,
'outreachwiki' => true, // T58245
'srwiki' => true,

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

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

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


[MediaWiki-commits] [Gerrit] Add getPageCounts.php - change (mediawiki...WikimediaMaintenance)

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

Change subject: Add getPageCounts.php
..


Add getPageCounts.php

This script generates a JSON blob with every public wiki's page counts.
I plan to use it for generating www portals.

Change-Id: Ic2ad196b13488a3123241937ce0ad51ac1e0ba05
(cherry picked from commit 1ee70c3a8ca02d88bddc4d00a8927db3c8db52b7)
---
A getPageCounts.php
1 file changed, 81 insertions(+), 0 deletions(-)

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



diff --git a/getPageCounts.php b/getPageCounts.php
new file mode 100644
index 000..7eeef52
--- /dev/null
+++ b/getPageCounts.php
@@ -0,0 +1,81 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @ingroup Wikimedia
+ */
+
+require_once( __DIR__ . '/WikimediaMaintenance.php' );
+
+class GetPageCounts extends Maintenance {
+   public function __construct() {
+   $this->mDescription = 'Generates machine-readable statistics of 
pages on all wikis in the cluster';
+   parent::__construct();
+   }
+
+   public function execute() {
+   global $wgConf;
+
+   $wikis = $wgConf->getLocalDatabases();
+   $exclude = array_flip( $this->getExcludedWikis() );
+
+   $counts = array();
+   foreach ( $wikis as $wiki ) {
+   $wiki = trim( $wiki );
+   if ( $wiki === '' || $wiki[0] === '#' ) {
+   continue;
+   }
+   if ( isset( $exclude[$wiki] ) ) {
+   continue;
+   }
+   $lb = LBFactory::singleton()->getMainLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE );
+   $row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
+   if ( !$row ) {
+   $this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
+   }
+   $counts[$wiki] = array(
+   'pages' => $row->ss_total_pages,
+   'contentPages' => $row->ss_good_articles
+   );
+   $lb->closeAll();
+   }
+   $this->output( FormatJson::encode( $counts, true ) . "\n" );
+   }
+
+   private function getExcludedWikis() {
+   return $this->dblist( 'private' );
+   }
+
+   private function dblist( $name ) {
+   if ( !defined( 'MEDIAWIKI_DBLIST_DIR' ) ) {
+   $this->error( "Warning: MEDIAWIKI_DBLIST_DIR is not 
defined, no wikis will be blacklisted\n" );
+   return array();
+   }
+   $fileName = MEDIAWIKI_DBLIST_DIR . "/$name.dblist";
+   if ( !is_readable( $fileName ) ) {
+   $this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
+   return array();
+   }
+   return file( $fileName );
+   }
+}
+
+
+$maintClass = 'GetPageCounts';
+require_once( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2ad196b13488a3123241937ce0ad51ac1e0ba05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 
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] resourceloader: Remove obsolete msg_resource_links table - change (mediawiki/core)

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

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

Change subject: resourceloader: Remove obsolete msg_resource_links table
..

resourceloader: Remove obsolete msg_resource_links table

No longer used as of Ia9131f570.

Bug: T113092
Change-Id: If009e2620e59002e127d21b90a96bdd29e5d2a9d
---
M RELEASE-NOTES-1.27
M includes/installer/MssqlUpdater.php
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
M maintenance/archives/patch-msg_resource.sql
M maintenance/mssql/tables.sql
M maintenance/oracle/archives/patch_16_17_schema_changes.sql
M maintenance/oracle/tables.sql
D maintenance/postgres/archives/patch-msg_resource_links.sql
M maintenance/postgres/tables.sql
M maintenance/tables.sql
M tests/parser/parserTest.inc
14 files changed, 18 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/251660/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 13b9ba2..a3f6e8b 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -101,6 +101,7 @@
 * LinkCache::getGoodLinks and LinkCache::getBadLinks were removed (deprecated 
in 1.26).
 * WikiPage::doQuickEdit() was removed (deprecated since 1.21).
 * Removed SiteObject and SiteArray classes (deprecated in 1.21).
+* Removed msg_resource_links table and associated code.
 
 == Compatibility ==
 
diff --git a/includes/installer/MssqlUpdater.php 
b/includes/installer/MssqlUpdater.php
index 164cfab..308f7b0 100644
--- a/includes/installer/MssqlUpdater.php
+++ b/includes/installer/MssqlUpdater.php
@@ -64,6 +64,9 @@
'patch-oi_major_mime-chemical.sql' ),
array( 'modifyField', 'filearchive', 'fa_major_mime',
'patch-fa_major_mime-chemical.sql' ),
+
+   // 1.27
+   array( 'dropTable', 'msg_resource_links' ),
);
}
 
diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index aa60c01..f7beb7c 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -275,6 +275,9 @@
array( 'dropTable', 'hitcounter' ),
array( 'dropField', 'site_stats', 'ss_total_views', 
'patch-drop-ss_total_views.sql' ),
array( 'dropField', 'page', 'page_counter', 
'patch-drop-page_counter.sql' ),
+
+   // 1.27
+   array( 'dropTable', 'msg_resource_links' ),
);
}
 
diff --git a/includes/installer/OracleUpdater.php 
b/includes/installer/OracleUpdater.php
index 03dbd1c..d82009d 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -108,6 +108,9 @@
array( 'dropField', 'site_stats', 'ss_total_views', 
'patch-drop-ss_total_views.sql' ),
array( 'dropField', 'page', 'page_counter', 
'patch-drop-page_counter.sql' ),
 
+   // 1.27
+   array( 'dropTable', 'msg_resource_links' ),
+
// KEEP THIS AT THE BOTTOM!!
array( 'doRebuildDuplicateFunction' ),
 
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index 7414d92..43e9656 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -86,7 +86,6 @@
array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' 
),
array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
array( 'addTable', 'msg_resource', 
'patch-msg_resource.sql' ),
-   array( 'addTable', 'msg_resource_links', 
'patch-msg_resource_links.sql' ),
array( 'addTable', 'module_deps', 
'patch-module_deps.sql' ),
array( 'addTable', 'uploadstash', 
'patch-uploadstash.sql' ),
array( 'addTable', 'user_former_groups', 
'patch-user_former_groups.sql' ),
@@ -424,7 +423,10 @@
array( 'dropTable', 'hitcounter' ),
array( 'dropField', 'site_stats', 'ss_total_views', 
'patch-drop-ss_total_views.sql' ),
array( 'dropField', 'page', 'page_counter', 
'patch-drop-page_counter.sql' ),
-   array( 'dropFkey', 'recentchanges', 'rc_cur_id' )
+   array( 'dropFkey', 'recentchanges', 'rc_cur_id' ),
+
+   // 1.27
+   array( 'dropTable', 'msg_resource_links' ),
);
}
 
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index 0de1fd7..9f992ec 100644
--- a/includes/installer/SqliteUpdater.php
+++ 

[MediaWiki-commits] [Gerrit] Improve LB handling - change (mediawiki...WikimediaMaintenance)

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

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

Change subject: Improve LB handling
..

Improve LB handling

Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
(cherry picked from commit b5a5877d567ab19740419dc8a93e2f6121a53a52)
---
M getPageCounts.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/64/251664/1

diff --git a/getPageCounts.php b/getPageCounts.php
index 7eeef52..7828f74 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -43,8 +43,8 @@
if ( isset( $exclude[$wiki] ) ) {
continue;
}
-   $lb = LBFactory::singleton()->getMainLB( $wiki );
-   $dbr = $lb->getConnection( DB_SLAVE );
+   $lb = wfGetLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE, array(), $wiki );
$row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
if ( !$row ) {
$this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
@@ -53,7 +53,7 @@
'pages' => $row->ss_total_pages,
'contentPages' => $row->ss_good_articles
);
-   $lb->closeAll();
+   $lb->reuseConnection( $dbr );
}
$this->output( FormatJson::encode( $counts, true ) . "\n" );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Trim dblist entries - change (mediawiki...WikimediaMaintenance)

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

Change subject: Trim dblist entries
..


Trim dblist entries

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

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



diff --git a/getPageCounts.php b/getPageCounts.php
index 7828f74..c291903 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -72,7 +72,7 @@
$this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
return array();
}
-   return file( $fileName );
+   return array_map( 'trim', file( $fileName ) );
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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] Stronger check for Object.defineProperty, to handle IE8 - change (mediawiki...CentralNotice)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Stronger check for Object.defineProperty, to handle IE8
..


Stronger check for Object.defineProperty, to handle IE8

Bug: T113013
Change-Id: I60be3232682da64467e86a4c2eae5a53ab107adb
---
M resources/subscribing/ext.centralNotice.display.js
1 file changed, 10 insertions(+), 8 deletions(-)

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



diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 3db7886..8d519ca 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -102,19 +102,21 @@
 */
function setUpDataProperty() {
 
-   if ( typeof Object.defineProperty === 'function' ) {
-
+   // try/catch since some browsers don't support 
Object.defineProperty
+   // or don't support it fully
+   try {
Object.defineProperty( cn, 'data', {
get: function() { return 
cn.internal.state.getData(); }
} );
 
-   } else {
+   return;
 
-   // FIXME For browsers that don't support 
defineProperty, we don't
-   // fully respect our internal contract with the state 
object to
-   // manage data, since we assume the object reference 
won't change.
-   cn.data = cn.internal.state.getData();
-   }
+   } catch (e) {}
+
+   // FIXME For browsers that don't support defineProperty, we 
don't
+   // fully respect our internal contract with the state object to
+   // manage data, since we assume the object reference won't 
change.
+   cn.data = cn.internal.state.getData();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60be3232682da64467e86a4c2eae5a53ab107adb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
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] Allow notification model and widget to show combined notific... - change (mediawiki...Echo)

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

Change subject: Allow notification model and widget to show combined 
notifications
..


Allow notification model and widget to show combined notifications

Make sure it's possible to create a combined notification widget
that features both alerts and messages.

Change-Id: I4b3f263039f54430a61acc1a261d8aca8e894a90
---
M modules/viewmodel/mw.echo.dm.APIHandler.js
M modules/viewmodel/mw.echo.dm.AbstractAPIHandler.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
3 files changed, 62 insertions(+), 35 deletions(-)

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



diff --git a/modules/viewmodel/mw.echo.dm.APIHandler.js 
b/modules/viewmodel/mw.echo.dm.APIHandler.js
index f7f9380..7818daa 100644
--- a/modules/viewmodel/mw.echo.dm.APIHandler.js
+++ b/modules/viewmodel/mw.echo.dm.APIHandler.js
@@ -46,10 +46,14 @@
/**
 * @inheritdoc
 */
-   mw.echo.dm.APIHandler.prototype.updateSeenTime = function () {
+   mw.echo.dm.APIHandler.prototype.updateSeenTime = function ( type ) {
+   type = type || this.type;
+
return this.api.postWithToken( 'edit', {
action: 'echomarkseen',
-   type: this.type
+   // TODO: The API should also work with piped types like
+   // getting notification lists
+   type: $.isArray( type ) ? 'all' : type
} )
.then( function ( data ) {
return data.query.echomarkseen.timestamp;
diff --git a/modules/viewmodel/mw.echo.dm.AbstractAPIHandler.js 
b/modules/viewmodel/mw.echo.dm.AbstractAPIHandler.js
index 2c0204b..1ce0a38 100644
--- a/modules/viewmodel/mw.echo.dm.AbstractAPIHandler.js
+++ b/modules/viewmodel/mw.echo.dm.AbstractAPIHandler.js
@@ -51,6 +51,8 @@
/**
 * Update the seen timestamp
 *
+* @param {string|string[]} [type] Notification type 'message', 'alert' 
or
+*  an array of both.
 * @return {jQuery.Promise} A promise that resolves with the seen 
timestamp
 */
mw.echo.dm.AbstractAPIHandler.prototype.updateSeenTime = null;
diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 2e57476..28f70ea 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -8,7 +8,8 @@
 * @constructor
 * @param {mw.echo.dm.AbstractAPIHandler} apiHandler API handler
 * @param {Object} [config] Configuration object
-* @cfg {string} [type='alert'] Notification type 'alert', 'message' or 
'all'
+* @cfg {string|string[]} [type='alert'] Notification type 'alert', 
'message'
+*  or an array [ 'alert', 'message' ]
 * @cfg {number} [limit=25] Notification limit
 * @cfg {string} [userLang] User language
 */
@@ -150,9 +151,9 @@
 
/**
 * Get the type of the notifications that this model deals with.
-* Notifications type are given from the API: 'alert', 'message', 'all'
+* Notifications types can be 'alert', 'message' or an array of both.
 *
-* @return {string} Notifications type
+* @return {string|string[]} Notifications type
 */
mw.echo.dm.NotificationsModel.prototype.getType = function () {
return this.type;
@@ -183,27 +184,39 @@
 * @param {string} Mediawiki seen timestamp in Mediawiki timestamp 
format
 */
mw.echo.dm.NotificationsModel.prototype.setSeenTime = function ( time ) 
{
-   this.seenTime[ this.type ] = time;
+   var i,
+   type = $.isArray( this.type ) ? this.type : [ this.type 
];
+
+   for ( i = 0; i < type.length; i++ ) {
+   // Update all types
+   this.seenTime[ type[ i ] ] = time;
+   }
};
 
/**
 * Get the system seen time
 *
+* @param {string} [type] Notification type
 * @return {string} Mediawiki seen timestamp in Mediawiki timestamp 
format
 */
-   mw.echo.dm.NotificationsModel.prototype.getSeenTime = function () {
-   return this.seenTime[ this.type ];
+   mw.echo.dm.NotificationsModel.prototype.getSeenTime = function ( type ) 
{
+   type = type || ( $.isArray( this.type ) ? this.type[ 0 ] : 
this.type );
+
+   return this.seenTime[ type ];
};
 
/**
 * Update the seen timestamp
 *
+* @param {string|string[]} [type] Notification type
 * @return {jQuery.Promise} A promise that resolves with the seen 
timestamp
 * @fires updateSeenTime
 */
-   

[MediaWiki-commits] [Gerrit] Enable Flow user opt-in Beta Feature on Wikidata - change (operations/mediawiki-config)

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

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

Change subject: Enable Flow user opt-in Beta Feature on Wikidata
..

Enable Flow user opt-in Beta Feature on Wikidata

Bug: T116611
Change-Id: I9d88731a446f33889f1a738d5b3f1687f09a6a68
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5afe49a..f35ff71 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14810,6 +14810,7 @@
'testwiki' => true,
'mediawikiwiki' => true,
'zhwiki' => true,
+   'wikidatawiki' => true,
 ),
 'wmgUseDisambiguator' => array(
'default' => true,

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

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

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


[MediaWiki-commits] [Gerrit] Add wrapper class for Monolog\Formatter\LogstashFormatter - change (mediawiki/core)

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

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

Change subject: Add wrapper class for Monolog\Formatter\LogstashFormatter
..

Add wrapper class for Monolog\Formatter\LogstashFormatter

Monolog 1.17.2 includes a behavior change that can cause
RuntimeExceptions when a log event containing strings that are not
encoded in UTF-8 or contain invalid UTF-8 sequences is created. The
MediaWiki\Logger\Monolog\LogstashFormatter will catch these exceptions
and convert them to notices instead.

Bug: T118057
Change-Id: Iba8c160d1c22480ec2ce462f229dba85183504b7
---
M autoload.php
A includes/debug/logger/monolog/LogstashFormatter.php
2 files changed, 46 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/251679/1

diff --git a/autoload.php b/autoload.php
index b27ce46..04dc7fc 100644
--- a/autoload.php
+++ b/autoload.php
@@ -763,6 +763,7 @@
'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . 
'/includes/debug/logger/monolog/LegacyFormatter.php',
'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . 
'/includes/debug/logger/monolog/LegacyHandler.php',
'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . 
'/includes/debug/logger/monolog/LineFormatter.php',
+   'MediaWiki\\Logger\\Monolog\\LogstashFormatter' => __DIR__ . 
'/includes/debug/logger/monolog/LogstashFormatter.php',
'MediaWiki\\Logger\\Monolog\\SyslogHandler' => __DIR__ . 
'/includes/debug/logger/monolog/SyslogHandler.php',
'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . 
'/includes/debug/logger/monolog/WikiProcessor.php',
'MediaWiki\\Logger\\NullSpi' => __DIR__ . 
'/includes/debug/logger/NullSpi.php',
diff --git a/includes/debug/logger/monolog/LogstashFormatter.php 
b/includes/debug/logger/monolog/LogstashFormatter.php
new file mode 100644
index 000..d6c129f
--- /dev/null
+++ b/includes/debug/logger/monolog/LogstashFormatter.php
@@ -0,0 +1,45 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Logger\Monolog;
+
+use Monolog\Formatter\LogstashFormatter as MonologLogstashFormatter;
+
+/**
+ * Wrap the default Monolog formatter to prevent encoding errors from leaking
+ * out.
+ *
+ * @since 1.27
+ * @author Bryan Davis 
+ * @copyright © 2015 Bryan Davis and Wikimedia Foundation.
+ */
+class LogstashFormatter extends MonologLogstashFormatter {
+
+   /**
+* {@inheritdoc}
+*/
+   public function format( array $record ) {
+   try {
+   return parent::format( $record );
+   } catch ( \RuntimeException $e ) {
+   trigger_error( $e );
+   }
+   }
+}

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

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

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


[MediaWiki-commits] [Gerrit] Show "redirected from..." headers on OW pages - change (mediawiki...WikiLexicalData)

2015-11-06 Thread Purodha (Code Review)
Purodha has uploaded a new change for review.

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

Change subject: Show "redirected from..." headers on OW pages
..

Show "redirected from..." headers on OW pages

This leaves T118066 open (red links for valid non-canonical DM page names)

Bug: T64489
Change-Id: I01126069431b0fc1613b7b9853a2981e8b354c93
---
M includes/WikidataArticle.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData 
refs/changes/83/251683/1

diff --git a/includes/WikidataArticle.php b/includes/WikidataArticle.php
index 9af62f3..c7ab8e7 100644
--- a/includes/WikidataArticle.php
+++ b/includes/WikidataArticle.php
@@ -9,6 +9,7 @@
$ns = $this->mTitle->getNamespace();
$handlerClass = $wdHandlerClasses[ $ns ];
$handlerInstance = new $handlerClass( $this->mTitle );
+   $this->showRedirectedFromHeader();
$handlerInstance->view();
 
wfProfileOut( __METHOD__ );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01126069431b0fc1613b7b9853a2981e8b354c93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Purodha 

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


[MediaWiki-commits] [Gerrit] [WIP] resourceloader: Remove msg_resource_links - change (mediawiki/core)

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

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

Change subject: [WIP] resourceloader: Remove msg_resource_links
..

[WIP] resourceloader: Remove msg_resource_links

This table is not needed because module names and their messages
array are available to the runtime environment at very little cost.

The only purpose it was serving is reverse lookup from message
key to module name (e.g. when MessageCache receives update that
need to propagate to MessageBlobStore). However that is better
achieved by simply looping through modules in PHP. The overhead
of MySQL is not worth it.

MessageBlobStore
* insertMessageBlob: Doesn't need to update msg_resource_links.
* updateModule: Doesn't need to update msg_resource_links.
* getUpdatesForMessage: Reimplement with list from memory
  instead of msg_resource_links.

Bug: T113092
Change-Id: Ia9131f570001f00c9800b260ac4b3469d54d2784
---
M includes/cache/MessageBlobStore.php
M includes/cache/MessageCache.php
M includes/resourceloader/ResourceLoader.php
M maintenance/cleanupRemovedModules.php
M maintenance/tables.sql
M tests/parser/parserTest.inc
6 files changed, 59 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/251656/1

diff --git a/includes/cache/MessageBlobStore.php 
b/includes/cache/MessageBlobStore.php
index 6290eae..ab7e171 100644
--- a/includes/cache/MessageBlobStore.php
+++ b/includes/cache/MessageBlobStore.php
@@ -41,6 +41,16 @@
 */
protected $blobCache = array();
 
+   /* @var ResourceLoader */
+   protected $resourceloader;
+
+   /**
+* @param ResourceLoader $resourceloader
+*/
+   public function __construct( ResourceLoader $resourceloader = null ) {
+   $this->resourceloader = $resourceloader;
+   }
+
/**
 * Get the singleton instance
 *
@@ -131,29 +141,14 @@
array( 'IGNORE' )
);
 
-   if ( $success ) {
-   if ( $dbw->affectedRows() == 0 ) {
-   // Blob was already present, fetch it
-   $blob = $dbw->selectField( 
'msg_resource', 'mr_blob', array(
-   'mr_resource' => $name,
-   'mr_lang' => $lang,
-   ),
-   __METHOD__
-   );
-   } else {
-   // Update msg_resource_links
-   $rows = array();
-
-   foreach ( $module->getMessages() as 
$key ) {
-   $rows[] = array(
-   'mrl_resource' => $name,
-   'mrl_message' => $key
-   );
-   }
-   $dbw->insert( 'msg_resource_links', 
$rows,
-   __METHOD__, array( 'IGNORE' )
-   );
-   }
+   if ( $success && $dbw->affectedRows() == 0 ) {
+   // Blob was already present, fetch it
+   $blob = $dbw->selectField( 'msg_resource', 
'mr_blob', array(
+   'mr_resource' => $name,
+   'mr_lang' => $lang,
+   ),
+   __METHOD__
+   );
}
} catch ( DBError $e ) {
wfDebug( __METHOD__ . " failed to update DB: $e\n" );
@@ -180,8 +175,6 @@
return null;
}
 
-   // Save the old and new blobs for later
-   $oldBlob = $row->mr_blob;
$newBlob = $this->generateMessageBlob( $module, $lang );
 
try {
@@ -196,36 +189,6 @@
array( array( 'mr_resource', 'mr_lang' ) ),
$newRow, __METHOD__
);
-
-   // Figure out which messages were added and removed
-   $oldMessages = array_keys( FormatJson::decode( 
$oldBlob, true ) );
-   $newMessages = array_keys( FormatJson::decode( 
$newBlob, true ) );
-   $added = array_diff( $newMessages, $oldMessages );
-   $removed = array_diff( $oldMessages, $newMessages );
-
-  

[MediaWiki-commits] [Gerrit] Fix a variety of bugs - change (mediawiki...HitCounters)

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

Change subject: Fix a variety of bugs
..


Fix a variety of bugs

* Cache #'s for only 1min if they're less than 100.
* Format hit views/edit properly.
* Don't use cached # for first hit for any page.
* Link title and give ns.
* Clean up line lengths.

Bug: T101595
Bug: T105860
Bug: T105861
Bug: T109180
Change-Id: I143384f5b16373434cc7c07e9aeb887c0d25a73b
---
M HitCounters.body.php
M HitCounters.hooks.php
2 files changed, 74 insertions(+), 39 deletions(-)

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



diff --git a/HitCounters.body.php b/HitCounters.body.php
index 7b95a1f..cba4fc7 100644
--- a/HitCounters.body.php
+++ b/HitCounters.body.php
@@ -11,6 +11,16 @@
 class HitCounters {
protected static $mViews;
 
+   protected static function cacheStore( $cache, $key, $views ) {
+   if ( $views < 100 ) {
+   // Only cache for a minute
+   $cache->set( $key, $views, 60 );
+   } else {
+   /* update only once a day */
+   $cache->set( $key, $views, 24 * 3600 );
+   }
+   }
+
/**
 * @return int The view count for the page
 */
@@ -30,30 +40,23 @@
$cache = wfGetCache( CACHE_ANYTHING );
$key = wfMemcKey( 'viewcount', $title->getDBkey() );
$views = $cache->get( $key );
-   wfDebugLog( "HitCounters", "Got viewcount=" . var_export( 
$views, true ) .
-   " from cache" );
+   wfDebugLog( "HitCounters", "Got viewcount=" .
+   var_export( $views, true ) . " from cache" );
 
-   if ( !$views ) {
+   if ( !$views || $views == 1 ) {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->select(
array( 'hit_counter' ),
array( 'hits' => 'page_counter' ),
array( 'page_id' => $title->getArticleID() ),
__METHOD__ );
-   wfDebugLog( "HitCounters", "Got result=" . var_export( 
$row, true ) .
-   " from DB and setting cache." );
 
if ( $row !== false && $current = $row->current() ) {
$views = $current->hits;
-   wfDebugLog( "HitCounters", "Got result=" . 
var_export( $current, true ) .
+   wfDebugLog( "HitCounters", "Got result=" .
+   var_export( $current, true ) .
" from DB and setting cache." );
-   if ( $views < 100 ) {
-   // Only cache for a minute
-   $cache->set( $key, $views, 60 );
-   } else {
-   /* update only once a day */
-   $cache->set( $key, $views, 24 * 3600 );
-   }
+   self::cacheStore( $cache, $key, $views );
}
}
 
@@ -67,15 +70,18 @@
// Re-calculate the count if the last tally is old...
if ( !self::$mViews ) {
self::$mViews = $cache->get( $key );
-   wfDebugLog( "HitCounters", __METHOD__ . ": got " . 
var_export( self::$mViews, true ) .
+   wfDebugLog( "HitCounters", __METHOD__
+   . ": got " . var_export( self::$mViews, true ) .
" from cache." );
-   if ( !self::$mViews ) {
+   if ( !self::$mViews || self::$mViews == 1 ) {
$dbr = wfGetDB( DB_SLAVE );
-   self::$mViews = $dbr->selectField( 
'hit_counter', 'SUM(page_counter)', '',
-   __METHOD__ );
-   wfDebugLog( "HitCounters", __METHOD__ . ": got 
" . var_export( self::$mViews, true ) .
+   self::$mViews = $dbr->selectField(
+   'hit_counter', 'SUM(page_counter)', '', 
__METHOD__
+   );
+   wfDebugLog( "HitCounters", __METHOD__ . ": got 
" .
+   var_export( self::$mViews, true ) .
" from select." );
-   $cache->set( $key, self::$mViews, 24 * 3600 ); 
// don't update for 1 day
+   self::cacheStore( $cache, $key, self::$mViews );
}
}
   

[MediaWiki-commits] [Gerrit] Improve LB handling - change (mediawiki...WikimediaMaintenance)

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

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

Change subject: Improve LB handling
..

Improve LB handling

Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
---
M getPageCounts.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/getPageCounts.php b/getPageCounts.php
index 7eeef52..7828f74 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -43,8 +43,8 @@
if ( isset( $exclude[$wiki] ) ) {
continue;
}
-   $lb = LBFactory::singleton()->getMainLB( $wiki );
-   $dbr = $lb->getConnection( DB_SLAVE );
+   $lb = wfGetLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE, array(), $wiki );
$row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
if ( !$row ) {
$this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
@@ -53,7 +53,7 @@
'pages' => $row->ss_total_pages,
'contentPages' => $row->ss_good_articles
);
-   $lb->closeAll();
+   $lb->reuseConnection( $dbr );
}
$this->output( FormatJson::encode( $counts, true ) . "\n" );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Copy context request changes to wgRequest global - change (mediawiki...ConfirmEdit)

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

Change subject: Copy context request changes to wgRequest global
..


Copy context request changes to wgRequest global

Bug: T118052
Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
---
M SimpleCaptcha/Captcha.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index d1170ba..71c32ca 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -575,12 +575,17 @@
 * @return bool false if the CAPTCHA is rejected, true otherwise
 */
private function doConfirmEdit( WikiPage $page, $newtext, $section, 
IContextSource $context ) {
+   global $wgRequest;
$request = $context->getRequest();
+   // FIXME: Stop using wgRequest in other parts of ConfirmEdit so 
we can
+   // stop having to duplicate code for it.
if ( $request->getVal( 'captchaid' ) ) {
$request->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
+   $wgRequest->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
}
if ( $request->getVal( 'captchaword' ) ) {
$request->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
+   $wgRequest->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
}
if ( $this->shouldCheck( $page, $newtext, $section, $context ) 
) {
return $this->passCaptchaLimited();
@@ -856,7 +861,6 @@
 
$info = $this->retrieveCaptcha( $wgRequest );
if ( $info ) {
-   global $wgRequest;
if ( $this->keyMatch( $wgRequest->getVal( 
'wpCaptchaWord' ), $info ) ) {
$this->log( "passed" );
$this->clearCaptcha( $info );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Implement SortedList in Echo notifications - change (mediawiki...Echo)

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

Change subject: Implement SortedList in Echo notifications
..


Implement SortedList in Echo notifications

This is especially important for combined notifications and
notification lists from different sources; the model list should
be sorted to reflect items by timestamp and unread status.

Note: The dm.List and dm.SortedList now mirror the structures
OO.EmitterList and OO.SortedEmitterList that are awaiting to be
added for oojs in Ib94e4e4a49 and  I3fd569691549 respectively.
Once those are available, the dm.List and dm.SortedList can
be removed, and the model can mixin OO.SortedEmitterList instead.

Change-Id: I97e1ecbe5dccc478be527a94f037500f78f74b14
---
M Resources.php
M modules/ooui/mw.echo.ui.NotificationsWidget.js
M modules/viewmodel/mw.echo.dm.List.js
M modules/viewmodel/mw.echo.dm.NotificationItem.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
A modules/viewmodel/mw.echo.dm.SortedList.js
M tests/qunit/viewmodel/test_mw.echo.dm.NotificationsModel.js
7 files changed, 487 insertions(+), 180 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index a456201..9bbe643 100644
--- a/Resources.php
+++ b/Resources.php
@@ -88,6 +88,7 @@
'viewmodel/mw.echo.dm.AbstractAPIHandler.js',
'viewmodel/mw.echo.dm.APIHandler.js',
'viewmodel/mw.echo.dm.List.js',
+   'viewmodel/mw.echo.dm.SortedList.js',
'viewmodel/mw.echo.dm.NotificationList.js',
'viewmodel/mw.echo.dm.NotificationsModel.js',
),
diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js 
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 435c57f..10712af 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -1,4 +1,4 @@
-( function ( mw, $ ) {
+( function ( mw ) {
/**
 * Notification widget for echo popup.
 *
@@ -45,32 +45,24 @@
/**
 * Respond to model add event
 *
-* @param {mw.echo.dm.NotificationItem[]} Added notification items
+* @param {mw.echo.dm.NotificationItem} Added notification item
+* @param {number} index Index to add the item
 */
-   mw.echo.ui.NotificationsWidget.prototype.onModelNotificationAdd = 
function ( notificationItems, index ) {
-   var i, len, widget,
-   $elements = $(),
-   optionWidgets = [];
-
-   for ( i = 0, len = notificationItems.length; i < len; i++ ) {
-   widget = new mw.echo.ui.NotificationOptionWidget(
-   notificationItems[ i ],
+   mw.echo.ui.NotificationsWidget.prototype.onModelNotificationAdd = 
function ( notificationItem, index ) {
+   var widget = new mw.echo.ui.NotificationOptionWidget(
+   notificationItem,
{
markReadWhenSeen: this.markReadWhenSeen
}
);
-   optionWidgets.push( widget );
-   // Collect the elements for the hook firing
-   $elements = $elements.add( widget.$element );
-   }
 
// Fire hook for gadgets to update the option list
-   mw.hook( 'ext.echo.overlay.beforeShowingOverlay' ).fire( 
$elements );
+   mw.hook( 'ext.echo.overlay.beforeShowingOverlay' ).fire( 
widget.$element );
 
// Remove dummy option
this.removeItems( [ this.loadingOptionWidget ] );
 
-   this.addItems( optionWidgets, index );
+   this.addItems( [ widget ], index );
};
 
/**
@@ -99,22 +91,18 @@
/**
 * Respond to model add event
 *
-* @param {mw.echo.dm.NotificationItem[]} Removed notification items
+* @param {mw.echo.dm.NotificationItem} notificationItem Removed 
notification items
 */
-   mw.echo.ui.NotificationsWidget.prototype.onModelNotificationRemove = 
function ( notificationItems ) {
-   var i, len, widget, items,
-   removalWidgets = [];
+   mw.echo.ui.NotificationsWidget.prototype.onModelNotificationRemove = 
function ( notificationItem ) {
+   var widget, items;
 
-   for ( i = 0, len = notificationItems.length; i < len; i++ ) {
-   widget = this.getItemById( notificationItems[ i 
].getId() );
-   if ( widget && typeof widget.destroy === 'function' ) {
-   // Destroy all widgets that can be destroyed
-   widget.destroy();
-

[MediaWiki-commits] [Gerrit] [WIP]Set password policy for enwiki sysops - change (operations/mediawiki-config)

2015-11-06 Thread CSteipp (Code Review)
CSteipp has uploaded a new change for review.

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

Change subject: [WIP]Set password policy for enwiki sysops
..

[WIP]Set password policy for enwiki sysops

Consensus seems to be forming that at minimum, sysops should have a
6-8 character password.

* Might include Functionary group
* Might include a check against most-popular passwords

https://en.wikipedia.org/wiki/Wikipedia:Security_review_RfC

Change-Id: I16b96c1b6c893bdacd7aded4b972585b692258b8
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 16 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5587324..0655f9e 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -319,9 +319,11 @@
 // Temporarily set the policy for these roles to the previous WMF setting until
 // we communicate the change to affected communities.
 $wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 1;
-$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 1;
 $wgPasswordPolicy['policies']['bot']['MinimalPasswordLength'] = 1;
 
+// Set password policy at the request of the affected groups
+$wgPasswordPolicy['policies']['sysop'] = $wmgLocalSysopPasswordPolicy;
+
 if ( PHP_SAPI === 'cli' ) {
$wgShowExceptionDetails = true;
 }
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 301b51b..ffb7c58 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4197,6 +4197,19 @@
'plwiki' => array( 'editor', 'sysop' ), // T50374
 ),
 
+'wmgLocalSysopPasswordPolicy' => array(
+   'default' => array(
+   'MinimalPasswordLength' => 1,
+   'MinimumPasswordLengthToLogin' => 1,
+   'PasswordCannotMatchUsername' => true,
+   ),
+   'enwiki' => array(
+'MinimalPasswordLength' => 8,
+'MinimumPasswordLengthToLogin' => 1,
+'PasswordCannotMatchUsername' => true,
+),
+),
+
 'wgSiteNotice' => array(
'default' => '',
 ),

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

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

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


[MediaWiki-commits] [Gerrit] lib: Add AUTHORS, LICENSE and README files for libraries mis... - change (VisualEditor/VisualEditor)

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

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

Change subject: lib: Add AUTHORS, LICENSE and README files for libraries 
missing them
..

lib: Add AUTHORS, LICENSE and README files for libraries missing them

Change-Id: Ic8af49feba48ae0d8d21efd38e618210761cc8cb
---
A lib/jquery/AUTHORS.txt
A lib/jquery/MIT-LICENSE.txt
A lib/jquery/README.md
A lib/oojs-ui/AUTHORS.txt
A lib/oojs-ui/LICENSE-MIT.txt
A lib/oojs-ui/README.md
A lib/oojs/AUTHORS.txt
A lib/oojs/LICENSE-MIT.txt
A lib/oojs/README.md
A lib/rangefix/LICENSE.txt
A lib/rangefix/README.md
A lib/unicodejs/AUTHORS.txt
A lib/unicodejs/LICENSE.txt
A lib/unicodejs/README.md
14 files changed, 1,026 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/82/251682/1

diff --git a/lib/jquery/AUTHORS.txt b/lib/jquery/AUTHORS.txt
new file mode 100644
index 000..14a0e68
--- /dev/null
+++ b/lib/jquery/AUTHORS.txt
@@ -0,0 +1,217 @@
+Authors ordered by first contribution.
+
+John Resig 
+Gilles van den Hoven 
+Michael Geary 
+Stefan Petre 
+Yehuda Katz 
+Corey Jewett 
+Klaus Hartl 
+Franck Marcia 
+Jörn Zaefferer 
+Paul Bakaus 
+Brandon Aaron 
+Mike Alsup 
+Dave Methvin 
+Ed Engelhardt 
+Sean Catchpole 
+Paul Mclanahan 
+David Serduke 
+Richard D. Worth 
+Scott González 
+Ariel Flesler 
+Jon Evans 
+TJ Holowaychuk 
+Michael Bensoussan 
+Robert Katić 
+Louis-Rémi Babé 
+Earle Castledine 
+Damian Janowski 
+Rich Dougherty 
+Kim Dalsgaard 
+Andrea Giammarchi 
+Mark Gibson 
+Karl Swedberg 
+Justin Meyer 
+Ben Alman 
+James Padolsey 
+David Petersen 
+Batiste Bieler 
+Alexander Farkas 
+Rick Waldron 
+Filipe Fortes 
+Neeraj Singh 
+Paul Irish 
+Iraê Carvalho 
+Matt Curry 
+Michael Monteleone 
+Noah Sloan 
+Tom Viner 
+Douglas Neiner 
+Adam J. Sontag 
+Dave Reed 
+Ralph Whitbeck 
+Carl Fürstenberg 
+Jacob Wright 
+J. Ryan Stinnett 
+unknown 
+temp01 
+Heungsub Lee 
+Colin Snover 
+Ryan W Tenney 
+Pinhook 
+Ron Otten 
+Jephte Clain 
+Anton Matzneller 
+Alex Sexton 
+Dan Heberden 
+Henri Wiechers 
+Russell Holbrook 
+Julian Aubourg 
+Gianni Alessandro Chiappetta 
+Scott Jehl 
+James Burke 
+Jonas Pfenniger 
+Xavi Ramirez 
+Jared Grippe 
+Sylvester Keil 
+Brandon Sterne 
+Mathias Bynens 
+Timmy Willison 
+Corey Frang 
+Digitalxero 
+Anton Kovalyov 
+David Murdoch 
+Josh Varner 
+Charles McNulty 
+Jordan Boesch 
+Jess Thrysoee 
+Michael Murray 
+Lee Carpenter 
+Alexis Abril 
+Rob Morgan 
+John Firebaugh 
+Sam Bisbee 
+Gilmore Davidson 
+Brian Brennan 
+Xavier Montillet 
+Daniel Pihlstrom 
+Sahab Yazdani 
+avaly 
+Scott Hughes 
+Mike Sherov 
+Greg Hazel 
+Schalk Neethling 
+Denis Knauf 

[MediaWiki-commits] [Gerrit] RL: Some fiexes for ExtJS RL implementation - change (mediawiki...BlueSpiceExtensions)

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

Change subject: RL: Some fiexes for ExtJS RL implementation
..


RL: Some fiexes for ExtJS RL implementation

* ContextMenu loads ExtJS only when user actually tries to open a context
  menu
* Review loads ExtJS on SpecialPage

Change-Id: I874e2576b4ecfae3600607d1546eb41a42b9ddf7
---
M ContextMenu/resources/bluespice.contextmenu.js
M Review/Review.setup.php
2 files changed, 26 insertions(+), 21 deletions(-)

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



diff --git a/ContextMenu/resources/bluespice.contextmenu.js 
b/ContextMenu/resources/bluespice.contextmenu.js
index 2a84605..3c11244 100644
--- a/ContextMenu/resources/bluespice.contextmenu.js
+++ b/ContextMenu/resources/bluespice.contextmenu.js
@@ -222,33 +222,37 @@
return true;
}
 
-   var items = [];
+   mw.loader.using( 'ext.bluespice.extjs', function() {
+   var items = [];
 
-   var mediaItems = makeMediaItems( anchor );
-   if( mediaItems.length > 0 ) {
-   items = appendSection( items, mediaItems );
-   }
+   var mediaItems = makeMediaItems( anchor );
+   if( mediaItems.length > 0 ) {
+   items = appendSection( items, mediaItems );
+   }
 
-   var userItems = makeUserItems( anchor );
-   if( userItems.length > 0 ) {
-   items = appendSection( items, userItems );
-   }
+   var userItems = makeUserItems( anchor );
+   if( userItems.length > 0 ) {
+   items = appendSection( items, userItems );
+   }
 
-   var fileItems = makeFileItems( anchor );
-   if( fileItems.length > 0 ) {
-   items = appendSection( items, fileItems );
-   }
+   var fileItems = makeFileItems( anchor );
+   if( fileItems.length > 0 ) {
+   items = appendSection( items, fileItems );
+   }
 
-   var pageItems = makePageItems( anchor );
-   if( pageItems.length > 0 ) {
-   items = appendSection( items, pageItems );
-   }
+   var pageItems = makePageItems( anchor );
+   if( pageItems.length > 0 ) {
+   items = appendSection( items, pageItems );
+   }
 
-   if( items.length === 0 ) {
-   return true;
-   }
+   if( items.length === 0 ) {
+   return true;
+   }
 
-   return showMenu( anchor, items, e );
+   showMenu( anchor, items, e );
+   });
+
+   return false;
});
 
 })( mediaWiki, jQuery, blueSpice);
\ No newline at end of file
diff --git a/Review/Review.setup.php b/Review/Review.setup.php
index 9344a7f..ee6ac84 100644
--- a/Review/Review.setup.php
+++ b/Review/Review.setup.php
@@ -37,6 +37,7 @@
 $wgResourceModules['ext.bluespice.review.overview'] = array(
'scripts' => 'bluespice.review.overview.js',
'dependencies' => array (
+   'ext.bluespice.extjs',
'ext.bluespice.review',
'mediawiki.Title'
),

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

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

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


[MediaWiki-commits] [Gerrit] Don't prevent clicks on links in section headings - change (mediawiki...MobileFrontend)

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

Change subject: Don't prevent clicks on links in section headings
..


Don't prevent clicks on links in section headings

It's very common to use links in section headings, so don't
prevent a click on it, by toggling the section, if the user
instead want to follow the link.

Bug: T117880
Change-Id: I06882ec11d9ce78d15e8d3dfd6a117cb9d0c844a
---
M resources/mobile.toggle/toggle.js
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/resources/mobile.toggle/toggle.js 
b/resources/mobile.toggle/toggle.js
index cd8a2dd..3ef04af 100644
--- a/resources/mobile.toggle/toggle.js
+++ b/resources/mobile.toggle/toggle.js
@@ -272,9 +272,12 @@
'aria-controls': id
} )
.on( 'click', function ( ev ) {
-   // prevent taps/clicks on edit 
button after toggling (bug 56209)
-   ev.preventDefault();
-   self.toggle.call( self, $( this 
) );
+   // don't toggle, if the click 
target was a link (a link in a section heading) - T117880
+   if ( !ev.target.href ) {
+   // prevent taps/clicks 
on edit button after toggling (bug 56209)
+   ev.preventDefault();
+   self.toggle.call( self, 
$( this ) );
+   }
} );
indicator = new Icon( arrowDownOptions 
).prependTo( $heading );
$heading.data( 'indicator', indicator );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06882ec11d9ce78d15e8d3dfd6a117cb9d0c844a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Enable DynamicPageList on officewiki - change (operations/mediawiki-config)

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

Change subject: Enable DynamicPageList on officewiki
..


Enable DynamicPageList on officewiki

Per Fluffernutter on IRC

Change-Id: Icff0a95ea4bac0e8f4581d7f37ae808101df047e
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5afe49a..301b51b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10610,9 +10610,10 @@
'legalteamwiki' => true, // T64610
'mediawikiwiki' => true, // T71974
'metawiki' => true,
-   'ptwiki' => true, // T37308
+   'officewiki' => true,
'otrs_wikiwiki' => true,
'outreachwiki' => true, // T58245
+   'ptwiki' => true, // T37308
'srwiki' => true,
'srwiktionary' => true, // T70346
'strategywiki' => true,

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

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

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


[MediaWiki-commits] [Gerrit] Trim dblist entries - change (mediawiki...WikimediaMaintenance)

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

Change subject: Trim dblist entries
..


Trim dblist entries

Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
(cherry picked from commit 079ea6301f302352aa91706bb02acf6aa6fa9b08)
---
M getPageCounts.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/getPageCounts.php b/getPageCounts.php
index 7828f74..c291903 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -72,7 +72,7 @@
$this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
return array();
}
-   return file( $fileName );
+   return array_map( 'trim', file( $fileName ) );
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1da8768242e938c6df3ed94d5aa4d282a86ade5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 
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] Remove unused jquery.visibleText library - change (VisualEditor/VisualEditor)

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

Change subject: Remove unused jquery.visibleText library
..


Remove unused jquery.visibleText library

Was here from before the mediawiki/extensions/VisualEditor repository
was split off from VisualEditor core.

There, the use of getVisibleText was phased out in March 2015
with 97d7da664373661.

Change-Id: I34aeeb7f849e98b4a5341dd3a8998d01b8127517
---
D lib/jquery/jquery.visibleText.js
1 file changed, 0 insertions(+), 46 deletions(-)

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



diff --git a/lib/jquery/jquery.visibleText.js b/lib/jquery/jquery.visibleText.js
deleted file mode 100644
index b49d75a..000
--- a/lib/jquery/jquery.visibleText.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * jQuery visibleText plugin 0.1.0
- * https://github.com/Krinkle/jquery-visibleText
- *
- * @author Timo Tijhof, 2012
- * @source This plugin is based on Sizzle.getText.
- *  Copyright 2012 jQuery Foundation and other contributors http://jquery.com/
- * @license MIT License 
- */
-(function ($) {
-
-   /**
-* @param {Array|jQuery|HTMLElement} elem
-*/
-   var getVisibleText = $.getVisibleText = function (elem) {
-   var node,
-   i = 0,
-   ret = '',
-   nodeType = elem.nodeType;
-
-   if (nodeType) {
-   if (nodeType === 1 || nodeType === 9 || nodeType === 
11) {
-   // Traverse the children
-   for (elem = elem.firstChild; elem; elem = 
elem.nextSibling) {
-   ret += $.expr.filters.hidden(elem) ?
-   '' :
-   getVisibleText(elem);
-   }
-   } else if (nodeType === 3 || nodeType === 4) {
-   return elem.nodeValue;
-   }
-   } else {
-
-   // If no nodeType, this is expected to be an array (or 
jQuery object)
-   for (; (node = elem[i]); i++) {
-   ret += getVisibleText(node);
-   }
-   }
-   return ret;
-   };
-
-   $.fn.visibleText = function () {
-   return getVisibleText(this);
-   };
-
-}(jQuery));

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

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

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


[MediaWiki-commits] [Gerrit] impressionDiet: Use KV store instead of cookies for campaign... - change (mediawiki...CentralNotice)

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

Change subject: impressionDiet: Use KV store instead of cookies for campaign 
categories using legacy
..


impressionDiet: Use KV store instead of cookies for campaign categories using 
legacy

Bug: T117650
Change-Id: I73c250c04abaa38d31f3fc548184e4a2a4e58c46
---
M CentralNotice.modules.php
M CentralNotice.php
M i18n/en.json
M i18n/qqq.json
M resources/subscribing/ext.centralNotice.impressionDiet.js
5 files changed, 221 insertions(+), 83 deletions(-)

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



diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php
index 193e952..31846c2 100644
--- a/CentralNotice.modules.php
+++ b/CentralNotice.modules.php
@@ -154,8 +154,8 @@
'centralnotice-banners-not-guaranteed-to-display',
 
// Impression diet
-   'centralnotice-impression-diet-cookie-name',
-   'centralnotice-impression-diet-cookie-name-help',
+   'centralnotice-impression-diet-identifier',
+   'centralnotice-impression-diet-identifier-help',
'centralnotice-impression-diet-maximum-seen',
'centralnotice-impression-diet-maximum-seen-help',
'centralnotice-impression-diet-restart-cycle-delay',
@@ -257,6 +257,7 @@
'remoteExtPath' => 'CentralNotice/resources',
'scripts'   => 'subscribing/ext.centralNotice.impressionDiet.js',
'dependencies'  => array(
+   'ext.centralNotice.kvStore',
'ext.centralNotice.display',
),
'targets'   => array( 'desktop', 'mobile' ),
diff --git a/CentralNotice.php b/CentralNotice.php
index 724d614..78b5986 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -302,10 +302,10 @@
'nameMsg' => 'centralnotice-impression-diet',
'helpMsg' => 'centralnotice-impression-diet-help',
'parameters' => array(
-   'cookieName' => array(
+   'identifier' => array(
'type' => 'string',
-   'labelMsg' => 
'centralnotice-impression-diet-cookie-name',
-   'helpMsg' => 
'centralnotice-impression-diet-cookie-name-help',
+   'labelMsg' => 
'centralnotice-impression-diet-identifier',
+   'helpMsg' => 
'centralnotice-impression-diet-identifier-help',
),
'skipInitial' => array(
'type' => 'integer',
diff --git a/i18n/en.json b/i18n/en.json
index d9c693b..a32c7ff 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -276,8 +276,8 @@
"centralnotice-banners-not-guaranteed-to-display": "Banners might not 
display, as determined by in-banner JavaScript",
"centralnotice-impression-diet": "Impression diet",
"centralnotice-impression-diet-help": "Limit the number of banners seen 
by any one individual.",
-   "centralnotice-impression-diet-cookie-name": "Hide cookie name",
-   "centralnotice-impression-diet-cookie-name-help": "To share an 
impression counting threshold across campaigns, specify the same cookie name 
for each campaign. If the cookie name is changed during a campaign, all counts 
to date will be lost.",
+   "centralnotice-impression-diet-identifier": "Identifier/hide cookie 
name",
+   "centralnotice-impression-diet-identifier-help": "An identifier for 
persistent client-side data stored by this feature (such as impression counts). 
This field is optional for most campaigns. If you leave it blank, campaigns in 
the same category will share impression counts. To share this data across 
several campaign categories, specify the same identifier for each campaign. 
Note: certain campaign categories are configured to use cookies for this 
feature. For campaigns in those categories, this identifier will be the cookie 
name, and is not optional. Also note that if the identifier is changed during a 
campaign, all counts to date will be lost.",
"centralnotice-impression-diet-maximum-seen": "Maximum impressions any 
individual will see",
"centralnotice-impression-diet-maximum-seen-help": "If the cycle is 
configured to restart, this limits the number of impressions seen per cycle 
rather than the total number of impressions seen.",
"centralnotice-impression-diet-restart-cycle-delay": "How long to wait 
before restarting the cycle, in seconds (optional)",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ca9888e..e50294a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -300,8 +300,8 @@
"centralnotice-banners-not-guaranteed-to-display": "Label for the 
control to indicate that banners might not display, for the legacy support 
campaign mixin",
"centralnotice-impression-diet": "Label 

[MediaWiki-commits] [Gerrit] Allow AUTHOR|CREDITS with .{media, }wiki extension - change (mediawiki/core)

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

Change subject: Allow AUTHOR|CREDITS with .{media,}wiki extension
..


Allow AUTHOR|CREDITS with .{media,}wiki extension

With this fix, Special:Version shows "and others" for MobileFrontend
authors, and Special:Version/Credits/MobileFrontend works.

Bug: T117932
Change-Id: I80bc334aba80d3621416cfec1a13db4872ac53cf
---
M includes/specials/SpecialVersion.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  Bmansurov: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 7e0f0b2..80560be 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -1062,7 +1062,7 @@
 
foreach ( scandir( $extDir ) as $file ) {
$fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
-   if ( preg_match( '/^((AUTHORS)|(CREDITS))(\.txt)?$/', 
$file ) &&
+   if ( preg_match( 
'/^((AUTHORS)|(CREDITS))(\.txt|\.wiki|\.mediawiki)?$/', $file ) &&
is_readable( $fullPath ) &&
is_file( $fullPath )
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80bc334aba80d3621416cfec1a13db4872ac53cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Spage 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Spage 
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 getPageCounts.php - change (mediawiki...WikimediaMaintenance)

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

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

Change subject: Add getPageCounts.php
..

Add getPageCounts.php

This script generates a JSON blob with every public wiki's page counts.
I plan to use it for generating www portals.

Change-Id: Ic2ad196b13488a3123241937ce0ad51ac1e0ba05
(cherry picked from commit 1ee70c3a8ca02d88bddc4d00a8927db3c8db52b7)
---
A getPageCounts.php
1 file changed, 81 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/53/251653/1

diff --git a/getPageCounts.php b/getPageCounts.php
new file mode 100644
index 000..7eeef52
--- /dev/null
+++ b/getPageCounts.php
@@ -0,0 +1,81 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @ingroup Wikimedia
+ */
+
+require_once( __DIR__ . '/WikimediaMaintenance.php' );
+
+class GetPageCounts extends Maintenance {
+   public function __construct() {
+   $this->mDescription = 'Generates machine-readable statistics of 
pages on all wikis in the cluster';
+   parent::__construct();
+   }
+
+   public function execute() {
+   global $wgConf;
+
+   $wikis = $wgConf->getLocalDatabases();
+   $exclude = array_flip( $this->getExcludedWikis() );
+
+   $counts = array();
+   foreach ( $wikis as $wiki ) {
+   $wiki = trim( $wiki );
+   if ( $wiki === '' || $wiki[0] === '#' ) {
+   continue;
+   }
+   if ( isset( $exclude[$wiki] ) ) {
+   continue;
+   }
+   $lb = LBFactory::singleton()->getMainLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE );
+   $row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
+   if ( !$row ) {
+   $this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
+   }
+   $counts[$wiki] = array(
+   'pages' => $row->ss_total_pages,
+   'contentPages' => $row->ss_good_articles
+   );
+   $lb->closeAll();
+   }
+   $this->output( FormatJson::encode( $counts, true ) . "\n" );
+   }
+
+   private function getExcludedWikis() {
+   return $this->dblist( 'private' );
+   }
+
+   private function dblist( $name ) {
+   if ( !defined( 'MEDIAWIKI_DBLIST_DIR' ) ) {
+   $this->error( "Warning: MEDIAWIKI_DBLIST_DIR is not 
defined, no wikis will be blacklisted\n" );
+   return array();
+   }
+   $fileName = MEDIAWIKI_DBLIST_DIR . "/$name.dblist";
+   if ( !is_readable( $fileName ) ) {
+   $this->error( "Warning: can't read $fileName, no wikis 
will be blacklisted\n" );
+   return array();
+   }
+   return file( $fileName );
+   }
+}
+
+
+$maintClass = 'GetPageCounts';
+require_once( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2ad196b13488a3123241937ce0ad51ac1e0ba05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Reduce cache time if fewer than 100 views - change (mediawiki...HitCounters)

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

Change subject: Reduce cache time if fewer than 100 views
..


Reduce cache time if fewer than 100 views

There are some reports about HC not working on new pages.  In my
testing, it works but caching hides the display.

Proposed solution implemented here reduces the caching time for pages
with less than 100 hits from 1 day to 1 minute.

Added debugging statements to help with all this.

Change-Id: I900bcfd198e935e4371a8ddd43305ba781010b9b
---
M HitCounters.body.php
M HitCounters.hooks.php
M ViewCountUpdate.php
3 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/HitCounters.body.php b/HitCounters.body.php
index 1c67b98..7b95a1f 100644
--- a/HitCounters.body.php
+++ b/HitCounters.body.php
@@ -30,6 +30,9 @@
$cache = wfGetCache( CACHE_ANYTHING );
$key = wfMemcKey( 'viewcount', $title->getDBkey() );
$views = $cache->get( $key );
+   wfDebugLog( "HitCounters", "Got viewcount=" . var_export( 
$views, true ) .
+   " from cache" );
+
if ( !$views ) {
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->select(
@@ -37,11 +40,20 @@
array( 'hits' => 'page_counter' ),
array( 'page_id' => $title->getArticleID() ),
__METHOD__ );
+   wfDebugLog( "HitCounters", "Got result=" . var_export( 
$row, true ) .
+   " from DB and setting cache." );
 
if ( $row !== false && $current = $row->current() ) {
$views = $current->hits;
-   /* update only once a day */
-   $cache->set( $key, $views, 24 * 3600 );
+   wfDebugLog( "HitCounters", "Got result=" . 
var_export( $current, true ) .
+   " from DB and setting cache." );
+   if ( $views < 100 ) {
+   // Only cache for a minute
+   $cache->set( $key, $views, 60 );
+   } else {
+   /* update only once a day */
+   $cache->set( $key, $views, 24 * 3600 );
+   }
}
}
 
diff --git a/HitCounters.hooks.php b/HitCounters.hooks.php
index b8834a2..9cf35ea 100644
--- a/HitCounters.hooks.php
+++ b/HitCounters.hooks.php
@@ -121,6 +121,7 @@
 
$viewcount = HitCounters::getCount( $skin->getTitle());
if ( $viewcount ) {
+   wfDebugLog( "HitCounters", "Got 
viewcount=$viewcount and putting in page" );
$tpl->set( 'viewcount', $skin->msg( 'viewcount' 
)->numParams( $viewcount )->parse() );
}
}
diff --git a/ViewCountUpdate.php b/ViewCountUpdate.php
index b2079cc..5b930eb 100644
--- a/ViewCountUpdate.php
+++ b/ViewCountUpdate.php
@@ -47,11 +47,13 @@
global $wgHitcounterUpdateFreq;
$dbw = wfGetDB( DB_MASTER );
 
+   wfDebugLog ( "HitCounter", "update freq set to: 
$wgHitcounterUpdateFreq;" );
if ( $wgHitcounterUpdateFreq <= 1 || $dbw->getType() == 
'sqlite' ) {
$pageId = $this->pageId;
$method = __METHOD__;
$dbw->onTransactionIdle( function () use ( $dbw, 
$pageId, $method ) {
try {
+   wfDebugLog( "HitCounter", "About to 
update $pageId" );
$dbw->upsert( 'hit_counter',
// Perform this INSERT if 
page_id not found
array( 'page_id' => $pageId, 
'page_counter' => 1 ),
@@ -61,6 +63,7 @@
$method
);
} catch ( DBError $e ) {
+   wfDebugLog("HitCounter", "Got an 
exception: " . $e->getMessage() );
MWExceptionHandler::logException( $e );
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I900bcfd198e935e4371a8ddd43305ba781010b9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/HitCounters
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 

[MediaWiki-commits] [Gerrit] Rename Hooks.php - change (mediawiki...HitCounters)

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

Change subject: Rename Hooks.php
..


Rename Hooks.php

Change-Id: I7663147277b5995113bdf9e8a96eb762bbc6cc7b
---
R HitCounters.hooks.php
M extension.json
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Hooks.php b/HitCounters.hooks.php
similarity index 100%
rename from Hooks.php
rename to HitCounters.hooks.php
diff --git a/extension.json b/extension.json
index 2d503a5..18cf126 100644
--- a/extension.json
+++ b/extension.json
@@ -48,7 +48,7 @@
]
},
"AutoloadClasses": {
-   "HitCounters\\Hooks": "Hooks.php",
+   "HitCounters\\Hooks": "HitCounters.hooks.php",
"HitCounters\\HitCounters": "HitCounters.body.php",
"ViewCountUpdate": "ViewCountUpdate.php",
"HitCounters\\SpecialPopularPages": "SpecialPopularPages.php",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7663147277b5995113bdf9e8a96eb762bbc6cc7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/HitCounters
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Report ES doc id in RunSearch rather than the title page id - change (mediawiki...CirrusSearch)

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

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

Change subject: Report ES doc id in RunSearch rather than the title page id
..

Report ES doc id in RunSearch rather than the title page id

On our test instances when we import an elasticsearch dump we
typically only load ES, and not the mysql database. Due to this
all titles report an id of 0. Instead report the doc id from
elasticsearch. Within CirrusSearch the doc id of a page is always
it's page id.

Change-Id: Ia7d2b92a1720cc5fedab4ba0bc2dd9875c9aba4a
---
M includes/Search/Result.php
M maintenance/runSearch.php
2 files changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/includes/Search/Result.php b/includes/Search/Result.php
index 04b1bdb..ad41365 100644
--- a/includes/Search/Result.php
+++ b/includes/Search/Result.php
@@ -38,6 +38,7 @@
private $wordCount;
private $byteSize;
private $timestamp;
+   private $docId;
 
/**
 * Build the result.
@@ -50,6 +51,7 @@
if ( $interwiki ) {
$this->setInterwiki( $result, $interwiki );
}
+   $this->docId = $result->getParam('_id');
$this->mTitle = Title::makeTitle( $result->namespace, 
$result->title, '', $this->interwiki );
if ( $this->getTitle()->getNamespace() == NS_FILE ) {
$this->mImage = wfFindFile( $this->mTitle );
@@ -273,4 +275,8 @@
public function getInterwikiNamespaceText() {
return $this->interwikiNamespace;
}
+
+   public function getDocId() {
+   return $this->docId;
+   }
 }
diff --git a/maintenance/runSearch.php b/maintenance/runSearch.php
index 44a211a..53ae5ff 100644
--- a/maintenance/runSearch.php
+++ b/maintenance/runSearch.php
@@ -109,7 +109,9 @@
$result = $value->next();
while ( $result ) {
$data['rows'][] = array(
-   'pageId' => 
$result->getTitle()->getArticleId(),
+   // use getDocId() rather than 
asking the title to allow this script
+   // to work when a production 
index has been imported to a test es instance
+   'pageId' => $result->getDocId(),
'title' => 
$result->getTitle()->getPrefixedText(),
'snippets' => array(
'text' => 
$result->getTextSnippet( $query ),

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

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

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


[MediaWiki-commits] [Gerrit] Follow composer.lock - change (wikimedia...SmashPig)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Follow composer.lock
..

Follow composer.lock

Change-Id: I19d3c4ce6d55cad150fa94f3740b96572ab78be4
---
M vendor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/61/251661/1

diff --git a/vendor b/vendor
index 9b46351..9f54eda 16
--- a/vendor
+++ b/vendor
-Subproject commit 9b46351a98f19f53cbb20a40bf320a15ca96175b
+Subproject commit 9f54edab92ca4da0838e285989b185a5a77b0f70

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

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

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


[MediaWiki-commits] [Gerrit] Follow composer.lock - change (wikimedia...SmashPig)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Follow composer.lock
..


Follow composer.lock

Change-Id: I19d3c4ce6d55cad150fa94f3740b96572ab78be4
---
M vendor
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/vendor b/vendor
index 9b46351..9f54eda 16
--- a/vendor
+++ b/vendor
-Subproject commit 9b46351a98f19f53cbb20a40bf320a15ca96175b
+Subproject commit 9f54edab92ca4da0838e285989b185a5a77b0f70

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19d3c4ce6d55cad150fa94f3740b96572ab78be4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] Run JSHint and JSCS against tests - change (mediawiki...RelatedArticles)

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

Change subject: Run JSHint and JSCS against tests
..


Run JSHint and JSCS against tests

Changes:

* Extend the definition of all JavaScript files to include those in the
  tests directory
* Run JSHint and JSCS against all JavaScript files
* Fix the existing code style errors in the RelatedPagesGateway
  test

Change-Id: Ia6d8fa63e0b86760857d4480a0575b57512fa36b
---
M .jshintrc
M Gruntfile.js
2 files changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
index c305b65..5827a77 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -17,6 +17,7 @@
"mw": false,
"$": false,
"jQuery": true,
-   "OO": true
+   "OO": true,
+   "QUnit": true
}
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index aec6ea4..bdd611c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,17 +6,20 @@
grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
+   files: {
+   all: [
+   'resources/**/*.js',
+   'tests/**/*.js'
+   ]
+   },
jshint: {
options: {
jshintrc: true
},
-   all: [
-   '*.js',
-   'resources/**/*.js'
-   ]
+   all: '<%= files.all %>'
},
jscs: {
-   src: '<%= jshint.all %>'
+   src: '<%= files.all %>'
},
banana: {
all: 'i18n/'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6d8fa63e0b86760857d4480a0575b57512fa36b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: dev
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhobs 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make Swift iterators throw errors on failure - change (mediawiki/core)

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

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

Change subject: Make Swift iterators throw errors on failure
..

Make Swift iterators throw errors on failure

This is in line with FSFileBackend and is provides the calling
loop of a way to know the listing failed, rather than just
giving incomplete information.

Change-Id: I34c66d9dbf84e5f33982d17e61364c1595d3e9f7
---
M includes/filebackend/SwiftFileBackend.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/251666/1

diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 8097549..72a877d 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -861,7 +861,7 @@
if ( !empty( $params['topOnly'] ) ) {
$status = $this->objectListing( $fullCont, 'names', 
$limit, $after, $prefix, '/' );
if ( !$status->isOk() ) {
-   return $dirs; // error
+   throw new FileBackendError( "Iterator page I/O 
error: {$status->getMessage()}" );
}
$objects = $status->value;
foreach ( $objects as $object ) { // files and 
directories
@@ -880,7 +880,7 @@
$status = $this->objectListing( $fullCont, 'names', 
$limit, $after, $prefix );
 
if ( !$status->isOk() ) {
-   return $dirs; // error
+   throw new FileBackendError( "Iterator page I/O 
error: {$status->getMessage()}" );
}
 
$objects = $status->value;
@@ -956,7 +956,7 @@
 
// Reformat this list into a list of (name, stat array or null) 
entries
if ( !$status->isOk() ) {
-   return $files; // error
+   throw new FileBackendError( "Iterator page I/O error: 
{$status->getMessage()}" );
}
 
$objects = $status->value;

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

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

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


[MediaWiki-commits] [Gerrit] Copy context request changes to wgRequest global - change (mediawiki...ConfirmEdit)

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

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

Change subject: Copy context request changes to wgRequest global
..

Copy context request changes to wgRequest global

Bug: T118052
Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
(cherry picked from commit 92c5d846dac2a20c040d52b240bfb84d8c26e27e)
---
M SimpleCaptcha/Captcha.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/73/251673/1

diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index d1170ba..71c32ca 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -575,12 +575,17 @@
 * @return bool false if the CAPTCHA is rejected, true otherwise
 */
private function doConfirmEdit( WikiPage $page, $newtext, $section, 
IContextSource $context ) {
+   global $wgRequest;
$request = $context->getRequest();
+   // FIXME: Stop using wgRequest in other parts of ConfirmEdit so 
we can
+   // stop having to duplicate code for it.
if ( $request->getVal( 'captchaid' ) ) {
$request->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
+   $wgRequest->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
}
if ( $request->getVal( 'captchaword' ) ) {
$request->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
+   $wgRequest->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
}
if ( $this->shouldCheck( $page, $newtext, $section, $context ) 
) {
return $this->passCaptchaLimited();
@@ -856,7 +861,6 @@
 
$info = $this->retrieveCaptcha( $wgRequest );
if ( $info ) {
-   global $wgRequest;
if ( $this->keyMatch( $wgRequest->getVal( 
'wpCaptchaWord' ), $info ) ) {
$this->log( "passed" );
$this->clearCaptcha( $info );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Initialize notifications model outside of the widget - change (mediawiki...Echo)

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

Change subject: Initialize notifications model outside of the widget
..


Initialize notifications model outside of the widget

Change-Id: I19c239326b04eaa07b62e0b06f181c86ff0a0ef8
---
M modules/ext.echo.init.js
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
2 files changed, 32 insertions(+), 20 deletions(-)

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



diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index a40f819..0d84e4f 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -53,10 +53,22 @@
 
// Load the ui
mw.loader.using( 'ext.echo.ui', function () {
+   var messageNotificationsModel, 
alertNotificationsModel;
+
// Load message button and popup if messages 
exist
if ( $existingMessageLink.length ) {
-   mw.echo.ui.messageWidget = new 
mw.echo.ui.NotificationBadgeWidget( {
-   type: 'message',
+   messageNotificationsModel = new 
mw.echo.dm.NotificationsModel(
+   new mw.echo.dm.APIHandler( {
+   type: 'message',
+   limit: 25,
+   userLang: 
mw.config.get( 'wgUserLanguage' ),
+   baseParams: 
mw.echo.apiCallParams
+   } ),
+   {
+   type: 'message'
+   }
+   );
+   mw.echo.ui.messageWidget = new 
mw.echo.ui.NotificationBadgeWidget( messageNotificationsModel, {
markReadWhenSeen: false,
numItems: numMessages,
hasUnseen: hasUnseenMessages,
@@ -78,8 +90,18 @@
}
 
// Load alerts popup and button
-   mw.echo.ui.alertWidget = new 
mw.echo.ui.NotificationBadgeWidget( {
-   type: 'alert',
+   alertNotificationsModel = new 
mw.echo.dm.NotificationsModel(
+   new mw.echo.dm.APIHandler( {
+   type: 'alert',
+   limit: 25,
+   userLang: mw.config.get( 
'wgUserLanguage' ),
+   baseParams: 
mw.echo.apiCallParams
+   } ),
+   {
+   type: 'alert'
+   }
+   );
+   mw.echo.ui.alertWidget = new 
mw.echo.ui.NotificationBadgeWidget( alertNotificationsModel, {
markReadWhenSeen: true,
numItems: numAlerts,
hasUnseen: hasUnseenAlerts,
diff --git a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
index 3d764f6..34961b0 100644
--- a/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
@@ -6,8 +6,8 @@
 * @extends OO.ui.ButtonWidget
 *
 * @constructor
+* @param {mw.echo.dm.NotificationsModel} model Notifications view model
 * @param {Object} [config] Configuration object
-* @cfg {string} [type='alert'] Notification type 'alert' or 'message'
 * @cfg {number} [numItems=0] How many items are in the button display
 * @cfg {boolean} [hasUnseen=false] Whether there are unseen items
 * @cfg {boolean} [markReadWhenSeen=false] Mark all notifications as 
read on open
@@ -22,7 +22,7 @@
 *  } }
 * @cfg {string} [href] URL the badge links to
 */
-   mw.echo.ui.NotificationBadgeWidget = function 
MwEchoUiNotificationBadgeButtonPopupWidget( config ) {
+   mw.echo.ui.NotificationBadgeWidget = function 
MwEchoUiNotificationBadgeButtonPopupWidget( model, config ) {
var buttonFlags, allNotificationsButton, preferencesButton, 
footerButtonGroupWidget, $footer;
 
config = config || {};
@@ -34,7 +34,10 @@
// Mixin constructors
 

[MediaWiki-commits] [Gerrit] labtest* hosts pxe and install setup - change (operations/puppet)

2015-11-06 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: labtest* hosts pxe and install setup
..


labtest* hosts pxe and install setup

Bug: T117097
Change-Id: Ibeba47ba87c3281eaeb748752285ae6ccf3e71cd
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 43 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  Rush: Verified; Looks good to me, approved



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index f55cf48..e801b8e 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -86,6 +86,7 @@
labsdb100[45]) echo partman/osmlabsdb.cfg ;; \
labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \
labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \
+   labtest*) echo partman/raid1.cfg ;; \
labvirt100[1-9]) echo partman/virt-hp.cfg ;; \
labvirt101[0-1]) echo partman/labvirt-ssd.cfg ;; \
logstash100[1-3]) echo partman/raid1-lvm-ext4.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 1e58e07..88ba725 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2631,6 +2631,48 @@
fixed-address labservices1001.wikimedia.org;
 }
 
+host labtestcontrol2001 {
+   hardware ethernet 90:B1:1C:23:31:85;
+   fixed-address labtestcontrol2001.wikimedia.org;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestmetal2001 {
+   hardware ethernet 78:2b:cb:49:00:15;
+   fixed-address labtestmetal2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestnet2001 {
+   hardware ethernet 90:B1:1C:23:20:4D;
+   fixed-address labtestnet2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestneutron2001 {
+   hardware ethernet 78:2b:cb:48:f9:61;
+   fixed-address labtestneutron2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestservices2001 {
+   hardware ethernet d4:be:d9:af:68:4f;
+   fixed-address labtestservices2001.wikimedia.org;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestvirt2001 {
+   hardware ethernet 90:B1:1C:2D:7E:B9;
+   fixed-address labtestvirt2001.codfw.wmnet;
+   option pxelinux.pathprefix "trusty-installer/";
+   filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labvirt1001 {
 hardware ethernet 28:80:23:9a:d4:08;
 fixed-address labvirt1001.eqiad.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] WikiEditor integration: Only add VE switch button if VE is a... - change (mediawiki...VisualEditor)

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

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

Change subject: WikiEditor integration: Only add VE switch button if VE is 
available
..

WikiEditor integration: Only add VE switch button if VE is available

Bug: T117968
Change-Id: Ibfe73b7170083bc9ee0a0322768999c8650da4e7
(cherry picked from commit 87931fb3f2de93f02ebd1a03b996ecbeb9c6cc2c)
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 14 insertions(+), 16 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index ae684a5..cdf38a8 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -377,6 +377,20 @@
// If the edit tab is hidden, remove it.
if ( !( init.isAvailable && userPrefEnabled ) ) {
$caVeEdit.remove();
+   } else if ( pageCanLoadVE ) {
+   // Allow instant switching to edit mode, 
without refresh
+   mw.loader.load( 'ext.visualEditor.switching' );
+   $caVeEdit.click( init.onEditTabClick );
+   $( '#wpTextbox1' ).on( 
'wikiEditor-toolbar-doneInitialSections', function () {
+   $( '.wikiEditor-ui-toolbar' ).prepend(
+   new OO.ui.ButtonWidget( {
+   framed: false,
+   icon: 'edit',
+   title: mw.msg( 
'visualeditor-mweditmodeve-tool' ),
+   classes: [ 
've-init-mw-desktopArticleTarget-editSwitch' ]
+   } ).on( 'click', 
init.activateVe ).$element
+   );
+   } );
}
 
// Alter the edit tab (#ca-edit)
@@ -412,22 +426,6 @@
.addClass( 
've-tabmessage-appendix' )
.text( mw.msg( tabMessages[ 
action + 'sourceappendix' ] ) )
);
-   }
-
-   if ( pageCanLoadVE ) {
-   // Allow instant switching to edit mode, 
without refresh
-   mw.loader.load( 'ext.visualEditor.switching' );
-   $caVeEdit.click( init.onEditTabClick );
-   $( '#wpTextbox1' ).on( 
'wikiEditor-toolbar-doneInitialSections', function () {
-   $( '.wikiEditor-ui-toolbar' ).prepend(
-   new OO.ui.ButtonWidget( {
-   framed: false,
-   icon: 'edit',
-   title: mw.msg( 
'visualeditor-mweditmodeve-tool' ),
-   classes: [ 
've-init-mw-desktopArticleTarget-editSwitch' ]
-   } ).on( 'click', 
init.activateVe ).$element
-   );
-   } );
}
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfe73b7170083bc9ee0a0322768999c8650da4e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 

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


[MediaWiki-commits] [Gerrit] autoinstall setup for labs-hosts1-b-codfw - change (operations/puppet)

2015-11-06 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: autoinstall setup for labs-hosts1-b-codfw
..


autoinstall setup for labs-hosts1-b-codfw

Bug: T115491
Change-Id: Ia0a8704eb51dda98770520dd2d9c736c81403faa
---
M modules/install_server/files/autoinstall/netboot.cfg
A modules/install_server/files/autoinstall/subnets/labs-hosts1-b-codfw.cfg
2 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  Rush: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index f508082..f55cf48 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -36,6 +36,7 @@
10.128.0.1) echo subnets/private1-ulsfo.cfg ;; \
10.192.0.1) echo subnets/private1-a-codfw.cfg ;; \
10.192.16.1) echo subnets/private1-b-codfw.cfg ;; \
+   10.192.20.1) echo subnets/labs-hosts1-b-codfw.cfg ;; \
10.192.21.1) echo subnets/labs-support1-b-codfw.cfg ;; \
10.192.32.1) echo subnets/private1-c-codfw.cfg ;; \
10.192.48.1) echo subnets/private1-d-codfw.cfg ;; \
diff --git 
a/modules/install_server/files/autoinstall/subnets/labs-hosts1-b-codfw.cfg 
b/modules/install_server/files/autoinstall/subnets/labs-hosts1-b-codfw.cfg
new file mode 100644
index 000..6189576
--- /dev/null
+++ b/modules/install_server/files/autoinstall/subnets/labs-hosts1-b-codfw.cfg
@@ -0,0 +1,15 @@
+# subnet specific configuration settings
+
+# get_domain should be set, get_hostname is overwritten by DHCP
+d-inetcfg/get_domain   string  codfw.wmnet
+
+# ip address is taken from DHCP, rest is set here
+d-inetcfg/get_netmask  string  255.255.255.0
+d-inetcfg/get_gateway  string  10.192.20.1
+d-inetcfg/get_nameservers  string  208.80.154.239 208.80.153.254
+d-inetcfg/confirm_static   boolean true
+
+d-imirror/http/proxy   string  http://webproxy.codfw.wmnet:8080
+
+# NTP
+d-iclock-setup/ntp-server  string  ntp.codfw.wikimedia.org

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0a8704eb51dda98770520dd2d9c736c81403faa
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Rush 
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 default config for jobs-damaged queue - change (wikimedia...SmashPig)

2015-11-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add default config for jobs-damaged queue
..

Add default config for jobs-damaged queue

Bug: T117447
Change-Id: I2cdaa311fda6d52f20c8ce481d6d85ad3d48219d
---
M config_defaults.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/65/251665/1

diff --git a/config_defaults.php b/config_defaults.php
index 85a4589..d77bf36 100644
--- a/config_defaults.php
+++ b/config_defaults.php
@@ -24,6 +24,11 @@
'inst-args' => array( 'limbo' ),
),
 
+   'jobs-damaged' => array(
+   'class' => 
'SmashPig\Core\DataStores\StompDataStore',
+   'inst-args' => array( 'jobs-damaged' ),
+   ),
+
'jobs' => array(
'class' => 
'SmashPig\Core\DataStores\StompDataStore',
'inst-args' => array( 'jobs' ),

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

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

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


[MediaWiki-commits] [Gerrit] Add default config for jobs-damaged queue - change (wikimedia...SmashPig)

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

Change subject: Add default config for jobs-damaged queue
..


Add default config for jobs-damaged queue

Bug: T117447
Change-Id: I2cdaa311fda6d52f20c8ce481d6d85ad3d48219d
---
M config_defaults.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/config_defaults.php b/config_defaults.php
index 85a4589..d77bf36 100644
--- a/config_defaults.php
+++ b/config_defaults.php
@@ -24,6 +24,11 @@
'inst-args' => array( 'limbo' ),
),
 
+   'jobs-damaged' => array(
+   'class' => 
'SmashPig\Core\DataStores\StompDataStore',
+   'inst-args' => array( 'jobs-damaged' ),
+   ),
+
'jobs' => array(
'class' => 
'SmashPig\Core\DataStores\StompDataStore',
'inst-args' => array( 'jobs' ),

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

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

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


[MediaWiki-commits] [Gerrit] Improve LB handling - change (mediawiki...WikimediaMaintenance)

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

Change subject: Improve LB handling
..


Improve LB handling

Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
(cherry picked from commit b5a5877d567ab19740419dc8a93e2f6121a53a52)
---
M getPageCounts.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/getPageCounts.php b/getPageCounts.php
index 7eeef52..7828f74 100644
--- a/getPageCounts.php
+++ b/getPageCounts.php
@@ -43,8 +43,8 @@
if ( isset( $exclude[$wiki] ) ) {
continue;
}
-   $lb = LBFactory::singleton()->getMainLB( $wiki );
-   $dbr = $lb->getConnection( DB_SLAVE );
+   $lb = wfGetLB( $wiki );
+   $dbr = $lb->getConnection( DB_SLAVE, array(), $wiki );
$row = $dbr->selectRow( 'site_stats', array( 
'ss_total_pages', 'ss_good_articles' ), '', __METHOD__ );
if ( !$row ) {
$this->error( "Error: '$wiki' has empty 
site_stats\n", 1 ); // Die
@@ -53,7 +53,7 @@
'pages' => $row->ss_total_pages,
'contentPages' => $row->ss_good_articles
);
-   $lb->closeAll();
+   $lb->reuseConnection( $dbr );
}
$this->output( FormatJson::encode( $counts, true ) . "\n" );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I947227cbfac72440782f913c605816b9f67df5e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: wmf/1.27.0-wmf.5
Gerrit-Owner: MaxSem 
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] Copy context request changes to wgRequest global - change (mediawiki...ConfirmEdit)

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

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

Change subject: Copy context request changes to wgRequest global
..

Copy context request changes to wgRequest global

I wanted to pass a WebRequest object around but that'll probably
break external captcha plugins?

Bug: T118052
Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
---
M SimpleCaptcha/Captcha.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/72/251672/1

diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index d1170ba..1fbe56f 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -575,12 +575,15 @@
 * @return bool false if the CAPTCHA is rejected, true otherwise
 */
private function doConfirmEdit( WikiPage $page, $newtext, $section, 
IContextSource $context ) {
+   global $wgRequest;
$request = $context->getRequest();
if ( $request->getVal( 'captchaid' ) ) {
$request->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
+   $wgRequest->setVal( 'wpCaptchaId', $request->getVal( 
'captchaid' ) );
}
if ( $request->getVal( 'captchaword' ) ) {
$request->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
+   $wgRequest->setVal( 'wpCaptchaWord', $request->getVal( 
'captchaword' ) );
}
if ( $this->shouldCheck( $page, $newtext, $section, $context ) 
) {
return $this->passCaptchaLimited();
@@ -856,7 +859,6 @@
 
$info = $this->retrieveCaptcha( $wgRequest );
if ( $info ) {
-   global $wgRequest;
if ( $this->keyMatch( $wgRequest->getVal( 
'wpCaptchaWord' ), $info ) ) {
$this->log( "passed" );
$this->clearCaptcha( $info );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
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] Add cli-shutdown.groovy from Jenkins advisory - change (operations/puppet)

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

Change subject: Add cli-shutdown.groovy from Jenkins advisory
..


Add cli-shutdown.groovy from Jenkins advisory

Change-Id: I78bff57e01cba06cd053cb6de49c12873ee33f40
cf: 
https://jenkins-ci.org/content/mitigating-unauthenticated-remote-code-execution-0-day-jenkins-cli
---
A modules/jenkins/files/cli-shutdown.groovy
M modules/jenkins/manifests/init.pp
2 files changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/modules/jenkins/files/cli-shutdown.groovy 
b/modules/jenkins/files/cli-shutdown.groovy
new file mode 100644
index 000..b92b4e7
--- /dev/null
+++ b/modules/jenkins/files/cli-shutdown.groovy
@@ -0,0 +1,11 @@
+// 
https://github.com/jenkinsci-cert/SECURITY-218/blob/66c6cdb/cli-shutdown.groovy
+import jenkins.*;
+import jenkins.model.*;
+
+def p = AgentProtocol.all()
+p.each { x ->
+  if (x.name.contains("CLI")) p.remove(x)
+}
+
+def j = Jenkins.instance;
+j.actions.each { x -> if (x.getClass().name.contains("CLIAction")) 
j.actions.remove(x) }
diff --git a/modules/jenkins/manifests/init.pp 
b/modules/jenkins/manifests/init.pp
index 56a1126..040fea6 100644
--- a/modules/jenkins/manifests/init.pp
+++ b/modules/jenkins/manifests/init.pp
@@ -34,6 +34,20 @@
 mode=> '0644',
 }
 
+file { '/var/lib/jenkins/init.groovy.d':
+ensure  => 'directory',
+owner   => 'jenkins',
+group   => 'jenkins',
+mode=> '0755',
+}
+
+file { '/var/lib/jenkins/init.groovy.d/cli-shutdown.groovy':
+source  => 'puppet:///modules/jenkins/cli-shutdown.groovy',
+owner   => 'jenkins',
+group   => 'jenkins',
+mode=> '0755',
+}
+
 service { 'jenkins':
 ensure => 'running',
 enable => true,

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

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

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


[MediaWiki-commits] [Gerrit] Add cli-shutdown.groovy from Jenkins advisory - change (operations/puppet)

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

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

Change subject: Add cli-shutdown.groovy from Jenkins advisory
..

Add cli-shutdown.groovy from Jenkins advisory

Change-Id: I78bff57e01cba06cd053cb6de49c12873ee33f40
cf: 
https://jenkins-ci.org/content/mitigating-unauthenticated-remote-code-execution-0-day-jenkins-cli
---
A modules/jenkins/files/cli-shutdown.groovy
M modules/jenkins/manifests/init.pp
2 files changed, 25 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/251681/1

diff --git a/modules/jenkins/files/cli-shutdown.groovy 
b/modules/jenkins/files/cli-shutdown.groovy
new file mode 100644
index 000..b92b4e7
--- /dev/null
+++ b/modules/jenkins/files/cli-shutdown.groovy
@@ -0,0 +1,11 @@
+// 
https://github.com/jenkinsci-cert/SECURITY-218/blob/66c6cdb/cli-shutdown.groovy
+import jenkins.*;
+import jenkins.model.*;
+
+def p = AgentProtocol.all()
+p.each { x ->
+  if (x.name.contains("CLI")) p.remove(x)
+}
+
+def j = Jenkins.instance;
+j.actions.each { x -> if (x.getClass().name.contains("CLIAction")) 
j.actions.remove(x) }
diff --git a/modules/jenkins/manifests/init.pp 
b/modules/jenkins/manifests/init.pp
index 56a1126..040fea6 100644
--- a/modules/jenkins/manifests/init.pp
+++ b/modules/jenkins/manifests/init.pp
@@ -34,6 +34,20 @@
 mode=> '0644',
 }
 
+file { '/var/lib/jenkins/init.groovy.d':
+ensure  => 'directory',
+owner   => 'jenkins',
+group   => 'jenkins',
+mode=> '0755',
+}
+
+file { '/var/lib/jenkins/init.groovy.d/cli-shutdown.groovy':
+source  => 'puppet:///modules/jenkins/cli-shutdown.groovy',
+owner   => 'jenkins',
+group   => 'jenkins',
+mode=> '0755',
+}
+
 service { 'jenkins':
 ensure => 'running',
 enable => true,

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

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

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


[MediaWiki-commits] [Gerrit] Drop any beforeunload handlers when loading from existing wi... - change (mediawiki...VisualEditor)

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

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

Change subject: Drop any beforeunload handlers when loading from existing 
wikitext
..

Drop any beforeunload handlers when loading from existing wikitext

Bug: T117769
Change-Id: I823737b17e5af8ed15bc2b62db61a31886e8d418
---
M modules/ve-mw/init/ve.init.mw.TargetLoader.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.TargetLoader.js 
b/modules/ve-mw/init/ve.init.mw.TargetLoader.js
index d54ab33..585f7bf 100644
--- a/modules/ve-mw/init/ve.init.mw.TargetLoader.js
+++ b/modules/ve-mw/init/ve.init.mw.TargetLoader.js
@@ -135,6 +135,8 @@
ve.track( 'trace.restbaseLoad.enter' );
if ( conf.fullRestbaseUrl && $( '#wpTextbox1' 
).length ) {
fromEditedState = true;
+   window.onbeforeunload = null;
+   $( window ).off( 'beforeunload' );
restbaseXhr = $.post(
conf.fullRestbaseUrl + 
'v1/transform/wikitext/to/html/' +
encodeURIComponent( 
pageName ) +

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I823737b17e5af8ed15bc2b62db61a31886e8d418
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] Remove leftover configuration data from the mobile browse ex... - change (operations/mediawiki-config)

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

Change subject: Remove leftover configuration data from the mobile browse 
experiment
..


Remove leftover configuration data from the mobile browse experiment

Change-Id: I212cbb547527e6a897509c1dd9f6ecd49943d854
Task: T113686
---
M wmf-config/mobile.php
1 file changed, 0 insertions(+), 523 deletions(-)

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



diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 24ad3c9..f1e0570 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -109,529 +109,6 @@
if ( $wmgUseGather ) {
require_once "$IP/extensions/Gather/Gather.php";
}
-
-   // Enable browse experiment (T101155)
-   $wgMFIsBrowseEnabled = $wmgMFIsBrowseEnabled;
-   $wgMFBrowseTags = array();
-
-   if ( $wgMFIsBrowseEnabled ) {
-   $wgMFBrowseTags = array(
-   'San Francisco landmarks' => array(
-   'Alcatraz Island',
-   'Golden Gate Bridge',
-   'Presidio of San Francisco',
-   'Lombard Street (San Francisco)',
-   'Golden Gate Park',
-   'City Lights Bookstore',
-   'Coit Tower',
-   'San Francisco cable car system',
-   'Palace of Fine Arts',
-   'Alamo Square, San Francisco',
-   'Fort Point, San Francisco',
-   'Grace Cathedral, San Francisco',
-   'San Francisco Ferry Building',
-   'AT Park',
-   'Yerba Buena Gardens',
-   'Castro Theatre',
-   'Transamerica Pyramid',
-   'San Francisco Museum of Modern Art',
-   'Candlestick Park',
-   'San Francisco Zoo',
-   'Fairmont San Francisco',
-   'Fort Mason',
-   'Ghirardelli Square',
-   'Crissy Field',
-   'San Francisco Botanical Garden',
-   'Barbary Coast Trail',
-   'Duboce Park',
-   'Flatiron Building (San Francisco)',
-   'Lands End (San Francisco)',
-   'San Francisco Mint',
-   'Crissy Field',
-   'San Francisco Naval Shipyard',
-   'Dolores Park',
-   'Jack Kerouac Alley',
-   'San Francisco Cable Car Museum',
-   'Balboa Park, San Francisco',
-   'Panhandle (San Francisco)',
-   'San Francisco City Hall',
-   'Victoria Theatre, San Francisco',
-   'Union Square, San Francisco',
-   'San Francisco Armory',
-   'Mitchell Brothers O\'Farrell Theatre',
-   'Seal Rocks (San Francisco, California)',
-   'San Francisco–Oakland Bay Bridge',
-   'Asian Art Museum of San Francisco',
-   'San Francisco Public Library',
-   'Levi\'s Plaza',
-   'Louise M. Davies Symphony Hall',
-   'Moscone Center',
-   'San Francisco Federal Building',
-   ),
-   'western Europe' => array(
-   'Germany',
-   'France',
-   'United Kingdom',
-   'Italy',
-   'Spain',
-   'Netherlands',
-   'Belgium',
-   'Greece',
-   'Portugal',
-   'Sweden',
-   'Austria',
-   'Switzerland',
-   'Denmark',
-   'Finland',
-   'Norway',
-   'Ireland',
-   'Luxembourg',
-   'Iceland',
-   'Vatican City',
-   'Monaco',
-   'Principality of 

[MediaWiki-commits] [Gerrit] WikiEditor integration: Fix dependencies for switch button - change (mediawiki...VisualEditor)

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

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

Change subject: WikiEditor integration: Fix dependencies for switch button
..

WikiEditor integration: Fix dependencies for switch button

Change-Id: Ic8fb607e8c467e89c0b9af0a9baab84e59b19ba8
---
M extension.json
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
2 files changed, 12 insertions(+), 9 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7b0496b..7184cc9 100644
--- a/extension.json
+++ b/extension.json
@@ -283,7 +283,8 @@
"visualeditor-ca-editsource-section",
"postedit-confirmation-created",
"postedit-confirmation-restored",
-   "postedit-confirmation-saved"
+   "postedit-confirmation-saved",
+   "visualeditor-mweditmodeve-tool"
],
"position": "top"
},
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index cdf38a8..420ed59 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -382,14 +382,16 @@
mw.loader.load( 'ext.visualEditor.switching' );
$caVeEdit.click( init.onEditTabClick );
$( '#wpTextbox1' ).on( 
'wikiEditor-toolbar-doneInitialSections', function () {
-   $( '.wikiEditor-ui-toolbar' ).prepend(
-   new OO.ui.ButtonWidget( {
-   framed: false,
-   icon: 'edit',
-   title: mw.msg( 
'visualeditor-mweditmodeve-tool' ),
-   classes: [ 
've-init-mw-desktopArticleTarget-editSwitch' ]
-   } ).on( 'click', 
init.activateVe ).$element
-   );
+   mw.loader.using( 'oojs-ui', function () 
{
+   $( '.wikiEditor-ui-toolbar' 
).prepend(
+   new OO.ui.ButtonWidget( 
{
+   framed: false,
+   icon: 'edit',
+   title: mw.msg( 
'visualeditor-mweditmodeve-tool' ),
+   classes: [ 
've-init-mw-desktopArticleTarget-editSwitch' ]
+   } ).on( 'click', 
init.activateVe ).$element
+   );
+   } );
} );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8fb607e8c467e89c0b9af0a9baab84e59b19ba8
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] Remove leftover configuration data from the mobile browse ex... - change (operations/mediawiki-config)

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

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

Change subject: Remove leftover configuration data from the mobile browse 
experiment
..

Remove leftover configuration data from the mobile browse experiment

Change-Id: I212cbb547527e6a897509c1dd9f6ecd49943d854
Task: T113686
---
M wmf-config/mobile.php
1 file changed, 0 insertions(+), 523 deletions(-)


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

diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 24ad3c9..f1e0570 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -109,529 +109,6 @@
if ( $wmgUseGather ) {
require_once "$IP/extensions/Gather/Gather.php";
}
-
-   // Enable browse experiment (T101155)
-   $wgMFIsBrowseEnabled = $wmgMFIsBrowseEnabled;
-   $wgMFBrowseTags = array();
-
-   if ( $wgMFIsBrowseEnabled ) {
-   $wgMFBrowseTags = array(
-   'San Francisco landmarks' => array(
-   'Alcatraz Island',
-   'Golden Gate Bridge',
-   'Presidio of San Francisco',
-   'Lombard Street (San Francisco)',
-   'Golden Gate Park',
-   'City Lights Bookstore',
-   'Coit Tower',
-   'San Francisco cable car system',
-   'Palace of Fine Arts',
-   'Alamo Square, San Francisco',
-   'Fort Point, San Francisco',
-   'Grace Cathedral, San Francisco',
-   'San Francisco Ferry Building',
-   'AT Park',
-   'Yerba Buena Gardens',
-   'Castro Theatre',
-   'Transamerica Pyramid',
-   'San Francisco Museum of Modern Art',
-   'Candlestick Park',
-   'San Francisco Zoo',
-   'Fairmont San Francisco',
-   'Fort Mason',
-   'Ghirardelli Square',
-   'Crissy Field',
-   'San Francisco Botanical Garden',
-   'Barbary Coast Trail',
-   'Duboce Park',
-   'Flatiron Building (San Francisco)',
-   'Lands End (San Francisco)',
-   'San Francisco Mint',
-   'Crissy Field',
-   'San Francisco Naval Shipyard',
-   'Dolores Park',
-   'Jack Kerouac Alley',
-   'San Francisco Cable Car Museum',
-   'Balboa Park, San Francisco',
-   'Panhandle (San Francisco)',
-   'San Francisco City Hall',
-   'Victoria Theatre, San Francisco',
-   'Union Square, San Francisco',
-   'San Francisco Armory',
-   'Mitchell Brothers O\'Farrell Theatre',
-   'Seal Rocks (San Francisco, California)',
-   'San Francisco–Oakland Bay Bridge',
-   'Asian Art Museum of San Francisco',
-   'San Francisco Public Library',
-   'Levi\'s Plaza',
-   'Louise M. Davies Symphony Hall',
-   'Moscone Center',
-   'San Francisco Federal Building',
-   ),
-   'western Europe' => array(
-   'Germany',
-   'France',
-   'United Kingdom',
-   'Italy',
-   'Spain',
-   'Netherlands',
-   'Belgium',
-   'Greece',
-   'Portugal',
-   'Sweden',
-   'Austria',
-   'Switzerland',
-   'Denmark',
-   'Finland',
-   'Norway',
-   'Ireland',
-   'Luxembourg',
-   'Iceland',
-   'Vatican City',
-   'Monaco',
-

[MediaWiki-commits] [Gerrit] Remove proofreadpage.php - change (operations/mediawiki-config)

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

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

Change subject: Remove proofreadpage.php
..

Remove proofreadpage.php

Change-Id: Ib475e143abf0404170ab12df1bdf0a98447b9b85
---
M wmf-config/CommonSettings.php
D wmf-config/proofreadpage.php
2 files changed, 5 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5587324..3c4b7c6 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -586,7 +586,11 @@
 
 if ( $wmgUseProofreadPage ) {
include( $IP . '/extensions/ProofreadPage/ProofreadPage.php' );
-   include( "$wmfConfigDir/proofreadpage.php" );
+   if ( $wgDBname == 'dewikisource' ) {
+   $wgGroupPermissions['*']['pagequality'] = true; # 27516
+   } elseif ( $wgDBname == 'enwikisource' || $wgDBname == 'svwikisource' ) 
{
+   $wgDefaultUserOptions['proofreadpage-showheaders'] = 1;
+   }
 }
 if ( $wmgUseLabeledSectionTransclusion ) {
include( $IP . '/extensions/LabeledSectionTransclusion/lst.php' );
diff --git a/wmf-config/proofreadpage.php b/wmf-config/proofreadpage.php
deleted file mode 100644
index 730676c..000
--- a/wmf-config/proofreadpage.php
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gerrit.wikimedia.org/r/251685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Remove proofreadpage.php - change (operations/mediawiki-config)

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

Change subject: Remove proofreadpage.php
..


Remove proofreadpage.php

Change-Id: Ib475e143abf0404170ab12df1bdf0a98447b9b85
---
M wmf-config/CommonSettings.php
D wmf-config/proofreadpage.php
2 files changed, 5 insertions(+), 14 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5587324..3c4b7c6 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -586,7 +586,11 @@
 
 if ( $wmgUseProofreadPage ) {
include( $IP . '/extensions/ProofreadPage/ProofreadPage.php' );
-   include( "$wmfConfigDir/proofreadpage.php" );
+   if ( $wgDBname == 'dewikisource' ) {
+   $wgGroupPermissions['*']['pagequality'] = true; # 27516
+   } elseif ( $wgDBname == 'enwikisource' || $wgDBname == 'svwikisource' ) 
{
+   $wgDefaultUserOptions['proofreadpage-showheaders'] = 1;
+   }
 }
 if ( $wmgUseLabeledSectionTransclusion ) {
include( $IP . '/extensions/LabeledSectionTransclusion/lst.php' );
diff --git a/wmf-config/proofreadpage.php b/wmf-config/proofreadpage.php
deleted file mode 100644
index 730676c..000
--- a/wmf-config/proofreadpage.php
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gerrit.wikimedia.org/r/251685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING - change (mediawiki/core)

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

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

Change subject: Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING
..

Upgrade JobRunner "COMMIT ENQUEUED" log entries to WARNING

Change-Id: I3f3bbb5c3a59975e152b099481dc07617c845b8e
---
M includes/jobqueue/JobRunner.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/251689/1

diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 7ce731d..318330e 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -467,7 +467,7 @@
 
$ms = intval( 1000 * $dbwSerial->pendingWriteQueryDuration() );
$msg = $job->toString() . " COMMIT ENQUEUED [{$ms}ms of 
writes]";
-   $this->logger->info( $msg );
+   $this->logger->warning( $msg );
$this->debugCallback( $msg );
 
// Wait for an exclusive lock to commit

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

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

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


[MediaWiki-commits] [Gerrit] Break long lines and cleanup some RefreshLinksJob checks - change (mediawiki/core)

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

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

Change subject: Break long lines and cleanup some RefreshLinksJob checks
..

Break long lines and cleanup some RefreshLinksJob checks

Change-Id: I02c007a2c2032610551d71ce1b21e03db5c011db
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/251688/1

diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 25c3ba4..5f1a1a6 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -216,10 +216,10 @@
$title, null, !empty( 
$this->params['useRecursiveLinksUpdate'] ), $parserOutput );
foreach ( $updates as $key => $update ) {
if ( $update instanceof LinksUpdate ) {
-   if ( isset( $this->params['triggeredRecursive'] 
) ) {
+   if ( !empty( 
$this->params['triggeredRecursive'] ) ) {
$update->setTriggeredRecursive();
}
-   if ( isset( $this->params['triggeringUser'] ) 
&& $this->params['triggeringUser'] ) {
+   if ( !empty( $this->params['triggeringUser'] ) 
) {
$userInfo = 
$this->params['triggeringUser'];
if ( $userInfo['userId'] ) {
$user = User::newFromId( 
$userInfo['userId'] );
@@ -229,7 +229,7 @@
}
$update->setTriggeringUser( $user );
}
-   if ( isset( 
$this->params['triggeringRevisionId'] ) && 
$this->params['triggeringRevisionId'] ) {
+   if ( !empty( 
$this->params['triggeringRevisionId'] ) ) {
$revision = Revision::newFromId( 
$this->params['triggeringRevisionId'] );
if ( $revision === null ) {
$revision = Revision::newFromId(

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

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

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


[MediaWiki-commits] [Gerrit] Add phpcs.xml - change (mediawiki...WikiGrok)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Add phpcs.xml
..

Add phpcs.xml

Use the xml file for config instead of commands in composer.json

Change-Id: I78c2001c16b59465e407c92680b6c7944514b2a8
---
M composer.json
A phpcs.xml
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok 
refs/changes/64/251464/1

diff --git a/composer.json b/composer.json
index 263ca10..48e2014 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
-   "phpcs 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--extensions=php,php5,inc --ignore=vendor -p ."
+   "phpcs -p -s"
]
}
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+
+
+   
+   .
+   
+   
+   vendor
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78c2001c16b59465e407c92680b6c7944514b2a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Add phpcs.xml - change (mediawiki...PronunciationRecording)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Add phpcs.xml
..

Add phpcs.xml

Use the xml file for config instead of commands in composer.json

Change-Id: I188668140405caf5ed44ead0b96ab9685f87ff9c
---
M composer.json
A phpcs.xml
2 files changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 263ca10..48e2014 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
-   "phpcs 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--extensions=php,php5,inc --ignore=vendor -p ."
+   "phpcs -p -s"
]
}
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+
+
+   
+   .
+   
+   
+   vendor
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I188668140405caf5ed44ead0b96ab9685f87ff9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...AbsenteeLandlord)

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

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

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

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



diff --git a/composer.json b/composer.json
index 4365e8a..99741dd 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e1cc51a0432b0e1f5d587c1bcc56ad4fea7a0a6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbsenteeLandlord
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] Add phpcs.xml - change (mediawiki...LanguageTool)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Add phpcs.xml
..

Add phpcs.xml

Use the xml file for config instead of commands in composer.json

Change-Id: Ib099af173eff3a4edee5db5aea09aa19dfbc8083
---
M composer.json
A phpcs.xml
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LanguageTool 
refs/changes/65/251465/1

diff --git a/composer.json b/composer.json
index a11b1db..7998a2c 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
-   "phpcs . -p 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--ignore=vendor/*,node_modules/* --extensions=php"
+   "phpcs -p"
]
}
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+
+
+   
+   .
+   
+   
+   vendor
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib099af173eff3a4edee5db5aea09aa19dfbc8083
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LanguageTool
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Revert "cassandra: add xenon-b instance" - change (operations/puppet)

2015-11-06 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: Revert "cassandra: add xenon-b instance"
..

Revert "cassandra: add xenon-b instance"

ATM the eqiad test cluster doesn't have enough disk space to accomodate two
instances per machine

This reverts commit 81a2424920db5444defda61c6577efb477b99db0.

Change-Id: I84a7db19bcf372ce4e4644e9e5a3058502303c6a
---
M hieradata/hosts/xenon.yaml
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/251481/1

diff --git a/hieradata/hosts/xenon.yaml b/hieradata/hosts/xenon.yaml
index 6a1e7b7..bbb2f42 100644
--- a/hieradata/hosts/xenon.yaml
+++ b/hieradata/hosts/xenon.yaml
@@ -7,8 +7,3 @@
 listen_address: 10.64.0.202
 rpc_address: 10.64.0.202
 rpc_interface: eth0
-  b:
-jmx_port: 7190
-listen_address: 10.64.0.203
-rpc_address: 10.64.0.203
-rpc_interface: eth0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84a7db19bcf372ce4e4644e9e5a3058502303c6a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] Revert "cassandra: add xenon-b instance" - change (operations/puppet)

2015-11-06 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Revert "cassandra: add xenon-b instance"
..


Revert "cassandra: add xenon-b instance"

ATM the eqiad test cluster doesn't have enough disk space to accomodate two
instances per machine

This reverts commit 81a2424920db5444defda61c6577efb477b99db0.

Change-Id: I84a7db19bcf372ce4e4644e9e5a3058502303c6a
---
M hieradata/hosts/xenon.yaml
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/hosts/xenon.yaml b/hieradata/hosts/xenon.yaml
index 6a1e7b7..bbb2f42 100644
--- a/hieradata/hosts/xenon.yaml
+++ b/hieradata/hosts/xenon.yaml
@@ -7,8 +7,3 @@
 listen_address: 10.64.0.202
 rpc_address: 10.64.0.202
 rpc_interface: eth0
-  b:
-jmx_port: 7190
-listen_address: 10.64.0.203
-rpc_address: 10.64.0.203
-rpc_interface: eth0

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

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

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


[MediaWiki-commits] [Gerrit] Add inline documentation to gui.js and fix some style issues - change (wikidata...rdf)

2015-11-06 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Add inline documentation to gui.js and fix some style issues
..

Add inline documentation to gui.js and fix some style issues

The other files (other than gui.js) do have a lot more issues but I
did not wanted to make this patch to big. Will continue working on
them in later patches.

Change-Id: I2e049e6bac30538e5e14230816b278789223ecfb
---
M gui/gui.js
M gui/index.html
M gui/style.css
M gui/wikibase/codemirror/addon/hint/wikibase-rdf-hint.js
M gui/wikibase/codemirror/addon/hint/wikibase-sparql-hint.js
M gui/wikibase/codemirror/addon/tooltip/WikibaseRDFTooltip.js
6 files changed, 128 insertions(+), 79 deletions(-)


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

diff --git a/gui/gui.js b/gui/gui.js
index 355a383..f941b8d 100644
--- a/gui/gui.js
+++ b/gui/gui.js
@@ -41,7 +41,7 @@
'hint': 'http://www.bigdata.com/queryHints#'
}
},
-   STANDARD_PREFIXES =[
+   STANDARD_PREFIXES = [
'PREFIX wd: ',
'PREFIX wdt: ',
'PREFIX wikibase: ',
@@ -63,24 +63,24 @@
LAST_RESULT = null,
DOWNLOAD_FORMATS = {
'CSV': {
-   handler: getCSVData,
+   handler: getCsvData,
mimetype: 'text/csv;charset=utf-8'
},
'JSON': {
-   handler: getJSONData,
+   handler: getJsonData,
mimetype: 'application/json;charset=utf-8'
},
'TSV': {
-   handler: getSparqlTSVData,
+   handler: getSparqlTsvData,
mimetype: 
'text/tab-separated-values;charset=utf-8'
},
'Simple TSV': {
-   handler: getSimpleTSVData,
+   handler: getSimpleTsvData,
mimetype: 
'text/tab-separated-values;charset=utf-8',
ext: 'tsv'
},
'Full JSON': {
-   handler: getAllJSONData,
+   handler: getAllJsonData,
mimetype: 'application/json;charset=utf-8',
ext: 'json'
}
@@ -88,6 +88,8 @@
 
/**
 * Submit SPARQL query.
+*
+* @param {Event} e
 */
function submitQuery( e ) {
e.preventDefault();
@@ -119,6 +121,10 @@
 
/**
 * Handle SPARQL error.
+*
+* @param {Object} jqXHR
+* @param {string} textStatus
+* @param {string} errorThrown
 */
function queryResultsError( jqXHR, textStatus, errorThrown ) {
var response,
@@ -139,6 +145,8 @@
 
/**
 * Show results of the query.
+*
+* @param {Object} data
 */
function showQueryResults( data ) {
var results, thead, i, tr, td, linkText, j, binding,
@@ -175,7 +183,7 @@
td = $( '' ) ;
if ( data.head.vars[j] in 
data.results.bindings[i] ) {
binding = 
data.results.bindings[i][data.head.vars[j]];
-   text = binding.value;
+   var text = binding.value;
if ( binding.type === 'uri' ) {
text = abbreviate( text );
}
@@ -195,7 +203,7 @@
if ( 
binding.value.match( EXPLORE_URL ) ) {
td.append( $( 
'' )
.attr( 
'href', '#' )
-   .bind( 
'click', exploreURL.bind( undefined, binding.value ) )
+   .bind( 
'click', exploreUrl.bind( undefined, binding.value ) )
.text( 
'*' )
);
}
@@ -222,6 +230,9 @@
 
/**
 

[MediaWiki-commits] [Gerrit] Repool 34, 42, 35, 38, 39, 40. New: 58, 64, 60, 61, 62, 59. Depool: 44... - change (operations/mediawiki-config)

2015-11-06 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review.

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

Change subject: Repool 34,42,35,38,39,40. New: 58,64,60,61,62,59. Depool: 
44,45,48
..

Repool 34,42,35,38,39,40. New: 58,64,60,61,62,59. Depool: 44,45,48

Maintenance tasks needed to pool newly deployed database servers.

Change-Id: Ie258b28fe12ba8aeac8ceff156fea663135d299f
References: T84428
---
M wmf-config/db-codfw.php
1 file changed, 15 insertions(+), 9 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 19f5da3..3d9b944 100755
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -91,18 +91,20 @@
's1' => array(
'db1052' => 0,   # 2.8TB  96GB
'db2016' => 100,
-#  'db2034' => 100, (down: T117858)
-#  'db2042' => 100,
-   'db2048' => 100,
+   'db2034' => 100,
+   'db2042' => 100,
+#  'db2048' => 100, in maintenance
'db2055' => 100,
+   'db2062' => 100,
),
's2' => array(
'db1024' => 0,   # 1.4TB  64GB
'db2017' => 100,
-#  'db2035' => 100, (down for maintenance)
+   'db2035' => 100,
'db2041' => 100,
'db2049' => 100,
'db2063' => 100,
+   'db2064' => 100,
),
/* s3 */ 'DEFAULT' => array(
'db1038' => 0,   # 1.4TB  64GB
@@ -116,29 +118,33 @@
'db1040' => 0,   # 1.4TB  64GB
'db2019' => 100,
'db2037' => 100,
-   'db2044' => 100,
+#  'db2044' => 100, in maintenance
'db2051' => 100,
+   'db2058' => 100,
),
's5' => array(
'db1058' => 0,   # 2.8TB  96GB
'db2023' => 100,
-#  'db2038' => 100,
-   'db2045' => 100,
+   'db2038' => 100,
+#  'db2045' => 100, in maintenance
'db2052' => 100,
+   'db2059' => 100,
),
's6' => array(
'db1023' => 0,   # 1.4TB  64GB
'db2028' => 100,
-#  'db2039' => 100,
+   'db2039' => 100,
'db2046' => 100,
'db2053' => 100,
+   'db2060' => 100,
),
's7' => array(
'db1033' => 0,   # 1.4TB  64GB,
'db2029' => 100,
-#  'db2040' => 100,
+   'db2040' => 100,
'db2047' => 100,
'db2054' => 100,
+   'db2061' => 100,
),
'silver' => array(
'silver' => 100,   # I have no idea if this is right

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

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

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


[MediaWiki-commits] [Gerrit] Remove archived extension - change (mediawiki...WikiGrok)

2015-11-06 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: Remove archived extension
..


Remove archived extension

Bug: T117263
Change-Id: I78c2001c16b59465e407c92680b6c7944514b2a8
---
D .docs/jsduckCustomTags.rb
D .jsbeautifyrc
D .jscsrc
D .jscsrctest.js
D .jshintignore
D .jshintrc
D COPYING
D Gruntfile.js
D Makefile
M WikiGrok.php
D composer.json
D dev-scripts/.htaccess
D dev-scripts/cachedpage.sh
D dev-scripts/cucumber.sh
D dev-scripts/cucumber_check.sh
D dev-scripts/kss-node-check.sh
D dev-scripts/nodecheck.sh
D dev-scripts/phpcheck.sh
D dev-scripts/phplint.sh
D dev-scripts/pre-commit
D dev-scripts/pre-review
D dev-scripts/remotecheck.sh
D dev-scripts/unused-images.sh
D dev-scripts/validatehtml.sh
D i18n/arq.json
D i18n/bcl.json
D i18n/bn.json
D i18n/ca.json
D i18n/ce.json
D i18n/cs.json
D i18n/de.json
D i18n/el.json
D i18n/en-gb.json
D i18n/en.json
D i18n/es.json
D i18n/fi.json
D i18n/fr.json
D i18n/fy.json
D i18n/gl.json
D i18n/he.json
D i18n/hu.json
D i18n/ia.json
D i18n/id.json
D i18n/is.json
D i18n/it.json
D i18n/ja.json
D i18n/ko.json
D i18n/ksh.json
D i18n/ku-latn.json
D i18n/lb.json
D i18n/ln.json
D i18n/lrc.json
D i18n/lt.json
D i18n/mk.json
D i18n/mni.json
D i18n/mr.json
D i18n/ms.json
D i18n/nb.json
D i18n/nl.json
D i18n/om.json
D i18n/pam.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt.json
D i18n/qqq.json
D i18n/ru.json
D i18n/sco.json
D i18n/sd.json
D i18n/sr-ec.json
D i18n/sr-el.json
D i18n/sv.json
D i18n/sw.json
D i18n/ta.json
D i18n/tr.json
D i18n/vi.json
D i18n/vo.json
D i18n/xmf.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D includes/Aggregator.php
D includes/Claim.php
D includes/EventLogger.php
D includes/Hooks.php
D includes/QuestionCache.php
D includes/QuestionPicker.php
D includes/QuestionStore.php
D includes/Resources.php
D includes/Response.php
D includes/ResponseStore.php
D includes/ResponseStoreDB.php
D includes/WikibaseClientConnector.php
D includes/WikibaseRepoConnector.php
D includes/api/ApiResponse.php
D includes/api/QueryRandom.php
D includes/campaigns/Campaign.php
D includes/campaigns/ConfirmationCampaign.php
D includes/campaigns/LinkedPropsCampaign.php
D includes/campaigns/SimpleCampaign.php
D maintenance/cleanupOldData.php
D maintenance/refreshCampaigns.php
D package.json
D resources/api/WikiGrokResponseApi.js
D resources/dialog.c/DialogC.less
D resources/dialog.c/WikiGrokDialogC.js
D resources/dialog.c/WikiGrokRouletteBadge.hogan
D resources/dialog.c/wg-badge-1.svg
D resources/dialog.c/wg-badge-10.svg
D resources/dialog.c/wg-badge-100.svg
D resources/dialog.c/wg-badge-20.svg
D resources/dialog.c/wg-badge-3.svg
D resources/dialog.c/wg-badge-5.svg
D resources/dialog.c/wg-badge-50.svg
D resources/dialog/WikiGrokDialog.hogan
D resources/dialog/WikiGrokDialog.js
D resources/dialog/WikiGrokDialog.less
D resources/dialog/WikiGrokMoreInfo.hogan
D resources/dialog/WikiGrokMoreInfo.js
D resources/dialog/checked.svg
D resources/dialog/heart.svg
D resources/dialog/tagButton.hogan
D resources/dialog/tagButton.less
D resources/dialog/unchecked.svg
D resources/dialog/w.svg
D resources/dialog/wikigrok.svg
D resources/loggingSchema/SchemaMobileWebWikiGrok.js
D resources/roulette/ErrorDrawer.js
D resources/roulette/InfoOverlay.hogan
D resources/roulette/InfoOverlay.js
D resources/roulette/InfoOverlay.less
D resources/roulette/contribute.svg
D resources/roulette/error.hogan
D resources/roulette/header.mustache
D resources/roulette/init.js
D resources/roulette/mainMenu.less
D resources/roulette/new.svg
D resources/roulette/wikiGrokRoulette.js
D resources/roulette/wikigrok.svg
D resources/startup/init.js
D resources/startup/wikiGrokCampaigns.js
D resources/startup/wikigrokuser.js
D sql/wikigrok_claims.sql
D sql/wikigrok_questions.sql
D sql/wikigrok_responses.sql
D tests/phpunit/AggregatorTest.php
D tests/phpunit/ResponseStoreDBTest.php
D tests/phpunit/api/ApiResponseTest.php
D tests/qunit/roulette/test_InfoOverlay.js
D tests/qunit/test_WikiGrokDialog.js
D tests/qunit/test_WikiGrokDialogC.js
D tests/qunit/test_WikiGrokResponseApi.js
D tests/qunit/test_wikiGrokCampaigns.js
151 files changed, 2 insertions(+), 8,687 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78c2001c16b59465e407c92680b6c7944514b2a8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 

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


[MediaWiki-commits] [Gerrit] Assign salt grains for dbstore systems - change (operations/puppet)

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

Change subject: Assign salt grains for dbstore systems
..


Assign salt grains for dbstore systems

These don't use the role keyword (and are not straightforward to convert
since they instantiate parametrised classes), so define the Hiera values
via regex.yaml

Change-Id: I9e1c28a8698c76e508c7610a933d5afb48d3656f
---
M hieradata/regex.yaml
M modules/debdeploy/templates/debdeploy.erb
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 3c2c7c8..330856c 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -244,3 +244,8 @@
   # no trailing comma!
   ]
   swift_aux_partitions: ['/dev/sda3', '/dev/sdb3']
+debdeploy_dbstore:
+  __regex: !ruby/regexp /^dbstore[12]00[12]]\.(eqiad|codfw)\.wmnet$/
+  debdeploy::grains:
+debdeploy-db-dbstore:
+  value: standard
diff --git a/modules/debdeploy/templates/debdeploy.erb 
b/modules/debdeploy/templates/debdeploy.erb
index c7e898a..66ba0e5 100644
--- a/modules/debdeploy/templates/debdeploy.erb
+++ b/modules/debdeploy/templates/debdeploy.erb
@@ -116,3 +116,4 @@
 mw-canary-single = debdeploy-appserver:single_canary
 openldap-corp = debdeploy-openldap-corp:standard
 openldap-corp-canary = debdeploy-openldap-corp:canary
+debdeploy-db-dbstore = debdeploy-db-dbstore:standard

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

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

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


[MediaWiki-commits] [Gerrit] Repool 34, 42, 35, 38, 39, 40. New: 58, 64, 60, 61, 62, 59. Depool: 44... - change (operations/mediawiki-config)

2015-11-06 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Repool 34,42,35,38,39,40. New: 58,64,60,61,62,59. Depool: 
44,45,48
..


Repool 34,42,35,38,39,40. New: 58,64,60,61,62,59. Depool: 44,45,48

Maintenance tasks needed to pool newly deployed database servers.

Change-Id: Ie258b28fe12ba8aeac8ceff156fea663135d299f
References: T84428
---
M wmf-config/db-codfw.php
1 file changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 19f5da3..3d9b944 100755
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -91,18 +91,20 @@
's1' => array(
'db1052' => 0,   # 2.8TB  96GB
'db2016' => 100,
-#  'db2034' => 100, (down: T117858)
-#  'db2042' => 100,
-   'db2048' => 100,
+   'db2034' => 100,
+   'db2042' => 100,
+#  'db2048' => 100, in maintenance
'db2055' => 100,
+   'db2062' => 100,
),
's2' => array(
'db1024' => 0,   # 1.4TB  64GB
'db2017' => 100,
-#  'db2035' => 100, (down for maintenance)
+   'db2035' => 100,
'db2041' => 100,
'db2049' => 100,
'db2063' => 100,
+   'db2064' => 100,
),
/* s3 */ 'DEFAULT' => array(
'db1038' => 0,   # 1.4TB  64GB
@@ -116,29 +118,33 @@
'db1040' => 0,   # 1.4TB  64GB
'db2019' => 100,
'db2037' => 100,
-   'db2044' => 100,
+#  'db2044' => 100, in maintenance
'db2051' => 100,
+   'db2058' => 100,
),
's5' => array(
'db1058' => 0,   # 2.8TB  96GB
'db2023' => 100,
-#  'db2038' => 100,
-   'db2045' => 100,
+   'db2038' => 100,
+#  'db2045' => 100, in maintenance
'db2052' => 100,
+   'db2059' => 100,
),
's6' => array(
'db1023' => 0,   # 1.4TB  64GB
'db2028' => 100,
-#  'db2039' => 100,
+   'db2039' => 100,
'db2046' => 100,
'db2053' => 100,
+   'db2060' => 100,
),
's7' => array(
'db1033' => 0,   # 1.4TB  64GB,
'db2029' => 100,
-#  'db2040' => 100,
+   'db2040' => 100,
'db2047' => 100,
'db2054' => 100,
+   'db2061' => 100,
),
'silver' => array(
'silver' => 100,   # I have no idea if this is right

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

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

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


[MediaWiki-commits] [Gerrit] New URL for landing page - change (mediawiki...BlueSpiceExtensions)

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

Change subject: New URL for landing page
..


New URL for landing page

The URL for About BlueSpice landing page has changed.

PatchSet3:
* removed dependencies

Change-Id: I381d501238bd870b63c9c75c21d12cb21d57d3a4
---
M AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php 
b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php
index b5da6be..9a0399e 100644
--- a/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php
+++ b/AboutBlueSpice/includes/specials/SpecialAboutBlueSpice.class.php
@@ -36,10 +36,10 @@
$sLang = $this->getLanguage()->getCode();
switch ( substr( $sLang, 0, 2 ) ) {
case "de" :
-   $sUrl = "http://de.bluespice.com;;
+   $sUrl = 
"http://de.bluespice.com/about-bluespice/;;
break;
default :
-   $sUrl = "http://www.bluespice.com;;
+   $sUrl = "http://bluespice.com/about-bluespice/;;
};
 
$sOutHTML = '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I381d501238bd870b63c9c75c21d12cb21d57d3a4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] UEModulePDF: fix for page-break issues in PDF - change (mediawiki...BlueSpiceExtensions)

2015-11-06 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: UEModulePDF: fix for page-break issues in PDF
..

UEModulePDF: fix for page-break issues in PDF

This fixes issues with table pagination and page-breaks before and after
paper format changing elements

Change-Id: I718ad73f26269c0db7c91f1796bc46ca38a2cb84
---
M UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
1 file changed, 2 insertions(+), 14 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/70/251470/1

diff --git a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css 
b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
index 87806bb..a459983 100644
--- a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
+++ b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
@@ -85,20 +85,16 @@
 .bs-rotated, .rotated {
page: rotated;
width: 25.8cm; /* DIN A4 landscape minus margins minus some space :) : 
29.7 - 1 - 2.5 - 0.4 */
-   page-break-before: right;
-   page-break-after: always;
 }
 
 .bs-narrow, .narrow {
page: narrow;
-   page-break-before: always;
-   page-break-after: always;
+   width: 5.1cm; /* width minus margins minus some space: 9 - 1 - 2.5 - 
0.4 */
 }
 
 .bs-ultrawide, .ultrawide {
page: ultrawide;
-   page-break-before: always;
-   page-break-after: always;
+   width: 55.5cm; /* Double DIN A4 landscape minus margins minus some 
space: 58.4 - 1 - 2.5 - 0.4 */
 }
 
 /* Generated content elements */
@@ -163,13 +159,5 @@
 table {
clear: both; /* Is this wise? Prevents floating thumbs from overlapping 
into tables and TOC table */
-fs-table-paginate: paginate; /* special xhtmlrenderer (flying saucer 
-> fs) property */
-   page-break-inside: avoid;
 }
 
-thead {
-   page-break-after: avoid;
-}
-
-tbody {
-   page-break-inside: avoid;
-}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I718ad73f26269c0db7c91f1796bc46ca38a2cb84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] redis: install two additional redis servers - change (operations/puppet)

2015-11-06 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: redis: install two additional redis servers
..

redis: install two additional redis servers

These are old lsearchd boxes we're repurposing temporarily, while we
wait for the new hardware.

Bug: T117916
Change-Id: I7c2263aeae2dd38f3066b8dedeaca944cf64d2c4
---
A hieradata/hosts/rdb1007.yaml
A hieradata/hosts/rdb1008.yaml
M hieradata/role/common/db/redis.yaml
M manifests/site.pp
4 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/251469/1

diff --git a/hieradata/hosts/rdb1007.yaml b/hieradata/hosts/rdb1007.yaml
new file mode 100644
index 000..315f3cd
--- /dev/null
+++ b/hieradata/hosts/rdb1007.yaml
@@ -0,0 +1 @@
+role::db::redis::dir: "/srv/redis"
diff --git a/hieradata/hosts/rdb1008.yaml b/hieradata/hosts/rdb1008.yaml
new file mode 100644
index 000..315f3cd
--- /dev/null
+++ b/hieradata/hosts/rdb1008.yaml
@@ -0,0 +1 @@
+role::db::redis::dir: "/srv/redis"
diff --git a/hieradata/role/common/db/redis.yaml 
b/hieradata/role/common/db/redis.yaml
index c74109b..4e6f695 100644
--- a/hieradata/role/common/db/redis.yaml
+++ b/hieradata/role/common/db/redis.yaml
@@ -2,4 +2,5 @@
 role::db::redis::redis_replication:
   rdb1002: rdb1001
   rdb1004: rdb1003
+  rdb1008: rdb1007
 role::db::redis::dir: "/a/redis"
diff --git a/manifests/site.pp b/manifests/site.pp
index c2e421a..49c2db5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2240,7 +2240,7 @@
 role rcstream
 }
 
-node /^rdb100[1-4]\.eqiad\.wmnet/ {
+node /^rdb101[0-9]\.eqiad\.wmnet/ {
 role db::redis
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c2263aeae2dd38f3066b8dedeaca944cf64d2c4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] redis: install two additional redis servers - change (operations/puppet)

2015-11-06 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: redis: install two additional redis servers
..


redis: install two additional redis servers

These are old lsearchd boxes we're repurposing temporarily, while we
wait for the new hardware.

Bug: T117916
Change-Id: I7c2263aeae2dd38f3066b8dedeaca944cf64d2c4
---
A hieradata/hosts/rdb1007.yaml
A hieradata/hosts/rdb1008.yaml
M hieradata/role/common/db/redis.yaml
M manifests/site.pp
4 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/hosts/rdb1007.yaml b/hieradata/hosts/rdb1007.yaml
new file mode 100644
index 000..315f3cd
--- /dev/null
+++ b/hieradata/hosts/rdb1007.yaml
@@ -0,0 +1 @@
+role::db::redis::dir: "/srv/redis"
diff --git a/hieradata/hosts/rdb1008.yaml b/hieradata/hosts/rdb1008.yaml
new file mode 100644
index 000..315f3cd
--- /dev/null
+++ b/hieradata/hosts/rdb1008.yaml
@@ -0,0 +1 @@
+role::db::redis::dir: "/srv/redis"
diff --git a/hieradata/role/common/db/redis.yaml 
b/hieradata/role/common/db/redis.yaml
index c74109b..4e6f695 100644
--- a/hieradata/role/common/db/redis.yaml
+++ b/hieradata/role/common/db/redis.yaml
@@ -2,4 +2,5 @@
 role::db::redis::redis_replication:
   rdb1002: rdb1001
   rdb1004: rdb1003
+  rdb1008: rdb1007
 role::db::redis::dir: "/a/redis"
diff --git a/manifests/site.pp b/manifests/site.pp
index c2e421a..7919c95 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2240,7 +2240,7 @@
 role rcstream
 }
 
-node /^rdb100[1-4]\.eqiad\.wmnet/ {
+node /^rdb100[0-9]\.eqiad\.wmnet/ {
 role db::redis
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Update codesniffer version - change (mediawiki...Vector)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Update codesniffer version
..

Update codesniffer version

mediawiki/mediawiki-codesniffer: 0.4.0 -> 0.5.0

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/73/251473/1

diff --git a/composer.json b/composer.json
index 0180de0..e7df596 100644
--- a/composer.json
+++ b/composer.json
@@ -34,7 +34,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.*",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I996b30e2e3626dfc93579d5b1be229e49e775179
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Update codesniffer version - change (mediawiki...Slate)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Update codesniffer version
..

Update codesniffer version

mediawiki/mediawiki-codesniffer: 0.3.0 -> 0.5.0

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Slate 
refs/changes/74/251474/1

diff --git a/composer.json b/composer.json
index df18392..311e335 100644
--- a/composer.json
+++ b/composer.json
@@ -39,7 +39,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.*",
-   "mediawiki/mediawiki-codesniffer": "0.3.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1de37facd1bcb1df2885178066cdd14115da78cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Slate
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] UEModulePDF: fix for page-break issues in PDF - change (mediawiki...BlueSpiceExtensions)

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

Change subject: UEModulePDF: fix for page-break issues in PDF
..


UEModulePDF: fix for page-break issues in PDF

This fixes issues with table pagination and page-breaks before and after
paper format changing elements

Backport of https://gerrit.wikimedia.org/r/251470

Change-Id: I284935b8cb705991fdaaa6e38b1887b6cfb83bcf
---
M UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
1 file changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css 
b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
index 1bb7563..3434a75 100644
--- a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
+++ b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
@@ -84,20 +84,17 @@
 
 .bs-rotated, .rotated {
 page: rotated;
-page-break-before: right;
-page-break-after: always;
+width: 25.8cm; /* DIN A4 landscape minus margins minus some space :) : 
29.7 - 1 - 2.5 - 0.4 */
 }

 .bs-narrow, .narrow {
 page: narrow;
-page-break-before: always;
-page-break-after: always;
+width: 5.1cm; /* width minus margins minus some space: 9 - 1 - 2.5 - 0.4 */
 }
 
 .bs-ultrawide, .ultrawide {
 page: ultrawide;
-page-break-before: always;
-page-break-after: always;
+width: 55.5cm; /* Double DIN A4 landscape minus margins minus some space: 
58.4 - 1 - 2.5 - 0.4 */
 }
 
 /* Generated content elements */
@@ -161,4 +158,4 @@
 table {
 clear: both; /* Is this wise? Prevents floating thumbs from overlapping 
into tables and TOC table */
 -fs-table-paginate: paginate; /* special xhtmlrenderer (flying saucer -> 
fs) property */
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I284935b8cb705991fdaaa6e38b1887b6cfb83bcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] UEModulePDF: fix for page-break issues in PDF - change (mediawiki...BlueSpiceExtensions)

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

Change subject: UEModulePDF: fix for page-break issues in PDF
..


UEModulePDF: fix for page-break issues in PDF

This fixes issues with table pagination and page-breaks before and after
paper format changing elements

Change-Id: I718ad73f26269c0db7c91f1796bc46ca38a2cb84
---
M UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
1 file changed, 2 insertions(+), 14 deletions(-)

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



diff --git a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css 
b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
index 87806bb..a459983 100644
--- a/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
+++ b/UEModulePDF/data/PDFTemplates/common/stylesheets/page.css
@@ -85,20 +85,16 @@
 .bs-rotated, .rotated {
page: rotated;
width: 25.8cm; /* DIN A4 landscape minus margins minus some space :) : 
29.7 - 1 - 2.5 - 0.4 */
-   page-break-before: right;
-   page-break-after: always;
 }
 
 .bs-narrow, .narrow {
page: narrow;
-   page-break-before: always;
-   page-break-after: always;
+   width: 5.1cm; /* width minus margins minus some space: 9 - 1 - 2.5 - 
0.4 */
 }
 
 .bs-ultrawide, .ultrawide {
page: ultrawide;
-   page-break-before: always;
-   page-break-after: always;
+   width: 55.5cm; /* Double DIN A4 landscape minus margins minus some 
space: 58.4 - 1 - 2.5 - 0.4 */
 }
 
 /* Generated content elements */
@@ -163,13 +159,5 @@
 table {
clear: both; /* Is this wise? Prevents floating thumbs from overlapping 
into tables and TOC table */
-fs-table-paginate: paginate; /* special xhtmlrenderer (flying saucer 
-> fs) property */
-   page-break-inside: avoid;
 }
 
-thead {
-   page-break-after: avoid;
-}
-
-tbody {
-   page-break-inside: avoid;
-}
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Make edit link conditional on Special:BrokenRedirects/Double... - change (mediawiki/core)

2015-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Make edit link conditional on 
Special:BrokenRedirects/DoubleRedirects
..

Make edit link conditional on Special:BrokenRedirects/DoubleRedirects

When a user has no permission, do not show a edit link.
Also do not show a edit link when content model does not allow direct
editing, like WikiData item.

For performance reason the special pages now run a LinkBatch to collect
the content model information.

Bug: T117900
Change-Id: Ieb56a6f314059356b95bc045f3d255930d54f213
---
M includes/specials/SpecialBrokenRedirects.php
M includes/specials/SpecialDoubleRedirects.php
2 files changed, 87 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/251478/1

diff --git a/includes/specials/SpecialBrokenRedirects.php 
b/includes/specials/SpecialBrokenRedirects.php
index 701f75f..9ea18da 100644
--- a/includes/specials/SpecialBrokenRedirects.php
+++ b/includes/specials/SpecialBrokenRedirects.php
@@ -121,12 +121,20 @@
array( 'redirect' => 'no' )
);
$links = array();
-   $links[] = Linker::linkKnown(
-   $fromObj,
-   $this->msg( 'brokenredirects-edit' )->escaped(),
-   array(),
-   array( 'action' => 'edit' )
-   );
+   // if the page is editable, add an edit link
+   if (
+   // check user permissions
+   $this->getUser()->isAllowed( 'edit' ) &&
+   // check, if the content model is editable through 
action=edit
+   ContentHandler::getForTitle( $fromObj 
)->supportsDirectEditing()
+   ) {
+   $links[] = Linker::linkKnown(
+   $fromObj,
+   $this->msg( 'brokenredirects-edit' )->escaped(),
+   array(),
+   array( 'action' => 'edit' )
+   );
+   }
$to = Linker::link(
$toObj,
null,
@@ -147,13 +155,37 @@
);
}
 
-   $out .= $this->msg( 'parentheses' )->rawParams( 
$this->getLanguage()
-   ->pipeList( $links ) )->escaped();
+   if ( $links ) {
+   $out .= $this->msg( 'parentheses' )->rawParams( 
$this->getLanguage()
+   ->pipeList( $links ) )->escaped();
+   }
$out .= " {$arr} {$to}";
 
return $out;
}
 
+
+   /**
+* Cache page content model for performance
+*
+* @param IDatabase $db
+* @param ResultWrapper $res
+*/
+   function preprocessResults( $db, $res ) {
+   if ( !$res->numRows() ) {
+   return;
+   }
+
+   $batch = new LinkBatch;
+   foreach ( $res as $row ) {
+   $batch->add( $row->namespace, $row->title );
+   }
+   $batch->execute();
+
+   // Back to start for display
+   $res->seek( 0 );
+   }
+
protected function getGroupName() {
return 'maintenance';
}
diff --git a/includes/specials/SpecialDoubleRedirects.php 
b/includes/specials/SpecialDoubleRedirects.php
index 6d40985..c04582e 100644
--- a/includes/specials/SpecialDoubleRedirects.php
+++ b/includes/specials/SpecialDoubleRedirects.php
@@ -151,14 +151,24 @@
array( 'redirect' => 'no' )
);
 
-   $edit = Linker::linkKnown(
-   $titleA,
-   $this->msg( 'parentheses', $this->msg( 'editlink' 
)->text() )->escaped(),
-   array(),
-   array(
-   'action' => 'edit'
-   )
-   );
+   // if the page is editable, add an edit link
+   if (
+   // check user permissions
+   $this->getUser()->isAllowed( 'edit' ) &&
+   // check, if the content model is editable through 
action=edit
+   ContentHandler::getForTitle( $titleA 
)->supportsDirectEditing()
+   ) {
+   $edit = Linker::linkKnown(
+   $titleA,
+   $this->msg( 'parentheses', $this->msg( 
'editlink' )->text() )->escaped(),
+   array(),
+   array(
+   'action' => 'edit'
+   )
+   );
+

  1   2   3   4   >