[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ChangesListSpecialPage: Add urlversion and make urlversion=2...

2017-06-09 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358157 )

Change subject: ChangesListSpecialPage: Add urlversion and make urlversion=2 
ignore defaults
..

ChangesListSpecialPage: Add urlversion and make urlversion=2 ignore defaults

This allows us to build reliable URLs that will be consistent over time
and between users (because the defaults depend on preferences,
extension presence, etC) by using urlversion=2 and specifying the
state of each filter relative to the empty state (i.e. nothing enabled).

urlversion defaults to 1, and urlversion=1 maintains the current
behavior where the parameters are interpreted relative to the
user's default state.

Bug: T166906
Change-Id: Iaf33c14e3f909092d96453e78016814aa417673a
---
M includes/specialpage/ChangesListSpecialPage.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/358157/1

diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 09ed3c4..1b561ef 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -791,16 +791,18 @@
$config = $this->getConfig();
$opts = new FormOptions();
$structuredUI = $this->getUser()->getOption( 
'rcenhancedfilters' );
+   // If urlversion=2 is set, ignore the filter defaults and set 
them all to false/empty
+   $useDefaults = $this->getRequest()->getInt( 'urlversion' ) !== 
2;
 
// Add all filters
foreach ( $this->filterGroups as $filterGroup ) {
// URL parameters can be per-group, like 'userExpLevel',
// or per-filter, like 'hideminor'.
if ( $filterGroup->isPerGroupRequestParameter() ) {
-   $opts->add( $filterGroup->getName(), 
$filterGroup->getDefault() );
+   $opts->add( $filterGroup->getName(), 
$useDefaults ? $filterGroup->getDefault() : '' );
} else {
foreach ( $filterGroup->getFilters() as $filter 
) {
-   $opts->add( $filter->getName(), 
$filter->getDefault( $structuredUI ) );
+   $opts->add( $filter->getName(), 
$useDefaults ? $filter->getDefault( $structuredUI ) : false );
}
}
}
@@ -808,6 +810,7 @@
$opts->add( 'namespace', '', FormOptions::STRING );
$opts->add( 'invert', false );
$opts->add( 'associated', false );
+   $opts->add( 'urlversion', 1 );
 
return $opts;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Use info itself instead of array index

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

Change subject: Use info itself instead of array index
..


Use info itself instead of array index

Also remove unused variable.

Bug: T167354
Change-Id: I543bcf9c1b3c083288294d2f504378ccafb501d9
---
M LoginNotify_body.php
1 file changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/LoginNotify_body.php b/LoginNotify_body.php
index 6828422..059b86a 100644
--- a/LoginNotify_body.php
+++ b/LoginNotify_body.php
@@ -191,7 +191,6 @@
// edited the most. We only do top ten, to limit the worst-case 
where the
// user has accounts on 800 wikis.
if ( class_exists( 'CentralAuthUser' ) ) {
-   $wikisByEditCounts = [];
$globalUser = CentralAuthUser::getInstance( $user );
if ( $globalUser->exists() ) {
// This is expensive. However, On WMF wikis, 
probably
@@ -207,17 +206,24 @@
}
);
$count = 0;
-   foreach ( $info as $wiki => $localInfo ) {
+   $total = count( $info );
+   foreach ( $info as $localInfo ) {
+   if ( !isset( $localInfo['id'] ) || 
!isset( $localInfo['wiki'] ) ) {
+   wfDebugLog( 'AdHocDebug', 
"Unexpected user data [$count/$total]: "
+   . print_r( $localInfo, 
true ) );
+   break;
+   }
if ( $count > 10 || 
$localInfo['editCount'] < 1 ) {
break;
}
+   $wiki = $localInfo['wiki'];
try {
$lb = wfGetLB( $wiki );
$dbrLocal = $lb->getConnection( 
DB_SLAVE, [], $wiki );
} catch ( DBConnectionError $ex ) {
// FIXME: sometimes, we get 
garbage wiki names (T167354)
-   wfDebugLog( 'AdHocDebug', 
"Couldn't connect to database $wiki, info: "
-   . json_encode( $info ) 
);
+   wfDebugLog( 'AdHocDebug', 
"Couldn't connect to database $wiki [$count/$total], info: "
+   . print_r( $localInfo, 
true ) );
continue;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I543bcf9c1b3c083288294d2f504378ccafb501d9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LoginNotify
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Change AbuseFilter block duration for fawiki

2017-06-09 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358156 )

Change subject: Change AbuseFilter block duration for fawiki
..

Change AbuseFilter block duration for fawiki

Bug: T167562
Change-Id: I6d9db8b5cf0f3daee8bde26a7dc83e7cd220ea2c
---
M wmf-config/abusefilter.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index 5c72dc2..b65a015 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -185,7 +185,7 @@
$wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true;
$wgAbuseFilterActions = [ 'rangeblock' => true ];
$wgAbuseFilterAnonBlockDuration = '7 days'; // T87317
-   $wgAbuseFilterBlockDuration = 'indefinite';
+   $wgAbuseFilterBlockDuration = '14 days'; // T167562
$wgAbuseFilterNotifications = false;
break;
case 'fiwiki': // T59395

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Recover Amazon order IDs when txn captured at console

2017-06-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358155 )

Change subject: Recover Amazon order IDs when txn captured at console
..

Recover Amazon order IDs when txn captured at console

Bug: T167380
Change-Id: I60408a7029d06945ac9dd69af0ebf0f00695cbdf
---
M PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
M PaymentProviders/Amazon/AmazonApi.php
M PaymentProviders/Amazon/Audit/SettlementReport.php
3 files changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/55/358155/1

diff --git a/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php 
b/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
index 21be498..27ff4df 100644
--- a/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
+++ b/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
@@ -18,7 +18,7 @@
return true;
}
$captureReference = $msg->getOrderId();
-   if ( substr( $captureReference, 0, 10 ) !== 'AUTHORIZE_' ) {
+   if ( !AmazonApi::isAmazonGeneratedMerchantReference( 
$captureReference ) ) {
// We only have to fix Amazon-generated IDs with that 
prefix
return true;
}
diff --git a/PaymentProviders/Amazon/AmazonApi.php 
b/PaymentProviders/Amazon/AmazonApi.php
index 6e27411..0cd5763 100644
--- a/PaymentProviders/Amazon/AmazonApi.php
+++ b/PaymentProviders/Amazon/AmazonApi.php
@@ -117,4 +117,8 @@
}
return 
$getDetailsResult['GetOrderReferenceDetailsResult']['OrderReferenceDetails'];
}
+
+   public static function isAmazonGeneratedMerchantReference( $reference ) 
{
+   return substr( $reference, 0, 10 ) === 'AUTHORIZE_';
+   }
 }
diff --git a/PaymentProviders/Amazon/Audit/SettlementReport.php 
b/PaymentProviders/Amazon/Audit/SettlementReport.php
index 9b8f524..991aeb1 100644
--- a/PaymentProviders/Amazon/Audit/SettlementReport.php
+++ b/PaymentProviders/Amazon/Audit/SettlementReport.php
@@ -4,6 +4,7 @@
 use SmashPig\Core\DataFiles\DataFileException;
 use SmashPig\Core\Logging\Logger;
 use SmashPig\Core\UtcDate;
+use SmashPig\PaymentProviders\Amazon\AmazonApi;
 
 /**
  * Parses off-Amazon payments settlement reports retrieved from MWS
@@ -35,7 +36,7 @@
 
/**
 * @param HeadedCsvReader $csv
-* @throws OutOfBoundsException
+* @throws \OutOfBoundsException
 */
protected function parseLine( HeadedCsvReader $csv ) {
$type = $csv->currentCol( 'TransactionType' );
@@ -47,6 +48,10 @@
 
$msg = array();
$orderId = $csv->currentCol( 'SellerReferenceId' );
+   if ( AmazonApi::isAmazonGeneratedMerchantReference( $orderId ) 
) {
+   // If the capture was pushed through via console, it 
might be here:
+   $orderId = $csv->currentCol( 'SellerOrderId' );
+   }
$parts = explode( '-', $orderId );
$msg['contribution_tracking_id'] = $parts[0];
$msg['currency'] = $csv->currentCol( 'CurrencyCode' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60408a7029d06945ac9dd69af0ebf0f00695cbdf
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] mediawiki...DonationInterface[master]: Script to update d*Local payment submethods

2017-06-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358154 )

Change subject: Script to update d*Local payment submethods
..

Script to update d*Local payment submethods

Get the lists via the GetBankList API.
However, the results differ from what is on developers.astropay.com,
and both of these differ from the lists on the marketing materials.

Bug: T167378
Change-Id: I88a67a1c492e40dc7f88433d2bfdb14477a798c9
---
A astropay_gateway/scripts/submethods.php
1 file changed, 97 insertions(+), 0 deletions(-)


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

diff --git a/astropay_gateway/scripts/submethods.php 
b/astropay_gateway/scripts/submethods.php
new file mode 100644
index 000..03b1367
--- /dev/null
+++ b/astropay_gateway/scripts/submethods.php
@@ -0,0 +1,97 @@
+ 'rtbt',
+   '01' => 'bt',
+   '02' => 'cash',
+   '03' => 'cc',
+   '04' => 'cc'
+   );
+   $old_submethods = null;
+   foreach ( $countries as $country ) {
+   $currency = NationalCurrencies::getNationalCurrency( 
$country );
+   $amount = 2 * $rates[$currency];
+   $gateway_opts = array(
+   'batch_mode' => true,
+   'external_data' => array(
+   'order_id' => $this->getArg( 'id' ),
+   'contribution_tracking_id' => 0, // 
ut-oh
+   // Dummy data to satisfy validation :P
+   'payment_method' => 'cc',
+   'amount' => $amount,
+   'country' => $country,
+   'currency' => $currency,
+   'email' => 'du...@example.org',
+   ),
+   );
+   $this->output( "Looking up submethods for $country\n" );
+   $adapter = new AstroPayAdapter( $gateway_opts );
+   if ( $old_submethods === NULL ) {
+   $old_submethods = $adapter->getConfig( 
'payment_submethods' );
+   }
+   $result = $adapter->do_transaction( 'GetBanks' );
+   $data = $result->getData();
+   $this->output( print_r( $data, true ) );
+   foreach ( $data as $entry ) {
+   $code = $entry['code'];
+   $name = $entry['name'];
+   $logo = $entry['logo'];
+   $type = $entry['payment_type'];
+   $our_type = $types[$type];
+   $our_code = 
ReferenceData::decodePaymentSubmethod( $our_type, $code );
+   if ( array_key_exists( $our_code, $submethods ) 
) {
+   
$submethods[$our_code]['countries'][$country] = true;
+   } else {
+   if ( array_key_exists( $our_code, 
$old_submethods ) ) {
+   // We've already got a logo and 
maybe a translated label
+   // only override the country 
list
+   $submethods[$our_code] = 
$old_submethods[$our_code];
+   } else {
+   $submethods[$our_code] = array(
+   'bank_code' => $code,
+   'label' => $name,
+   'logo' => $logo,
+   'group' => 
$types[$type],
+   );
+   }
+   $submethods[$our_code]['countries'] = 
array(
+   $country => true
+   );
+   }
+   }
+   }
+   $yaml = Yaml::dump( $submethods );
+   $this->output( $yaml );
+   }
+}
+
+$maintClass = 'AstroPaySubmethodsQuery';
+require_once RUN_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88a67a1c492e40dc7f88433d2bfdb14477a798c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Add missing MXN to national currencies list

2017-06-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358153 )

Change subject: Add missing MXN to national currencies list
..

Add missing MXN to national currencies list

What else are we missing?

Change-Id: I8d738c04c66a057bc14044fa6fb5cd56ddcf9647
---
M gateway_common/NationalCurrencies.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/gateway_common/NationalCurrencies.php 
b/gateway_common/NationalCurrencies.php
index 44f2371..430e9d5 100644
--- a/gateway_common/NationalCurrencies.php
+++ b/gateway_common/NationalCurrencies.php
@@ -157,6 +157,7 @@
"MU" => "EUR",
"MS" => "XCD",
"MA" => "MAD",
+   "MX" => "MXN",
"MZ" => "MZN",
"MM" => "MMK",
"NA" => "NAD",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d738c04c66a057bc14044fa6fb5cd56ddcf9647
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] mediawiki...LoginNotify[master]: Use info itself instead of array index

2017-06-09 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358152 )

Change subject: Use info itself instead of array index
..

Use info itself instead of array index

Also remove unused variable.

Bug: T167354
Change-Id: I543bcf9c1b3c083288294d2f504378ccafb501d9
---
M LoginNotify_body.php
1 file changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/LoginNotify_body.php b/LoginNotify_body.php
index 6828422..b41af62 100644
--- a/LoginNotify_body.php
+++ b/LoginNotify_body.php
@@ -191,7 +191,6 @@
// edited the most. We only do top ten, to limit the worst-case 
where the
// user has accounts on 800 wikis.
if ( class_exists( 'CentralAuthUser' ) ) {
-   $wikisByEditCounts = [];
$globalUser = CentralAuthUser::getInstance( $user );
if ( $globalUser->exists() ) {
// This is expensive. However, On WMF wikis, 
probably
@@ -207,17 +206,23 @@
}
);
$count = 0;
-   foreach ( $info as $wiki => $localInfo ) {
+   $total = count( $info );
+   foreach ( $info as $localInfo ) {
+   if ( !isset( $localInfo['id'] ) || 
!isset( $localInfo['wiki'] ) ) {
+   wfDebugLog( 'AdHocDebug', 
"Unexpected user data [$count/$total]: " . print_r( $localInfo, true ) );
+   break;
+   }
if ( $count > 10 || 
$localInfo['editCount'] < 1 ) {
break;
}
+   $wiki = $localInfo['wiki'];
try {
$lb = wfGetLB( $wiki );
$dbrLocal = $lb->getConnection( 
DB_SLAVE, [], $wiki );
} catch ( DBConnectionError $ex ) {
// FIXME: sometimes, we get 
garbage wiki names (T167354)
-   wfDebugLog( 'AdHocDebug', 
"Couldn't connect to database $wiki, info: "
-   . json_encode( $info ) 
);
+   wfDebugLog( 'AdHocDebug', 
"Couldn't connect to database $wiki [$count/$total], info: "
+   . print_r( $localInfo, 
true ) );
continue;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I543bcf9c1b3c083288294d2f504378ccafb501d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoginNotify
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] mediawiki...CentralNotice[master]: Break long lines - includes / tests

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

Change subject: Break long lines - includes / tests
..


Break long lines - includes / tests

Prepare to make phpcs pass

Change-Id: I567813e0953d5f9d0d1bcaeebc751fd702845ca2
---
M includes/Banner.php
M includes/BannerMessage.php
M includes/BannerMessageGroup.php
M includes/BannerRenderer.php
M includes/CNDeviceTarget.php
M includes/Campaign.php
M includes/CampaignLog.php
M includes/HtmlFormElements/HTMLCentralNoticeBanner.php
M tests/BannerTest.php
M tests/CentralNoticeTest.php
M tests/HistoryTest.php
11 files changed, 146 insertions(+), 64 deletions(-)

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



diff --git a/includes/Banner.php b/includes/Banner.php
index 49e36fe..2a331d6 100644
--- a/includes/Banner.php
+++ b/includes/Banner.php
@@ -79,7 +79,8 @@
/** @var bool True if archived and hidden from default view. */
protected $archived = false;
 
-   /** @var string[] Devices this banner should be allocated to in the 
form {Device ID => Device header name} */
+   /** @var string[] Devices this banner should be allocated to in the form
+* {Device ID => Device header name} */
protected $devices = array();
 
/** @var string[] Names of enabled mixins  */
@@ -345,7 +346,9 @@
$keystr[] = "{$key} = {$value}";
}
$keystr = implode( " AND ", $keystr );
-   throw new BannerExistenceException( "No banner exists 
where {$keystr}. Could not load." );
+   throw new BannerExistenceException(
+   "No banner exists where {$keystr}. Could not 
load."
+   );
}
 
// Set the dirty flag to not dirty because we just loaded clean 
data
@@ -570,7 +573,9 @@
// when a deprecated mixin is being used; but 
also when we
// do deprecate something we should make sure 
nothing is using
// it!
-   wfLogWarning( "Mixin does not exist: 
{$row->mixin_name}, included from banner {$this->name}" );
+   wfLogWarning(
+   "Mixin does not exist: 
{$row->mixin_name}, included from banner {$this->name}"
+   );
}
$this->mixins[$row->mixin_name] = 
$wgCentralNoticeBannerMixins[$row->mixin_name];
}
@@ -880,7 +885,8 @@
$availableLangs = array();
 
// Bit of an ugly hack to get just the banner prefix
-   $prefix = $this->getMessageField( '' )->getDbKey( null, 
$inTranslation ? NS_CN_BANNER : NS_MEDIAWIKI );
+   $prefix = $this->getMessageField( '' )
+   ->getDbKey( null, $inTranslation ? NS_CN_BANNER : 
NS_MEDIAWIKI );
 
$db = CNDatabase::getDb();
$result = $db->select( 'page',
@@ -892,7 +898,12 @@
__METHOD__
);
while ( $row = $result->fetchRow() ) {
-   if ( preg_match( 
"/\Q{$prefix}\E([^\/]+)(?:\/([a-z_]+))?/", $row['page_title'], $matches ) ) {
+   if (
+   preg_match(
+   
"/\Q{$prefix}\E([^\/]+)(?:\/([a-z_]+))?/", $row['page_title'],
+   $matches
+   )
+   ) {
if ( isset( $matches[2] ) ) {
$lang = $matches[2];
} else {
@@ -1206,17 +1217,26 @@
 
foreach ( $res as $row ) {
$banners[ ] = array(
-   'name' => $row->tmp_name, 
// name of the banner
-   'weight'   => intval( 
$row->tmp_weight ), // weight assigned to the banner
-   'display_anon' => intval( 
$row->tmp_display_anon ), // display to anonymous users?
-   'display_account'  => intval( 
$row->tmp_display_account ), // display to logged in users?
-   'fundraising'  => intval( 
$row->tmp_category === 'fundraising' ), // fundraising banner?
-   'device'   => $row->dev_name, 
// device this banner can target
-   'campaign' => $row->not_name, 
// campaign the banner is assigned to
-   'campaign_z_index' => 
$row->not_preferred, // z level of the campaign
+  

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Re-phrase the message shown after a page linking an entity w...

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

Change subject: Re-phrase the message shown after a page linking an entity was 
removed
..


Re-phrase the message shown after a page linking an entity was removed

As removing of the language links should now normally happen
automatically after the page linking the entity was removed,
the old message was no longer accurate.

Change-Id: I7906d940cd5566a09c8b7b68ff1e158d0bc13f18
---
M client/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/client/i18n/en.json b/client/i18n/en.json
index d064c18..f38acd6 100644
--- a/client/i18n/en.json
+++ b/client/i18n/en.json
@@ -38,7 +38,7 @@
"apihelp-query+wikibase-param-prop": "Which properties to 
get:\n;url: Base URL, script path and article path of the Wikibase 
repository.\n;siteid: The siteid of this site.",
"wikibase-after-page-move": "Your move should now be [$1 reflected in 
the {{WBREPONAME}} item] language link. We ask that you check this has 
occurred.",
"wikibase-after-page-move-queued": "The [$1 {{WBREPONAME}} item] 
associated with this page will be automatically updated. Please note that this 
might not happen instantaneously.",
-   "wikibase-after-page-delete": "You should also remove the link to this 
page from [$1 the associated {{WBREPONAME}} item] to maintain language links.",
+   "wikibase-after-page-delete": "Link to this page should have been 
removed from [$1 the associated {{WBREPONAME}} item]. We ask that you check 
this has occurred.",
"wikibase-after-page-delete-queued": "The [$1 {{WBREPONAME}} item] 
associated with this page will be automatically updated. Please note that this 
might not happen instantaneously.",
"wikibase-comment-add": "A {{WBREPONAME}} item has been created.",
"wikibase-comment-remove": "Associated {{WBREPONAME}} item deleted. 
Language links removed.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7906d940cd5566a09c8b7b68ff1e158d0bc13f18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Add PropertySuggester

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358151 )

Change subject: Add PropertySuggester
..


Add PropertySuggester

Change-Id: I482a4a1233ed123577721529e34e35b58a39afa1
---
M .gitmodules
A PropertySuggester
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 79d00d0..3e5770e 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1998,6 +1998,10 @@
path = ProofreadPage
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ProofreadPage
branch = .
+[submodule "PropertySuggester"]
+   path = PropertySuggester
+   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/PropertySuggester
+   branch = .
 [submodule "ProtectSite"]
path = ProtectSite
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ProtectSite
diff --git a/PropertySuggester b/PropertySuggester
new file mode 16
index 000..81a4c1f
--- /dev/null
+++ b/PropertySuggester
@@ -0,0 +1 @@
+Subproject commit 81a4c1f16488baac1475f36b692ba5135e54d4dc

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I482a4a1233ed123577721529e34e35b58a39afa1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Add PropertySuggester

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358151 )

Change subject: Add PropertySuggester
..

Add PropertySuggester

Change-Id: I482a4a1233ed123577721529e34e35b58a39afa1
---
M .gitmodules
A PropertySuggester
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/.gitmodules b/.gitmodules
index 79d00d0..30a285a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1998,6 +1998,10 @@
path = ProofreadPage
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ProofreadPage
branch = .
+[submodule "PropertySuggester"]
+   path = PropertySuggester
+   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/PropertySuggester.git
+   branch = .
 [submodule "ProtectSite"]
path = ProtectSite
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ProtectSite
diff --git a/PropertySuggester b/PropertySuggester
new file mode 16
index 000..81a4c1f
--- /dev/null
+++ b/PropertySuggester
@@ -0,0 +1 @@
+Subproject commit 81a4c1f16488baac1475f36b692ba5135e54d4dc

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I482a4a1233ed123577721529e34e35b58a39afa1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
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] operations/puppet[production]: wikistats: cron for XML dumps (WIP)

2017-06-09 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358150 )

Change subject: wikistats: cron for XML dumps (WIP)
..

wikistats: cron for XML dumps (WIP)

Change-Id: I76c4390342ca8347229e2e781292a3f2f9f54369
---
A modules/wikistats/manifests/cronjob/xmldump.pp
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/358150/1

diff --git a/modules/wikistats/manifests/cronjob/xmldump.pp 
b/modules/wikistats/manifests/cronjob/xmldump.pp
new file mode 100644
index 000..a03733c
--- /dev/null
+++ b/modules/wikistats/manifests/cronjob/xmldump.pp
@@ -0,0 +1,16 @@
+# define a cronjob to dump xml tables
+# usage: @
+define wikistats::cronjob::xmldump() {
+
+$project = regsubst($name, '@.*', '\1')
+$hour= regsubst($name, '.*@', '\1')
+
+cron { "cron-wikistats-xmldump-${name}":
+ensure  => present,
+command => "",
+user=> 'wikistatsuser',
+hour=> $hour,
+minute  => 0,
+}
+}
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PropertySuggester[master]: Use tabs in json

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358149 )

Change subject: Use tabs in json
..

Use tabs in json

Change-Id: Ifd3ece12df11ecfdc4ca9708c9a4486faacc33bb
---
M i18n/en.json
M package.json
2 files changed, 39 insertions(+), 39 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PropertySuggester 
refs/changes/49/358149/1

diff --git a/i18n/en.json b/i18n/en.json
index f204029..e011a93 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,23 +1,23 @@
 {
-"@metadata": {
-"authors": [
-"Christian Dullweber",
-"Katie Filbert"
-]
-},
-"propertysuggester-desc": "Suggests properties when adding Wikibase 
statements.",
-"apihelp-wbsgetsuggestions-description": "API module for getting 
suggestions of additional properties to add to a Wikibase entity. The API 
module is primarily intended for use by the suggester widget when users are 
editing Wikibase entities.",
-"apihelp-wbsgetsuggestions-example-1": "Get suggestions for entity Q4",
-"apihelp-wbsgetsuggestions-example-2": "Get suggestions for entity Q4 from 
rank 10 to 15",
-"apihelp-wbsgetsuggestions-example-3": "Get suggestions for the property 
combination P21 and P31",
-"apihelp-wbsgetsuggestions-example-4": "Get suggestions for the qualifiers 
that are used with P21",
-"apihelp-wbsgetsuggestions-example-5": "Get suggestions for the references 
that are used with P21",
-"apihelp-wbsgetsuggestions-param-context": "Either item, reference or 
qualifier.",
-"apihelp-wbsgetsuggestions-param-continue": "Offset where to continue a 
search.",
-"apihelp-wbsgetsuggestions-param-entity": "Suggest properties for the 
given entity, based on existing list of properties that the entity has.",
-"apihelp-wbsgetsuggestions-param-language": "Language for result.",
-"apihelp-wbsgetsuggestions-param-limit": "Maximum number of results.",
-"apihelp-wbsgetsuggestions-param-properties": "Suggest additional 
properties for the given list of properties.",
-"apihelp-wbsgetsuggestions-param-search": "Search for this text.",
-"apihelp-wbsgetsuggestions-param-size": "Specify number of suggestions to 
be returned."
+   "@metadata": {
+   "authors": [
+   "Christian Dullweber",
+   "Katie Filbert"
+   ]
+   },
+   "propertysuggester-desc": "Suggests properties when adding Wikibase 
statements.",
+   "apihelp-wbsgetsuggestions-description": "API module for getting 
suggestions of additional properties to add to a Wikibase entity. The API 
module is primarily intended for use by the suggester widget when users are 
editing Wikibase entities.",
+   "apihelp-wbsgetsuggestions-example-1": "Get suggestions for entity Q4",
+   "apihelp-wbsgetsuggestions-example-2": "Get suggestions for entity Q4 
from rank 10 to 15",
+   "apihelp-wbsgetsuggestions-example-3": "Get suggestions for the 
property combination P21 and P31",
+   "apihelp-wbsgetsuggestions-example-4": "Get suggestions for the 
qualifiers that are used with P21",
+   "apihelp-wbsgetsuggestions-example-5": "Get suggestions for the 
references that are used with P21",
+   "apihelp-wbsgetsuggestions-param-context": "Either item, reference or 
qualifier.",
+   "apihelp-wbsgetsuggestions-param-continue": "Offset where to continue a 
search.",
+   "apihelp-wbsgetsuggestions-param-entity": "Suggest properties for the 
given entity, based on existing list of properties that the entity has.",
+   "apihelp-wbsgetsuggestions-param-language": "Language for result.",
+   "apihelp-wbsgetsuggestions-param-limit": "Maximum number of results.",
+   "apihelp-wbsgetsuggestions-param-properties": "Suggest additional 
properties for the given list of properties.",
+   "apihelp-wbsgetsuggestions-param-search": "Search for this text.",
+   "apihelp-wbsgetsuggestions-param-size": "Specify number of suggestions 
to be returned."
 }
diff --git a/package.json b/package.json
index 5510265..bc9deeb 100644
--- a/package.json
+++ b/package.json
@@ -1,20 +1,20 @@
 {
-  "name": "PropertySuggester",
-  "version": "0.0.0",
-  "scripts": {
-"test": "grunt test"
-  },
-  "repository": {
-"type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/PropertySuggester;
-  },
-  "author": "The Wikidata team",
-  "license": "GPL-2.0+",
-  "devDependencies": {
-"eslint-config-wikimedia": "0.4.0",
-"grunt": "^1.0.1",
-"grunt-banana-checker": "0.5.0",
-"grunt-eslint": "19.0.0",
-"grunt-jsonlint": "1.0.7"
-  }
+   "name": "PropertySuggester",
+   "version": "0.0.0",
+   "scripts": {
+   "test": "grunt test"
+   },
+   "repository": {
+   "type": "git",
+   "url": 

[MediaWiki-commits] [Gerrit] mediawiki...PropertySuggester[master]: Standardize phpcs command in composer.json

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358148 )

Change subject: Standardize phpcs command in composer.json
..

Standardize phpcs command in composer.json

Remove vendor/bin before the command to make the composer useable on
windows machine.
Add phpcbf

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PropertySuggester 
refs/changes/48/358148/1

diff --git a/composer.json b/composer.json
index d9fe661..7b6bcec 100644
--- a/composer.json
+++ b/composer.json
@@ -30,6 +30,7 @@
]
},
"scripts": {
+   "fix": "phpcbf",
"test": [
"parallel-lint . --exclude vendor",
"@cs"
@@ -37,6 +38,6 @@
"cs": [
"@phpcs"
],
-   "phpcs": "vendor/bin/phpcs -sp --standard=phpcs.xml 
--extensions=php --ignore=extensions/ValueView,vendor,.git ."
+   "phpcs": "phpcs -p -s"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic59989db78edb58693fd2719eeac291650965949
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PropertySuggester
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] mediawiki...MinervaNeue[master]: DONOTMERGE TEST :

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358147 )

Change subject: DONOTMERGE TEST :
..

DONOTMERGE TEST
:

Change-Id: I9a96b45bc3f04d19f2ad378a49afe6fe34c06831
---
M tests/phpunit/skins/SkinMinervaTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/47/358147/1

diff --git a/tests/phpunit/skins/SkinMinervaTest.php 
b/tests/phpunit/skins/SkinMinervaTest.php
index 31af1b8..3af2556 100644
--- a/tests/phpunit/skins/SkinMinervaTest.php
+++ b/tests/phpunit/skins/SkinMinervaTest.php
@@ -257,7 +257,7 @@
$tpl = new Template();
$skin->prepareUserButton( $tpl );
$this->assertEquals(
-   $expectedSecondaryButtonData,
+   'blaahaah',
$tpl->get( 'secondaryButtonData' ),
$message
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a96b45bc3f04d19f2ad378a49afe6fe34c06831
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update Retrofit to 2.3.0

2017-06-09 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358146 )

Change subject: Update Retrofit to 2.3.0
..

Update Retrofit to 2.3.0

Possibly of note:

* New: String converters that return null for an @Query or @Field parameter
  are now skipped.

Also includes a bunch of improvements around RxJava support, which might
become interesting to us at some point.

Change-Id: I07b9af6f451de8b4b3c2008c39f5bf8a2e198eab
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index ccc4796..1423750 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -164,7 +164,7 @@
 
 String okHttpVersion = '3.8.0' // When updating this version, resync file 
copies under
// app/src/main/java/okhttp3
-String retrofitVersion = '2.2.0'
+String retrofitVersion = '2.3.0'
 String supportVersion = '25.3.1'
 String espressoVersion = '2.2.2'
 String butterKnifeVersion = '8.5.1'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...LockDownEnglishPages[master]: Fix author key in extension.json

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

Change subject: Fix author key in extension.json
..


Fix author key in extension.json

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

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



diff --git a/extension.json b/extension.json
index 9843676..d1bb58e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "LockDownEnglishPages",
"version": "0.2.0",
-   "authors": [
+   "author": [
"Jack Phoenix"
],
"url": "https://www.mediawiki.org/wiki/Extension:LockDownEnglishPages;,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I999ae81a68dd914c8c77a33be566447dd75c3410
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LockDownEnglishPages
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Use tabs in skin.json

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

Change subject: Use tabs in skin.json
..


Use tabs in skin.json

Change-Id: I8fb66fe2f99786bfbdc598d460c18928dbb0faa0
---
M skin.json
1 file changed, 35 insertions(+), 35 deletions(-)

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



diff --git a/skin.json b/skin.json
index 9cec34b..0e1df6d 100644
--- a/skin.json
+++ b/skin.json
@@ -1,36 +1,36 @@
 {
-  "AutoloadClasses": {},
-  "ConfigRegistry": {
-"minerva-neue": "GlobalVarConfig::newInstance"
-  },
-  "Hooks": {},
-  "MessagesDirs": {
-"MinervaNeue": [
-  "i18n"
-]
-  },
-  "ResourceFileModulePaths": {
-"localBasePath": "",
-"remoteSkinPath": "MinervaNeue"
-  },
-  "ResourceModuleSkinStyles": {
-"minerva-neue": {}
-  },
-  "ResourceModules": {},
-  "ValidSkinNames": {
-"minerva": "Minerva"
-  },
-  "author": [],
-  "callback": "MinervaHooks::onRegistration",
-  "config": {},
-  "descriptionmsg": "minerva-neue-skin-desc",
-  "license-name": "GPL-2.0+",
-  "manifest_version": 1,
-  "name": "MinervaNeue",
-  "namemsg": "skinname-minerva-neue",
-  "requires": {
-"MediaWiki": ">= 1.25.0"
-  },
-  "type": "skin",
-  "url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue;
-}
\ No newline at end of file
+   "AutoloadClasses": {},
+   "ConfigRegistry": {
+   "minerva-neue": "GlobalVarConfig::newInstance"
+   },
+   "Hooks": {},
+   "MessagesDirs": {
+   "MinervaNeue": [
+   "i18n"
+   ]
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteSkinPath": "MinervaNeue"
+   },
+   "ResourceModuleSkinStyles": {
+   "minerva-neue": {}
+   },
+   "ResourceModules": {},
+   "ValidSkinNames": {
+   "minerva": "Minerva"
+   },
+   "author": [],
+   "callback": "MinervaHooks::onRegistration",
+   "config": {},
+   "descriptionmsg": "minerva-neue-skin-desc",
+   "license-name": "GPL-2.0+",
+   "manifest_version": 1,
+   "name": "MinervaNeue",
+   "namemsg": "skinname-minerva-neue",
+   "requires": {
+   "MediaWiki": ">= 1.25.0"
+   },
+   "type": "skin",
+   "url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fb66fe2f99786bfbdc598d460c18928dbb0faa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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] mediawiki...MobileFrontend[master]: Fix UI regression - normalize heading font size

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

Change subject: Fix UI regression - normalize heading font size
..


Fix UI regression - normalize heading font size

Introduced by:
I1ee00148a248d3725b02eea3c19e6b22486ae5ba

Notification and edit overlay have titles that are too
big.

Removed the variable since it is only used in one place
and is just for normalization. It's not useful.

Change-Id: Ic824aab9e94b623203669d43e4def149fea30c4b
---
M minerva.less/minerva.variables.less
M resources/mobile.startup/Overlay.less
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/minerva.less/minerva.variables.less 
b/minerva.less/minerva.variables.less
index 575a4ac..d39c222 100644
--- a/minerva.less/minerva.variables.less
+++ b/minerva.less/minerva.variables.less
@@ -18,7 +18,6 @@
 @contentMargin: 16px;
 
 // Header
-@headerTitleFontSize: 1em;
 @headerHeight: 3.35em;
 @headerMarginTop: -1px;  // used to hide the header border top when a banner 
is not present
 @searchBoxWidth: 375/16em;
diff --git a/resources/mobile.startup/Overlay.less 
b/resources/mobile.startup/Overlay.less
index 313deaf..dc2a938 100644
--- a/resources/mobile.startup/Overlay.less
+++ b/resources/mobile.startup/Overlay.less
@@ -227,6 +227,8 @@
h2 {
display: table;
width: 100%;
+   // reset default headings. Overide default font size.
+   font-size: 1em;
 
> * {
width: 1em;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic824aab9e94b623203669d43e4def149fea30c4b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...LockDownEnglishPages[master]: Fix author key in extension.json

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358145 )

Change subject: Fix author key in extension.json
..

Fix author key in extension.json

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


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

diff --git a/extension.json b/extension.json
index 9843676..d1bb58e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "LockDownEnglishPages",
"version": "0.2.0",
-   "authors": [
+   "author": [
"Jack Phoenix"
],
"url": "https://www.mediawiki.org/wiki/Extension:LockDownEnglishPages;,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I999ae81a68dd914c8c77a33be566447dd75c3410
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LockDownEnglishPages
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] mediawiki...MinervaNeue[master]: Use tabs in skin.json

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358144 )

Change subject: Use tabs in skin.json
..

Use tabs in skin.json

Change-Id: I8fb66fe2f99786bfbdc598d460c18928dbb0faa0
---
M skin.json
1 file changed, 35 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/44/358144/1

diff --git a/skin.json b/skin.json
index 9cec34b..0e1df6d 100644
--- a/skin.json
+++ b/skin.json
@@ -1,36 +1,36 @@
 {
-  "AutoloadClasses": {},
-  "ConfigRegistry": {
-"minerva-neue": "GlobalVarConfig::newInstance"
-  },
-  "Hooks": {},
-  "MessagesDirs": {
-"MinervaNeue": [
-  "i18n"
-]
-  },
-  "ResourceFileModulePaths": {
-"localBasePath": "",
-"remoteSkinPath": "MinervaNeue"
-  },
-  "ResourceModuleSkinStyles": {
-"minerva-neue": {}
-  },
-  "ResourceModules": {},
-  "ValidSkinNames": {
-"minerva": "Minerva"
-  },
-  "author": [],
-  "callback": "MinervaHooks::onRegistration",
-  "config": {},
-  "descriptionmsg": "minerva-neue-skin-desc",
-  "license-name": "GPL-2.0+",
-  "manifest_version": 1,
-  "name": "MinervaNeue",
-  "namemsg": "skinname-minerva-neue",
-  "requires": {
-"MediaWiki": ">= 1.25.0"
-  },
-  "type": "skin",
-  "url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue;
-}
\ No newline at end of file
+   "AutoloadClasses": {},
+   "ConfigRegistry": {
+   "minerva-neue": "GlobalVarConfig::newInstance"
+   },
+   "Hooks": {},
+   "MessagesDirs": {
+   "MinervaNeue": [
+   "i18n"
+   ]
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteSkinPath": "MinervaNeue"
+   },
+   "ResourceModuleSkinStyles": {
+   "minerva-neue": {}
+   },
+   "ResourceModules": {},
+   "ValidSkinNames": {
+   "minerva": "Minerva"
+   },
+   "author": [],
+   "callback": "MinervaHooks::onRegistration",
+   "config": {},
+   "descriptionmsg": "minerva-neue-skin-desc",
+   "license-name": "GPL-2.0+",
+   "manifest_version": 1,
+   "name": "MinervaNeue",
+   "namemsg": "skinname-minerva-neue",
+   "requires": {
+   "MediaWiki": ">= 1.25.0"
+   },
+   "type": "skin",
+   "url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fb66fe2f99786bfbdc598d460c18928dbb0faa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
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] apps...wikipedia[master]: Update Fresco to 1.3.0

2017-06-09 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358143 )

Change subject: Update Fresco to 1.3.0
..

Update Fresco to 1.3.0

v1.2.0 and v1.3.0 are described as "mainly bugfix release[s]."  No
updates to copied samples.

https://github.com/facebook/fresco/releases

Change-Id: I1eec747a10fe7d52358c72c8f62f7289c61e7dfa
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 80b2a5a..9292d3b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -168,7 +168,7 @@
 String supportVersion = '25.3.1'
 String espressoVersion = '2.2.2'
 String butterKnifeVersion = '8.5.1'
-String frescoVersion = '1.1.0' // When updating this version, resync file 
copies under
+String frescoVersion = '1.3.0' // When updating this version, resync file 
copies under
// app/src/main/java/com/facebook
 String testingSupportVersion = '0.5'
 String mockitoCore = 'org.mockito:mockito-core:1.9.5'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Introduce skinStyles folder for Minerva's styles

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

Change subject: Introduce skinStyles folder for Minerva's styles
..


Introduce skinStyles folder for Minerva's styles

The purpose of the skinStyles folder is to make it more obvious when
we are shipping styles specific to Minerva. This should help with
debugging and it will also help with separating the Minerva skin from the
MobileFrontend component.

Mixing skinStyles with resources can be a little confusing as it is not
obvious that certain files are only loaded by the Minerva skin.

Changes:
* Introduce skinStyles folder for Minerva specific styles that customise
modules that will remain provided by MobileFrontend and other extensions
* Make skins.minerva.notifications.filter.styles a skin style of
 ext.echo.styles.special
* Introduce skinStyles of mobile.startup module and consolidate code previously
shared between the Search, Language overlays. Shift Minerva specific styles
over there.

Change-Id: I1ee00148a248d3725b02eea3c19e6b22486ae5ba
---
M extension.json
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
M resources/mobile.languages.structured/LanguageOverlay.less
M resources/mobile.search/SearchOverlay.less
M resources/mobile.startup/Overlay.less
M resources/skins.minerva.base.styles/ui.less
A skinStyles/README.txt
R skinStyles/ext.echo.styles.special/SpecialNotificationsOverlay.less
A skinStyles/mobile.languages.structured/LanguageOverlay.less
A skinStyles/mobile.search/SearchOverlay.less
R skinStyles/mobile.special.mobilemenu.styles/minerva.less
R skinStyles/mobile.special.nearby.styles/desktop.less
A skinStyles/mobile.startup/Overlay.less
R skinStyles/mobile.startup/toast.less
15 files changed, 104 insertions(+), 94 deletions(-)

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



diff --git a/extension.json b/extension.json
index 3e0bc65..a4ffe10 100644
--- a/extension.json
+++ b/extension.json
@@ -514,9 +514,6 @@
"mobile-frontend-editor-licensing-with-terms",
"mobile-frontend-editor-terms-link"
],
-   "skinStyles": {
-   "minerva": "resources/mobile.startup/toast.less"
-   },
"styles": [
"resources/mobile.startup/panel.less",
"resources/mobile.startup/Overlay.less",
@@ -696,6 +693,9 @@
"mobile.loggingSchemas.mobileWebSearch",
"mobile.search.images"
],
+   "skinStyles": {
+   "minerva": 
"skinStyles/mobile.search/SearchOverlay.less"
+   },
"styles": [
"resources/mobile.search/SearchOverlay.less"
],
@@ -1001,6 +1001,9 @@
"mediawiki.storage",
"mobile.startup"
],
+   "skinStyles": {
+   "minerva": 
"skinStyles/mobile.languages.structured/LanguageOverlay.less"
+   },
"scripts": [
"resources/mobile.languages.structured/util.js",

"resources/mobile.languages.structured/LanguageOverlay.js"
@@ -1241,8 +1244,8 @@

"resources/mobile.special.nearby.styles/specialNearby.less"
],
"skinStyles": {
-   "vector": 
"resources/mobile.special.nearby.styles/specialNearbyDesktop.less",
-   "monobook": 
"resources/mobile.special.nearby.styles/specialNearbyDesktop.less"
+   "vector": 
"skinStyles/mobile.special.nearby.styles/desktop.less",
+   "monobook": 
"skinStyles/mobile.special.nearby.styles/desktop.less"
},
"position": "top"
},
@@ -1626,13 +1629,21 @@
"@note1": "ResourceModuleSkinStyles must only contain customizations 
for 'minerva'.",
"@note2": "For other skins, just use 'skinStyles' in module 
definition.",
"@note3": "Otherwise their own customizations are overridden. 
(T167216)",
+   "@note5": "Do not use it for modules which non-ResourceLoaderFileModule 
classes (T167478).",
"ResourceModuleSkinStyles": {
"minerva": {
+   "mobile.startup": [
+   "skinStyles/mobile.startup/toast.less",
+   "skinStyles/mobile.startup/Overlay.less"
+   ],

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Fix UI regression - normalize heading font size

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358142 )

Change subject: Fix UI regression - normalize heading font size
..

Fix UI regression - normalize heading font size

Change-Id: Ic824aab9e94b623203669d43e4def149fea30c4b
---
M resources/mobile.startup/Overlay.less
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/resources/mobile.startup/Overlay.less 
b/resources/mobile.startup/Overlay.less
index 313deaf..dc2a938 100644
--- a/resources/mobile.startup/Overlay.less
+++ b/resources/mobile.startup/Overlay.less
@@ -227,6 +227,8 @@
h2 {
display: table;
width: 100%;
+   // reset default headings. Overide default font size.
+   font-size: 1em;
 
> * {
width: 1em;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Removed deprecated ContextActive for SecureFil...

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

Change subject: BSFoundation: Removed deprecated ContextActive for 
SecureFilestore
..


BSFoundation: Removed deprecated ContextActive for SecureFilestore

=> Follow up for: I810a927410447b8e57d57cb38db28383bbc84fa4

Change-Id: Id10e85a13522ad692f10d2da4bb93db2e50191e9
---
M includes/api/BSApiFileBackendStore.php
M includes/outputhandler/views/view.UserMiniProfile.php
M includes/skins/BsBaseTemplate.php
M includes/utility/FileSystemHelper.class.php
4 files changed, 29 insertions(+), 8 deletions(-)

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



diff --git a/includes/api/BSApiFileBackendStore.php 
b/includes/api/BSApiFileBackendStore.php
index 048f7e1..4ad2c0d 100644
--- a/includes/api/BSApiFileBackendStore.php
+++ b/includes/api/BSApiFileBackendStore.php
@@ -310,8 +310,8 @@
}
 
protected function addSecondaryFields( $aTrimmedData ) {
-   $bUseSecureFileStore = BsExtensionManager::isContextActive(
-   'MW::SecureFileStore::Active'
+   $oSecureFileStore = BsExtensionManager::getExtension(
+   'SecureFileStore'
);
 
foreach( $aTrimmedData as $oDataSet ) {
@@ -325,7 +325,9 @@
//TODO: Make thumb size a parameter
$sThumb = $oImg->createThumb( 120 );
$sUrl = $oImg->getUrl();
-   if( $bUseSecureFileStore ) { //TODO: Remove
+
+   //TODO: Remove, when SecureFileStore is finally removed
+   if( $oSecureFileStore ) {
$sThumb = html_entity_decode( 
SecureFileStore::secureStuff( $sThumb, true ) );
$sUrl = html_entity_decode( 
SecureFileStore::secureStuff( $sUrl, true ) );
}
diff --git a/includes/outputhandler/views/view.UserMiniProfile.php 
b/includes/outputhandler/views/view.UserMiniProfile.php
index 6c38167..6f44291 100644
--- a/includes/outputhandler/views/view.UserMiniProfile.php
+++ b/includes/outputhandler/views/view.UserMiniProfile.php
@@ -42,9 +42,14 @@
 
$sOut = implode( "\n", $aOut );
 
+   $oSecureFileStore = BsExtensionManager::getExtension(
+   'SecureFileStore'
+   );
// CR RBV (03.06.11 08:39): Hook/Event!
-   if ( BsExtensionManager::isContextActive( 
'MW::SecureFileStore::Active' ) )
-   $sOut = SecureFileStore::secureFilesInText($sOut);
+   //TODO: Remove, when SecureFileStore is finally removed
+   if ( $oSecureFileStore ) {
+   $sOut = SecureFileStore::secureFilesInText( $sOut );
+   }
 
return $sOut;
}
diff --git a/includes/skins/BsBaseTemplate.php 
b/includes/skins/BsBaseTemplate.php
index b19cb41..c396f6a 100644
--- a/includes/skins/BsBaseTemplate.php
+++ b/includes/skins/BsBaseTemplate.php
@@ -435,7 +435,13 @@
$sText = $aVal[0];
 
if ( is_object( $oFile 
) && $oFile->exists() ) {
-   if ( 
BsExtensionManager::isContextActive( 'MW::SecureFileStore::Active' ) ) {
+   //TODO: Remove, 
when SecureFileStore is finally
+   //removed
+   
$oSecureFileStore
+   = 
BsExtensionManager::getExtension(
+   
'SecureFileStore'
+   );
+   if ( 
$oSecureFileStore ) {
$sUrl = 
SecureFileStore::secureStuff( $oFile->getUrl(), true );
} else {
$sUrl = 
$oFile->getUrl();
diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index dbddd59..cc5e5f0 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -623,8 +623,16 @@
if ( $status->isGood() && $oRepoFile !== false ){
$oPage = WikiPage::factory( $oRepoFile->getTitle() );
$oPage->doEditContent( new WikitextContent( $sPageText 
), '' );
-   if ( 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Minerva is its own skin

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358141 )

Change subject: Minerva is its own skin
..

Minerva is its own skin

Before running the script:
* Make sure MobileFrontend
I6661c889509d79672df6b3f1a131b56a65400c6d
is merged or checked out

When ready run python3 scripts/migrate.py
This will result in a Minerva skin dependent on MobileFrontend.
It will edit MobileFrontend and Minerva repositories to allow you to prepare 
two patches.

Post merge we will rename message keys to have minerva- prefix

Change-Id: Iff1f7e63e796cc5d4a6d2ab0370e0c33248d2fce
---
A i18n/ab.json
A i18n/ace.json
A i18n/ady-cyrl.json
A i18n/aeb-arab.json
A i18n/aeb-latn.json
A i18n/aeb.json
A i18n/af.json
A i18n/ak.json
A i18n/am.json
A i18n/an.json
A i18n/ang.json
A i18n/anp.json
A i18n/ar.json
A i18n/arc.json
A i18n/arn.json
A i18n/arq.json
A i18n/ary.json
A i18n/arz.json
A i18n/as.json
A i18n/ase.json
A i18n/ast.json
A i18n/atj.json
A i18n/av.json
A i18n/awa.json
A i18n/az.json
A i18n/azb.json
A i18n/ba.json
A i18n/bar.json
A i18n/bcl.json
M i18n/be-tarask.json
A i18n/be.json
M i18n/bg.json
A i18n/bgn.json
A i18n/bho.json
M i18n/bn.json
A i18n/bo.json
A i18n/bqi.json
A i18n/br.json
A i18n/brh.json
A i18n/bs.json
A i18n/ca.json
A i18n/cdo.json
A i18n/ce.json
A i18n/ceb.json
A i18n/cjy-hant.json
A i18n/ckb.json
A i18n/co.json
A i18n/crh-cyrl.json
A i18n/crh-latn.json
A i18n/cs.json
A i18n/csb.json
A i18n/cu.json
A i18n/cv.json
A i18n/cy.json
A i18n/da.json
A i18n/de-ch.json
A i18n/de-formal.json
M i18n/de.json
A i18n/din.json
A i18n/diq.json
A i18n/dsb.json
A i18n/dtp.json
A i18n/dty.json
A i18n/ee.json
A i18n/egl.json
A i18n/el.json
A i18n/eml.json
A i18n/en-gb.json
M i18n/en.json
A i18n/eo.json
A i18n/es-formal.json
A i18n/es.json
A i18n/et.json
A i18n/eu.json
A i18n/ext.json
A i18n/fa.json
A i18n/fi.json
A i18n/fo.json
M i18n/fr.json
A i18n/frc.json
A i18n/frp.json
A i18n/frr.json
A i18n/fur.json
A i18n/fy.json
A i18n/ga.json
A i18n/gcf.json
A i18n/gd.json
A i18n/gl.json
A i18n/glk.json
A i18n/gn.json
A i18n/gom-deva.json
A i18n/gom-latn.json
A i18n/gor.json
A i18n/grc.json
A i18n/gsw.json
A i18n/gu.json
A i18n/gv.json
A i18n/ha.json
A i18n/hak.json
A i18n/haw.json
A i18n/he.json
A i18n/hi.json
A i18n/hif-latn.json
A i18n/hil.json
A i18n/hr.json
A i18n/hrx.json
A i18n/hsb.json
A i18n/ht.json
A i18n/hu-formal.json
A i18n/hu.json
A i18n/hy.json
M i18n/ia.json
A i18n/id.json
A i18n/ie.json
A i18n/ig.json
A i18n/ilo.json
A i18n/inh.json
A i18n/io.json
A i18n/is.json
A i18n/it.json
A i18n/ja.json
A i18n/jam.json
A i18n/jbo.json
A i18n/jut.json
A i18n/jv.json
A i18n/ka.json
A i18n/kbd-cyrl.json
A i18n/kbp.json
A i18n/kea.json
A i18n/kg.json
A i18n/khw.json
A i18n/kiu.json
A i18n/kk-cyrl.json
A i18n/kl.json
A i18n/km.json
A i18n/kn.json
A i18n/ko.json
A i18n/krc.json
A i18n/kri.json
A i18n/krl.json
A i18n/ksh.json
A i18n/ku-latn.json
A i18n/ku.json
A i18n/kv.json
A i18n/kw.json
A i18n/ky.json
A i18n/la.json
A i18n/lad.json
A i18n/lb.json
A i18n/lez.json
A i18n/lfn.json
A i18n/li.json
A i18n/lij.json
A i18n/liv.json
A i18n/lki.json
A i18n/lmo.json
A i18n/ln.json
A i18n/lo.json
A i18n/lrc.json
A i18n/lt.json
A i18n/ltg.json
A i18n/lus.json
A i18n/luz.json
A i18n/lv.json
A i18n/lzh.json
A i18n/lzz.json
A i18n/mai.json
A i18n/map-bms.json
A i18n/mg.json
A i18n/mhr.json
A i18n/mi.json
A i18n/min.json
M i18n/mk.json
A i18n/ml.json
A i18n/mn.json
A i18n/mnc.json
A i18n/mo.json
A i18n/mr.json
A i18n/ms.json
A i18n/mt.json
A i18n/my.json
A i18n/myv.json
A i18n/mzn.json
A i18n/nah.json
A i18n/nan.json
A i18n/nap.json
A i18n/nb.json
A i18n/nds-nl.json
A i18n/nds.json
A i18n/ne.json
A i18n/nl-informal.json
A i18n/nl.json
A i18n/nn.json
A i18n/nqo.json
A i18n/nso.json
A i18n/oc.json
A i18n/olo.json
A i18n/om.json
A i18n/or.json
A i18n/os.json
A i18n/ovd.json
A i18n/pa.json
A i18n/pam.json
A i18n/pap.json
A i18n/pdc.json
A i18n/pfl.json
A i18n/pl.json
A i18n/pms.json
A i18n/pnb.json
A i18n/prs.json
A i18n/ps.json
A i18n/pt-br.json
M i18n/pt.json
M i18n/qqq.json
A i18n/qu.json
A i18n/rm.json
A i18n/ro.json
A i18n/roa-tara.json
A i18n/ru.json
A i18n/rue.json
A i18n/sa.json
A i18n/sah.json
A i18n/sat.json
A i18n/sc.json
A i18n/scn.json
A i18n/sco.json
A i18n/sd.json
A i18n/sdc.json
A i18n/sdh.json
A i18n/sgs.json
A i18n/sh.json
A i18n/shi.json
A i18n/shn.json
A i18n/shy-latn.json
A i18n/si.json
A i18n/sk.json
A i18n/sl.json
A i18n/so.json
A i18n/sq.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/ss.json
A i18n/sty.json
A i18n/su.json
M i18n/sv.json
A i18n/sw.json
A i18n/szl.json
A i18n/ta.json
A i18n/tcy.json
A i18n/te.json
A i18n/tet.json
A i18n/tg-cyrl.json
A i18n/tg-latn.json
A i18n/th.json
A i18n/tk.json
A i18n/tl.json
A i18n/tly.json
A i18n/tokipona.json
A i18n/tpi.json
A i18n/tr.json
A i18n/tru.json
A i18n/tt-cyrl.json
A i18n/tt-latn.json
A i18n/ttt.json
A i18n/tyv.json
A i18n/tzm.json
A i18n/udm.json
A i18n/ug-arab.json
A i18n/uk.json
A 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add CODE_OF_CONDUCT.md

2017-06-09 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358140 )

Change subject: Add CODE_OF_CONDUCT.md
..

Add CODE_OF_CONDUCT.md

Change-Id: I350c6a0ffa74879f23b397ff949627b6705b4d1a
---
A CODE_OF_CONDUCT.md
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000..d8e5d08
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Openstack: Added 'dnsleaks.py' script.

2017-06-09 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358124 )

Change subject: Openstack:  Added 'dnsleaks.py' script.
..


Openstack:  Added 'dnsleaks.py' script.

This hunts and (optionally) kills duplicate and leaked DNS entries.

The battle to actually /prevent/ the leaks continues...

Change-Id: Iaaf90e5e20fb35257cdfd9b10dd6f1a953f8e152
---
A modules/openstack/files/novastats/dnsleaks.py
M modules/openstack/manifests/adminscripts.pp
2 files changed, 158 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/files/novastats/dnsleaks.py 
b/modules/openstack/files/novastats/dnsleaks.py
new file mode 100755
index 000..b3b0e30
--- /dev/null
+++ b/modules/openstack/files/novastats/dnsleaks.py
@@ -0,0 +1,150 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Wikimedia Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+"""
+Dig through designate records, find and correct inconsistencies.
+
+- Arecs that point to multiple IPs
+- Arecs that resolve nova VMs that don't exist anymore
+- PTRs for nova VMs that don't exist anymore
+
+Be default this just reports on issues but with the --delete
+command it will attempt to clean up as well.
+
+
+Note that this is potentially racy and may misfire for instances that
+are already mid-deletion.  In that case it should be safe to re-run.
+"""
+
+import argparse
+import mwopenstackclients
+
+import requests
+import yaml
+import time
+
+clients = mwopenstackclients.clients()
+
+
+def designate_endpoint_and_token():
+services = clients.keystoneclient().services.list()
+for service in services:
+if service.type == 'dns':
+serviceid = service.id
+break
+endpoints = clients.keystoneclient().endpoints.list(serviceid)
+for endpoint in endpoints:
+if endpoint.interface == 'public':
+url = endpoint.url
+
+session = clients.session()
+token = session.get_token()
+
+return (url, token)
+
+
+def delete_recordset(endpoint, token, zoneid, recordsetid):
+headers = {'X-Auth-Token': token,
+   'X-Auth-Sudo-Tenant-ID': 'noauth-project',
+   'X-Designate-Edit-Managed-Records': 'true'}
+recordseturl = "%s/v2/zones/%s/recordsets/%s" % (endpoint, zoneid, 
recordsetid)
+print("Deleting %s with %s" % (recordsetid, recordseturl))
+req = requests.delete(recordseturl,
+  headers=headers, verify=False)
+req.raise_for_status()
+time.sleep(1)
+
+
+def edit_recordset(endpoint, token, zoneid, recordset, newrecords):
+headers = {'X-Auth-Token': token,
+   'X-Auth-Sudo-Tenant-ID': 'noauth-project',
+   'X-Designate-Edit-Managed-Records': 'true'}
+
+patch = {"records": newrecords}
+
+print("Updating %s with %s" % (recordset['id'], newrecords))
+recordseturl = "%s/v2/zones/%s/recordsets/%s" % (endpoint, zoneid, 
recordset['id'])
+
+req = requests.put(recordseturl,
+   headers=headers, verify=False,
+   json=patch)
+req.raise_for_status()
+
+
+def purge_duplicates(delete=False):
+(endpoint, token) = designate_endpoint_and_token()
+
+headers = {'X-Auth-Token': token, 'X-Auth-Sudo-Tenant-ID': 
'noauth-project'}
+req = requests.get("%s/v2/zones" % (endpoint), headers=headers, 
verify=False)
+req.raise_for_status()
+zones = yaml.safe_load(req.text)['zones']
+
+for zone in zones:
+req = requests.get("%s/v2/zones/%s/recordsets" % (endpoint, 
zone['id']),
+   headers=headers, verify=False)
+req.raise_for_status()
+recordsets = yaml.safe_load(req.text)['recordsets']
+
+# we need a fresh copy of all instances so we don't accidentally
+#  delete things that have been created since we last checked.
+instances = clients.allinstances()
+all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name, 
instance.tenant_id)
+  for instance in instances]
+all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name)
+for instance in instances]
+
+for recordset in recordsets:
+name = recordset['name']
+recordsetid = recordset['id']
+if recordset['type'] == 'A':
+

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update okhttp to 3.8.0

2017-06-09 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358138 )

Change subject: Update okhttp to 3.8.0
..

Update okhttp to 3.8.0

N.B. Involves a change to a modified bit of CacheDelegateInterceptor!
Please review carefully and test well!  Here's the relevant okhttp commit:

Invalidate the cache even if the response has no body.
https://github.com/square/okhttp/commit/c9496d350c0c3bb4b9d9571c3ab97181726561e2

Also of note:

Version 3.8.0

New: The response message is now non-null. This is the "Not Found" in the
status line "HTTP 404 Not Found". If you are building responses programma-
tically (with new Response.Builder()) you must now always supply a
message. An empty string "" is permitted. This value was never null on
responses returned by OkHttp itself, and it was an old mistake to permit
application code to omit a message.

Version 3.7.0

New: Connection coalescing. OkHttp may reuse HTTP/2 connections across
calls that share an IP address and HTTPS certificate, even if their domain
names are different.

New: MockWebServer's RecordedRequest exposes the requested HttpUrl with
getRequestUrl().

Change-Id: Ie2cc3bf806b7a6c45bc31a068fa4c64cecad51de
---
M app/build.gradle
M app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
2 files changed, 29 insertions(+), 36 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 98e1948..ccc4796 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -162,7 +162,7 @@
 // use http://gradleplease.appspot.com/ or http://search.maven.org/.
 // Debug with ./gradlew -q app:dependencies --configuration compile
 
-String okHttpVersion = '3.6.0' // When updating this version, resync file 
copies under
+String okHttpVersion = '3.8.0' // When updating this version, resync file 
copies under
// app/src/main/java/okhttp3
 String retrofitVersion = '2.2.0'
 String supportVersion = '25.3.1'
diff --git 
a/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java 
b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
index 2e70b70..df27cdd 100644
--- a/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
+++ b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
@@ -44,9 +44,15 @@
 import static okhttp3.internal.Util.closeQuietly;
 import static okhttp3.internal.Util.discard;
 
-/** Serves requests from the cache and writes responses to the cache. Copied 
from
- 
https://github.com/square/okhttp/blob/a27afaf/okhttp/src/main/java/okhttp3/internal/cache/CacheInterceptor.java
- to allow a custom cache strategy. Deviations are marked with "Change:". */
+/** Serves requests from the cache and writes responses to the cache. Copied 
from the OkHttp
+ repository (https://github.com/square/okhttp) to allow a custom cache 
strategy.
+
+ Last synchronized with OkHttp at the "parent-3.8.0" tag (last change: 
"Invalidate the cache even if
+ the response has no body." (c9496d3))
+
+ 
https://github.com/square/okhttp/blob/parent-3.8.0/okhttp/src/main/java/okhttp3/internal/cache/CacheInterceptor.java
+
+ Deviations are marked with "Change:". */
 public final class CacheDelegateInterceptor implements Interceptor {
   final InternalCache cache;
   // Change: add secondaryCache member variable
@@ -152,10 +158,23 @@
 .networkResponse(stripBody(networkResponse))
 .build();
 
-if (HttpHeaders.hasBody(response)) {
-  // Change: add cacheCandidate parameter
-  CacheRequest cacheRequest = maybeCache(cacheCandidate, response, 
networkResponse.request(), cache);
-  response = cacheWritingResponse(cacheRequest, response);
+if (cache != null) {
+  // Change: do not permit cache writes unless the page has been cached 
previously or the
+  // request is cacheable
+  if (HttpHeaders.hasBody(response) && CacheStrategy.isCacheable(response, 
networkRequest)
+  && !(cacheCandidate == null && 
!CacheDelegateStrategy.isCacheable(networkRequest))) {
+// Offer this request to the cache.
+CacheRequest cacheRequest = cache.put(response);
+return cacheWritingResponse(cacheRequest, response);
+  }
+
+  if (HttpMethod.invalidatesCache(networkRequest.method())) {
+try {
+  cache.remove(networkRequest);
+} catch (IOException ignored) {
+  // The cache cannot be written.
+}
+  }
 }
 
 return response;
@@ -163,35 +182,9 @@
 
   private static Response stripBody(Response response) {
 return response != null && response.body() != null
-? response.newBuilder().body(null).build()
-: response;
-  }
+? response.newBuilder().body(null).build()
+: response;
 
-  // Change: add cacheCandidate parameter
-  private 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Adjust wikimedia.org SPF from neutral (?all) to soft fail (~...

2017-06-09 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358132 )

Change subject: Adjust wikimedia.org SPF from neutral (?all) to soft fail 
(~all) to impede sender address spoofing.
..

Adjust wikimedia.org SPF from neutral (?all) to soft fail (~all) to impede 
sender address spoofing.

Bug: T133191
Bug: T127247
Change-Id: Ie9544ebb4c95fe300ca62f47325f49866d834b53
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/32/358132/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 3840abf..838a550 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -51,7 +51,7 @@
 _dmarc.lists1H  IN TXT "v=DMARC1; p=none; 
rua=mailto:dmarc-...@wikimedia.org, ruf=mailto:dmarc-...@wikimedia.org;;
 
 ; SPF txt and rr records
-wikimedia.org.  600 IN TXT  "v=spf1 ip4:91.198.174.0/24 
ip4:208.80.152.0/22 ip6:2620:0:860::/46 include:_spf.google.com 
ip4:74.121.51.111 ?all"
+wikimedia.org.  600 IN TXT  "v=spf1 ip4:91.198.174.0/24 
ip4:208.80.152.0/22 ip6:2620:0:860::/46 include:_spf.google.com 
ip4:74.121.51.111 ~all"
 
 donate  5M  IN TXT  "v=spf1 ip4:91.198.174.0/24 ip4:208.80.152.0/22 
ip6:2620:0:860::/46 include:_spf.google.com ip4:74.121.51.111 ?all"
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9544ebb4c95fe300ca62f47325f49866d834b53
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Herron 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Openstack: Added 'dnsleaks.py' script.

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

Change subject: Openstack:  Added 'dnsleaks.py' script.
..

Openstack:  Added 'dnsleaks.py' script.

This hunts and (optionally) kills duplicate and leaked DNS entries.

The battle to actually /prevent/ the leaks continues...

Change-Id: Iaaf90e5e20fb35257cdfd9b10dd6f1a953f8e152
---
A modules/openstack/files/novastats/dnsleaks.py
M modules/openstack/manifests/adminscripts.pp
2 files changed, 157 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/358124/1

diff --git a/modules/openstack/files/novastats/dnsleaks.py 
b/modules/openstack/files/novastats/dnsleaks.py
new file mode 100755
index 000..c3d5b2e
--- /dev/null
+++ b/modules/openstack/files/novastats/dnsleaks.py
@@ -0,0 +1,149 @@
+#!/usr/bin/python
+#
+# Copyright 2017 Wikimedia Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+"""
+Dig through designate records, find and correct inconsistencies.
+
+- Arecs that point to multiple IPs
+- Arecs that resolve nova VMs that don't exist anymore
+- PTRs for nova VMs that don't exist anymore
+
+Be default this just reports on issues but with the --delete
+command it will attempt to clean up as well.
+
+
+Note that this is potentially racy and may misfire for instances that
+are already mid-deletion.  In that case it should be safe to re-run.
+"""
+
+import argparse
+import mwopenstackclients
+
+import requests
+import yaml
+import time
+
+clients = mwopenstackclients.clients()
+
+
+def designate_endpoint_and_token():
+services = clients.keystoneclient().services.list()
+for service in services:
+if service.type == 'dns':
+serviceid = service.id
+break
+endpoints = clients.keystoneclient().endpoints.list(serviceid)
+for endpoint in endpoints:
+if endpoint.interface == 'public':
+url = endpoint.url
+
+session = clients.session()
+token = session.get_token()
+
+return (url, token)
+
+
+def delete_recordset(endpoint, token, zoneid, recordsetid):
+headers = {'X-Auth-Token': token,
+   'X-Auth-Sudo-Tenant-ID': 'noauth-project',
+   'X-Designate-Edit-Managed-Records': 'true'}
+recordseturl = "%s/v2/zones/%s/recordsets/%s" % (endpoint, zoneid, 
recordsetid)
+print("Deleting %s with %s" % (recordsetid, recordseturl))
+req = requests.delete(recordseturl,
+  headers=headers, verify=False)
+req.raise_for_status()
+time.sleep(1)
+
+
+def edit_recordset(endpoint, token, zoneid, recordset, newrecords):
+headers = {'X-Auth-Token': token,
+   'X-Auth-Sudo-Tenant-ID': 'noauth-project',
+   'X-Designate-Edit-Managed-Records': 'true'}
+
+patch = {"records": newrecords}
+
+print("Updating %s with %s" % (recordset['id'], newrecords))
+recordseturl = "%s/v2/zones/%s/recordsets/%s" % (endpoint, zoneid, 
recordset['id'])
+
+req = requests.put(recordseturl,
+   headers=headers, verify=False,
+   json=patch)
+req.raise_for_status()
+
+
+def purge_duplicates(delete=False):
+(endpoint, token) = designate_endpoint_and_token()
+
+headers = {'X-Auth-Token': token, 'X-Auth-Sudo-Tenant-ID': 
'noauth-project'}
+req = requests.get("%s/v2/zones" % (endpoint), headers=headers, 
verify=False)
+req.raise_for_status()
+zones = yaml.safe_load(req.text)['zones']
+
+for zone in zones:
+req = requests.get("%s/v2/zones/%s/recordsets" % (endpoint, 
zone['id']),
+   headers=headers, verify=False)
+req.raise_for_status()
+recordsets = yaml.safe_load(req.text)['recordsets']
+
+# we need a fresh copy of all instances so we don't accidentally
+#  delete things that have been created since we last checked.
+instances = clients.allinstances()
+all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name, 
instance.tenant_id)
+  for instance in instances]
+all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name)
+for instance in instances]
+
+for recordset in recordsets:
+name = recordset['name']
+recordsetid = recordset['id']
+if recordset['type'] == 'A':
+

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 148c226

2017-06-09 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358115 )

Change subject: Update restbase to 148c226
..


Update restbase to 148c226

List of changes:
1bb65cc Example project: Add the math public API
54c7892 Release v0.16.6
148c226 Provide an empty extract if it's not available
xxx Update node module dependencies

Change-Id: I0006a75109050ceb99dd515f51a841918e0ded57
---
M node_modules/bl/node_modules/readable-stream/.travis.yml
M node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
M node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
M 
node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js
M node_modules/bl/node_modules/readable-stream/package.json
A node_modules/bl/node_modules/safe-buffer/.travis.yml
R node_modules/bl/node_modules/safe-buffer/LICENSE
R node_modules/bl/node_modules/safe-buffer/browser.js
A node_modules/bl/node_modules/safe-buffer/index.js
A node_modules/bl/node_modules/safe-buffer/package.json
A node_modules/bl/node_modules/safe-buffer/test.js
M node_modules/bl/node_modules/string_decoder/lib/string_decoder.js
M node_modules/bl/node_modules/string_decoder/package.json
M node_modules/bl/package.json
M node_modules/brace-expansion/package.json
D node_modules/buffer-shims/index.js
D node_modules/buffer-shims/package.json
M node_modules/cassandra-driver/lib/client-options.js
M node_modules/cassandra-driver/lib/client.js
M node_modules/cassandra-driver/lib/connection.js
M node_modules/cassandra-driver/lib/control-connection.js
M node_modules/cassandra-driver/lib/host.js
M node_modules/cassandra-driver/lib/metadata/schema-index.js
M node_modules/cassandra-driver/lib/metadata/schema-parser.js
M node_modules/cassandra-driver/lib/policies/load-balancing.js
M node_modules/cassandra-driver/lib/types/duration.js
M node_modules/cassandra-driver/package.json
M node_modules/content-type/package.json
M node_modules/dtrace-provider/libusdt/Makefile
M node_modules/dtrace-provider/package.json
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/hot-shots/lib/statsd.js
M node_modules/hot-shots/package.json
D node_modules/jodid25519/.npmignore
D node_modules/jodid25519/.travis.yml
D node_modules/jodid25519/almond.0
D node_modules/jodid25519/almond.1
D node_modules/jodid25519/index.js
D node_modules/jodid25519/jsdoc.json
D node_modules/jodid25519/lib/core.js
D node_modules/jodid25519/lib/curve255.js
D node_modules/jodid25519/lib/dh.js
D node_modules/jodid25519/lib/eddsa.js
D node_modules/jodid25519/lib/utils.js
D node_modules/jodid25519/package.json
M node_modules/js-yaml/dist/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.min.js
M node_modules/js-yaml/lib/js-yaml/dumper.js
M node_modules/js-yaml/package.json
M node_modules/jsbn/package.json
M node_modules/json-stable-stringify/package.json
A node_modules/jsonwebtoken/.history/.travis_20170513142530.yml
A node_modules/jsonwebtoken/.history/index.d_20170513010248.ts
A node_modules/jsonwebtoken/.history/index.d_20170513010322.ts
A node_modules/jsonwebtoken/.history/lib/timespan_20170513162630.js
A node_modules/jsonwebtoken/.history/lib/timespan_20170513162744.js
A node_modules/jsonwebtoken/.history/package_20170513122214.json
A node_modules/jsonwebtoken/.history/package_20170513122244.json
A node_modules/jsonwebtoken/.history/package_20170513142409.json
A node_modules/jsonwebtoken/.history/package_20170513142453.json
A node_modules/jsonwebtoken/.history/package_20170513142659.json
A node_modules/jsonwebtoken/.history/package_20170513144757.json
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513143941.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513145829.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513154325.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155354.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155439.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155454.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160038.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160219.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160322.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160425.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163356.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163601.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163715.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163904.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513164126.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513164226.js
A 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 148c226

2017-06-09 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358115 )

Change subject: Update restbase to 148c226
..

Update restbase to 148c226

List of changes:
1bb65cc Example project: Add the math public API
54c7892 Release v0.16.6
148c226 Provide an empty extract if it's not available
xxx Update node module dependencies

Change-Id: I0006a75109050ceb99dd515f51a841918e0ded57
---
M node_modules/bl/node_modules/readable-stream/.travis.yml
M node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
M node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
M 
node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js
M node_modules/bl/node_modules/readable-stream/package.json
A node_modules/bl/node_modules/safe-buffer/.travis.yml
R node_modules/bl/node_modules/safe-buffer/LICENSE
R node_modules/bl/node_modules/safe-buffer/browser.js
A node_modules/bl/node_modules/safe-buffer/index.js
A node_modules/bl/node_modules/safe-buffer/package.json
A node_modules/bl/node_modules/safe-buffer/test.js
M node_modules/bl/node_modules/string_decoder/lib/string_decoder.js
M node_modules/bl/node_modules/string_decoder/package.json
M node_modules/bl/package.json
M node_modules/brace-expansion/package.json
D node_modules/buffer-shims/index.js
D node_modules/buffer-shims/package.json
M node_modules/cassandra-driver/lib/client-options.js
M node_modules/cassandra-driver/lib/client.js
M node_modules/cassandra-driver/lib/connection.js
M node_modules/cassandra-driver/lib/control-connection.js
M node_modules/cassandra-driver/lib/host.js
M node_modules/cassandra-driver/lib/metadata/schema-index.js
M node_modules/cassandra-driver/lib/metadata/schema-parser.js
M node_modules/cassandra-driver/lib/policies/load-balancing.js
M node_modules/cassandra-driver/lib/types/duration.js
M node_modules/cassandra-driver/package.json
M node_modules/content-type/package.json
M node_modules/dtrace-provider/libusdt/Makefile
M node_modules/dtrace-provider/package.json
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/hot-shots/lib/statsd.js
M node_modules/hot-shots/package.json
D node_modules/jodid25519/.npmignore
D node_modules/jodid25519/.travis.yml
D node_modules/jodid25519/almond.0
D node_modules/jodid25519/almond.1
D node_modules/jodid25519/index.js
D node_modules/jodid25519/jsdoc.json
D node_modules/jodid25519/lib/core.js
D node_modules/jodid25519/lib/curve255.js
D node_modules/jodid25519/lib/dh.js
D node_modules/jodid25519/lib/eddsa.js
D node_modules/jodid25519/lib/utils.js
D node_modules/jodid25519/package.json
M node_modules/js-yaml/dist/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.min.js
M node_modules/js-yaml/lib/js-yaml/dumper.js
M node_modules/js-yaml/package.json
M node_modules/jsbn/package.json
M node_modules/json-stable-stringify/package.json
A node_modules/jsonwebtoken/.history/.travis_20170513142530.yml
A node_modules/jsonwebtoken/.history/index.d_20170513010248.ts
A node_modules/jsonwebtoken/.history/index.d_20170513010322.ts
A node_modules/jsonwebtoken/.history/lib/timespan_20170513162630.js
A node_modules/jsonwebtoken/.history/lib/timespan_20170513162744.js
A node_modules/jsonwebtoken/.history/package_20170513122214.json
A node_modules/jsonwebtoken/.history/package_20170513122244.json
A node_modules/jsonwebtoken/.history/package_20170513142409.json
A node_modules/jsonwebtoken/.history/package_20170513142453.json
A node_modules/jsonwebtoken/.history/package_20170513142659.json
A node_modules/jsonwebtoken/.history/package_20170513144757.json
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513143941.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513145829.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513154325.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155354.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155439.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513155454.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160038.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160219.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160322.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513160425.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163356.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163601.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163715.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513163904.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513164126.js
A node_modules/jsonwebtoken/.history/test/verify.tests_20170513164226.js
A 

[MediaWiki-commits] [Gerrit] mediawiki...RandomImage[master]: Fix E_STRICT

2017-06-09 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358107 )

Change subject: Fix E_STRICT
..

Fix E_STRICT

Strict Warning: Non-static method DOMDocument::loadHTML() should not be
called statically in ../extensions/RandomImage/RandomImage.class.php on
line 113

Change-Id: I7b8bfc437f6a71250c4a9a23c81ce7d7f8ddf236
---
M RandomImage.class.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/RandomImage.class.php b/RandomImage.class.php
index 5f1246d..49ea49a 100644
--- a/RandomImage.class.php
+++ b/RandomImage.class.php
@@ -110,7 +110,8 @@
 * @return string
 */
protected function removeMagnifier( $html ) {
-   $doc = DOMDocument::loadHTML( $html );
+   $dom = new DOMDocument();
+   $doc = $dom->loadHTML( $html );
$xpath = new DOMXPath( $doc );
foreach( $xpath->query( '//div[@class="magnify"]' ) as $mag )
$mag->parentNode->removeChild( $mag );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b8bfc437f6a71250c4a9a23c81ce7d7f8ddf236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Drop Selenium jobs

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

Change subject: Drop Selenium jobs
..


Drop Selenium jobs

These do not work on skins (see T167543)

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c105200..1965b52 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1780,8 +1780,6 @@
  - name: mwgate-composer
  - name: mwgate-npm
  - name: skin-tests
- - name: mwgate-rake
- - name: extension-selenium
 postmerge:
  - mwext-jsduck-publish
  - mwext-doxygen-publish

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I634a1ded87ca737b7688dcf30b9b480dbaca2856
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Handle simply newlines

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358093 )

Change subject: Handle simply newlines
..

Handle simply newlines

Remove multiple empty lines and add some lines to functions

Prepare to make phpcs pass

Change-Id: Idc63e169b2e9203baaa2d2df14f8f4b2f463793c
---
M includes/CentralAuthPlugin.php
M includes/CentralAuthUser.php
M includes/EmailableUser.php
M includes/WikiSet.php
M includes/specials/SpecialCentralAutoLogin.php
M includes/specials/SpecialGlobalGroupPermissions.php
M includes/specials/SpecialGlobalRenameQueue.php
M includes/specials/SpecialWikiSets.php
M maintenance/migrateAccount.php
M tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
M tests/phpunit/CentralAuthPluginUsingDatabaseTest.php
M tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
12 files changed, 26 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/93/358093/1

diff --git a/includes/CentralAuthPlugin.php b/includes/CentralAuthPlugin.php
index d531601..e984a6d 100644
--- a/includes/CentralAuthPlugin.php
+++ b/includes/CentralAuthPlugin.php
@@ -157,7 +157,6 @@
return true;
}
 
-
/**
 * Check the user's password.
 *
@@ -224,7 +223,6 @@
}
return true;
}
-
 
/**
 * Return true if the wiki should create a new local account 
automatically
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 66717e7..690cd23 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2561,7 +2561,6 @@
__METHOD__ . " was called for a global user 
that doesn't exist ('$this->mName')." );
}
 
-
if ( $resetAuthToken ) {
$this->resetAuthToken();
}
diff --git a/includes/EmailableUser.php b/includes/EmailableUser.php
index f568566..3dca870 100644
--- a/includes/EmailableUser.php
+++ b/includes/EmailableUser.php
@@ -69,7 +69,6 @@
$mergeAccountUrl = $this->getTokenUrl( 'MergeAccount', 
$token );
}
 
-
$invalidateURL = $this->invalidationTokenUrl( $token );
$this->saveSettings();
 
diff --git a/includes/WikiSet.php b/includes/WikiSet.php
index 8ed4b94..0dd32e7 100755
--- a/includes/WikiSet.php
+++ b/includes/WikiSet.php
@@ -38,42 +38,58 @@
 * @param $k string
 * @return string
 */
-   protected static function memcKey( $k ) { return "wikiset:{$k}"; }
+   protected static function memcKey( $k ) {
+   return "wikiset:{$k}";
+   }
 
/**
 * @return int
 */
-   public function getId() { return $this->mId; }
+   public function getId() {
+   return $this->mId;
+   }
 
/**
 * @return bool
 */
-   public function exists() { return (bool)$this->getID(); }
+   public function exists() {
+   return (bool)$this->getID();
+   }
 
/**
 * @return string
 */
-   public function getName() { return $this->mName; }
+   public function getName() {
+   return $this->mName;
+   }
 
/**
 * @param string $n
 */
-   public function setName( $n ) { $this->setDbField( 'ws_name', $n ); }
+   public function setName( $n ) {
+   $this->setDbField( 'ws_name', $n );
+   }
 
/**
 * @return array
 */
-   public function getWikisRaw() { return $this->mWikis; }
+   public function getWikisRaw() {
+   return $this->mWikis;
+   }
 
/**
 * @param string $w
 */
-   public function setWikisRaw( $w ) { $this->setDbField( 'ws_wikis', $w 
); }
+   public function setWikisRaw( $w ) {
+   $this->setDbField( 'ws_wikis', $w );
+   }
 
/**
 * @return string
 */
-   public function getType() { return $this->mType; }
+   public function getType() {
+   return $this->mType;
+   }
 
/**
 * @param string $t
diff --git a/includes/specials/SpecialCentralAutoLogin.php 
b/includes/specials/SpecialCentralAutoLogin.php
index 57ff39e..1a854f5 100644
--- a/includes/specials/SpecialCentralAutoLogin.php
+++ b/includes/specials/SpecialCentralAutoLogin.php
@@ -310,7 +310,6 @@
return;
}
 
-
if ( $gu_id <= 0 ) {
$this->doFinalOutput( false, 'Not centrally 
logged in', self::getInlineScript( 'anon-set.js' ) );
return;
diff --git a/includes/specials/SpecialGlobalGroupPermissions.php 
b/includes/specials/SpecialGlobalGroupPermissions.php
index 56ea2ca..0ed6bce 100644
--- 

[MediaWiki-commits] [Gerrit] integration/config[master]: Drop Selenium jobs

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358092 )

Change subject: Drop Selenium jobs
..

Drop Selenium jobs

These do not work on skins (see T167543)

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/92/358092/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c105200..1965b52 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1780,8 +1780,6 @@
  - name: mwgate-composer
  - name: mwgate-npm
  - name: skin-tests
- - name: mwgate-rake
- - name: extension-selenium
 postmerge:
  - mwext-jsduck-publish
  - mwext-doxygen-publish

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I634a1ded87ca737b7688dcf30b9b480dbaca2856
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Use the new wgPopupsGateway config variable instead

2017-06-09 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358091 )

Change subject: Use the new wgPopupsGateway config variable instead
..

Use the new wgPopupsGateway config variable instead

With T165018 `wgPopupsAPIUseRESTBase` becomes deprecated, new
codebase will use `wgPopupsGateway`. For now we will keep both
variables and after rolling HTML capable previews to all servers
we wll remove old `wgPopupsAPIUseRESTBase` config variable.

Bug: T165018
Change-Id: I4f42c61b155a37c5dd42bc40034583865abd5d7a
---
M wmf-config/InitialiseSettings.php
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7605c12..e121471 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13331,6 +13331,18 @@
'huwiki' => true,
 ],
 
+'wgPopupsGateway' => [
+   'default' => 'mwApiPlain', 
+
+   // T158221: Make Page Previews use RESTBase for the following stage 0 
wikis.
+   'itwiki' => 'restbasePlain',
+   'ruwiki' => 'restbasePlain',
+   'elwiki' => 'restbasePlain',
+   'cawiki' => 'restbasePlain',
+   'hewiki' => 'restbasePlain',
+   'huwiki' => 'restbasePlain',
+],
+
 // T160081 (and others): Make sure that Page Previews can detect the many, many
 // variants of the NavPopups gadget.
 //

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceCategoryManager[master]: BlueSpiceCategoryManager: codestyling, leaf items

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

Change subject: BlueSpiceCategoryManager: codestyling, leaf items
..


BlueSpiceCategoryManager: codestyling, leaf items

Items without child nodes are now be able to get categories dropped in.
Codestyling needs merge to master
Removed unused code

Change-Id: I19a24db4712c1f406ee11be8260665ed080e7160
(cherry picked from commit 7a6dd1d652c4c2b1d8f8944ff38f4357a270c0c7)
---
M resources/BS.BlueSpiceCategoryManager/Model.js
M resources/BS.BlueSpiceCategoryManager/TreePanel.js
2 files changed, 40 insertions(+), 42 deletions(-)

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



diff --git a/resources/BS.BlueSpiceCategoryManager/Model.js 
b/resources/BS.BlueSpiceCategoryManager/Model.js
index bd22d05..0c3ed38 100644
--- a/resources/BS.BlueSpiceCategoryManager/Model.js
+++ b/resources/BS.BlueSpiceCategoryManager/Model.js
@@ -3,13 +3,22 @@
fields: [
{ name: 'text', type: 'string' },
{
-   name: 'leaf', type: 'boolean', convert: function() {
+   name: 'leaf', type: 'boolean', convert: function ( 
value, record ) {
return false;
}
},
{
-   name: 'href', type: 'string', convert: function( value, 
record  ) {
-   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text') );
+   name: 'loaded', type: 'boolean', convert: function ( 
value, record ) {
+   if( !record.data.root ) {
+   return record.raw.leaf;
+   }
+
+   return value;
+   }
+   },
+   {
+   name: 'href', type: 'string', convert: function ( 
value, record ) {
+   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text' ) );
return catTitle.getUrl();
}
},
diff --git a/resources/BS.BlueSpiceCategoryManager/TreePanel.js 
b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
index 0553925..73e10ef 100644
--- a/resources/BS.BlueSpiceCategoryManager/TreePanel.js
+++ b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
@@ -3,15 +3,17 @@
requires: [
'BS.action.APIAddCategories',
'BS.action.APIRemoveCategories',
+   'BS.action.APIDeletePage',
'BS.BlueSpiceCategoryManager.Model',
-   'BS.dialog.BatchActions'
+   'BS.dialog.BatchActions',
+   'Ext.data.TreeStore'
],
originalParent: undefined,
afterInitComponent: function () {
-   this.store = Ext.create( 'Ext.data.TreeStore', {
+   this.store = new Ext.data.TreeStore({
proxy: {
type: 'ajax',
-   url: mw.util.wikiScript('api'),
+   url: mw.util.wikiScript( 'api' ),
reader: {
type: 'json',
root: 'results',
@@ -30,7 +32,7 @@
model: 'BS.BlueSpiceCategoryManager.Model'
});
 
-   this.treePanel = new Ext.tree.Panel( {
+   this.treePanel = new Ext.tree.Panel({
useArrows: true,
height: 500,
rootVisible: false,
@@ -40,7 +42,11 @@
plugins: {
ptype: 'treeviewdragdrop',
dragText: mw.message( 
'bs-categorymanager-draganddrop-text' ).plain(),
-   enableDrop: true
+   enableDrop: true,
+   appendOnly: false,
+   sortOnDrop: true,
+   expandDelay: 250,
+   allowParentInserts: true
}
}
} );
@@ -110,7 +116,7 @@
addCategories: function( page, categories ) {
this.treePanel.setLoading( true );
 
-   return Ext.create('BS.action.APIAddCategories', {
+   return new BS.action.APIAddCategories({
pageTitle: page,
categories: categories
}).execute();
@@ -118,7 +124,7 @@
 
removeCategories: function( page, categories ) {
this.treePanel.setLoading( true );
-   return 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceCategoryManager[master]: BlueSpiceCategoryManager: codestyling, leaf items

2017-06-09 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358090 )

Change subject: BlueSpiceCategoryManager: codestyling, leaf items
..

BlueSpiceCategoryManager: codestyling, leaf items

Items without child nodes are now be able to get categories dropped in.
Codestyling needs merge to master
Removed unused code

Change-Id: I19a24db4712c1f406ee11be8260665ed080e7160
(cherry picked from commit 7a6dd1d652c4c2b1d8f8944ff38f4357a270c0c7)
---
M resources/BS.BlueSpiceCategoryManager/Model.js
M resources/BS.BlueSpiceCategoryManager/TreePanel.js
2 files changed, 40 insertions(+), 42 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceCategoryManager 
refs/changes/90/358090/1

diff --git a/resources/BS.BlueSpiceCategoryManager/Model.js 
b/resources/BS.BlueSpiceCategoryManager/Model.js
index bd22d05..0c3ed38 100644
--- a/resources/BS.BlueSpiceCategoryManager/Model.js
+++ b/resources/BS.BlueSpiceCategoryManager/Model.js
@@ -3,13 +3,22 @@
fields: [
{ name: 'text', type: 'string' },
{
-   name: 'leaf', type: 'boolean', convert: function() {
+   name: 'leaf', type: 'boolean', convert: function ( 
value, record ) {
return false;
}
},
{
-   name: 'href', type: 'string', convert: function( value, 
record  ) {
-   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text') );
+   name: 'loaded', type: 'boolean', convert: function ( 
value, record ) {
+   if( !record.data.root ) {
+   return record.raw.leaf;
+   }
+
+   return value;
+   }
+   },
+   {
+   name: 'href', type: 'string', convert: function ( 
value, record ) {
+   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text' ) );
return catTitle.getUrl();
}
},
diff --git a/resources/BS.BlueSpiceCategoryManager/TreePanel.js 
b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
index 0553925..73e10ef 100644
--- a/resources/BS.BlueSpiceCategoryManager/TreePanel.js
+++ b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
@@ -3,15 +3,17 @@
requires: [
'BS.action.APIAddCategories',
'BS.action.APIRemoveCategories',
+   'BS.action.APIDeletePage',
'BS.BlueSpiceCategoryManager.Model',
-   'BS.dialog.BatchActions'
+   'BS.dialog.BatchActions',
+   'Ext.data.TreeStore'
],
originalParent: undefined,
afterInitComponent: function () {
-   this.store = Ext.create( 'Ext.data.TreeStore', {
+   this.store = new Ext.data.TreeStore({
proxy: {
type: 'ajax',
-   url: mw.util.wikiScript('api'),
+   url: mw.util.wikiScript( 'api' ),
reader: {
type: 'json',
root: 'results',
@@ -30,7 +32,7 @@
model: 'BS.BlueSpiceCategoryManager.Model'
});
 
-   this.treePanel = new Ext.tree.Panel( {
+   this.treePanel = new Ext.tree.Panel({
useArrows: true,
height: 500,
rootVisible: false,
@@ -40,7 +42,11 @@
plugins: {
ptype: 'treeviewdragdrop',
dragText: mw.message( 
'bs-categorymanager-draganddrop-text' ).plain(),
-   enableDrop: true
+   enableDrop: true,
+   appendOnly: false,
+   sortOnDrop: true,
+   expandDelay: 250,
+   allowParentInserts: true
}
}
} );
@@ -110,7 +116,7 @@
addCategories: function( page, categories ) {
this.treePanel.setLoading( true );
 
-   return Ext.create('BS.action.APIAddCategories', {
+   return new BS.action.APIAddCategories({
pageTitle: page,
categories: categories
}).execute();
@@ -118,7 +124,7 @@
 
removeCategories: function( page, categories ) {
this.treePanel.setLoading( true 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceCategoryManager[master]: BlueSpiceCategoryManager: fixed logical errors, improvements

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

Change subject: BlueSpiceCategoryManager: fixed logical errors, improvements
..


BlueSpiceCategoryManager: fixed logical errors, improvements

the drag'n'drop logic did not handle every possibility. So some events did not 
call the API.
added loaderMask
added dialog at delete category
categories are now html links

code refactoring

Change-Id: Ie03e3c9b7b831f419b20dfc002a5544cfa4e5387
(cherry picked from commit 143be1a08c65c475cf1f713be8e907f7989679a9)
---
M extension.json
M resources/BS.BlueSpiceCategoryManager/Model.js
M resources/BS.BlueSpiceCategoryManager/TreePanel.js
3 files changed, 114 insertions(+), 89 deletions(-)

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



diff --git a/extension.json b/extension.json
index feed87c..ec5549a 100644
--- a/extension.json
+++ b/extension.json
@@ -37,7 +37,9 @@
],
"dependencies": [
"ext.bluespice.extjs",
-   "mediawiki.api.edit"
+   "ext.bluespice.extjs.BS.deferred",
+   "mediawiki.api.edit",
+   "mediawiki.Title"
],
"messages": [
"bs-categorymanager-draganddrop-text",
@@ -45,7 +47,6 @@
"bs-categorymanager-dlg-new-title",
"bs-categorymanager-removecategoryconfirm-text",
"bs-categorymanager-removecategoryconfirm-title"
-
]
}
},
diff --git a/resources/BS.BlueSpiceCategoryManager/Model.js 
b/resources/BS.BlueSpiceCategoryManager/Model.js
index 4d91ee5..bd22d05 100644
--- a/resources/BS.BlueSpiceCategoryManager/Model.js
+++ b/resources/BS.BlueSpiceCategoryManager/Model.js
@@ -2,8 +2,19 @@
extend: 'BS.model.Category',
fields: [
{ name: 'text', type: 'string' },
-   { name: 'leaf', type: 'boolean', convert: function() {
-   return false;
-   } }
+   {
+   name: 'leaf', type: 'boolean', convert: function() {
+   return false;
+   }
+   },
+   {
+   name: 'href', type: 'string', convert: function( value, 
record  ) {
+   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text') );
+   return catTitle.getUrl();
+   }
+   },
+   {
+   name: 'hrefTarget', type: 'string', defaultValue: 
'_blank'
+   }
]
 } );
\ No newline at end of file
diff --git a/resources/BS.BlueSpiceCategoryManager/TreePanel.js 
b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
index 5dfa6cf..0553925 100644
--- a/resources/BS.BlueSpiceCategoryManager/TreePanel.js
+++ b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
@@ -1,6 +1,5 @@
 Ext.define( "BS.BlueSpiceCategoryManager.TreePanel", {
extend: 'BS.CRUDPanel',
-   id: 'BlueSpiceCategoryManager',
requires: [
'BS.action.APIAddCategories',
'BS.action.APIRemoveCategories',
@@ -33,6 +32,7 @@
 
this.treePanel = new Ext.tree.Panel( {
useArrows: true,
+   height: 500,
rootVisible: false,
displayField: 'text',
store: this.store,
@@ -41,80 +41,13 @@
ptype: 'treeviewdragdrop',
dragText: mw.message( 
'bs-categorymanager-draganddrop-text' ).plain(),
enableDrop: true
-   },
-   listeners: {
-   beforedrop: function( node, data, 
overModel, dropPosition, dropHandler, eOpts ){
-   Ext.Array.each( data.records, 
function ( record ) {
-   this.originalParent = 
record.parentNode.get('text');
-   });
-   },
-   drop: function ( node, data, overModel, 
dropPosition, dropHandler, eOpts ) {
-   function addCategories(page, 
categories){
-   return 
Ext.create('BS.action.APIAddCategories', {
-   pageTitle: page,
-

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceCategoryManager[master]: BlueSpiceCategoryManager: fixed logical errors, improvements

2017-06-09 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358089 )

Change subject: BlueSpiceCategoryManager: fixed logical errors, improvements
..

BlueSpiceCategoryManager: fixed logical errors, improvements

the drag'n'drop logic did not handle every possibility. So some events did not 
call the API.
added loaderMask
added dialog at delete category
categories are now html links

code refactoring

Change-Id: Ie03e3c9b7b831f419b20dfc002a5544cfa4e5387
(cherry picked from commit 143be1a08c65c475cf1f713be8e907f7989679a9)
---
M extension.json
M resources/BS.BlueSpiceCategoryManager/Model.js
M resources/BS.BlueSpiceCategoryManager/TreePanel.js
3 files changed, 114 insertions(+), 89 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceCategoryManager 
refs/changes/89/358089/1

diff --git a/extension.json b/extension.json
index feed87c..ec5549a 100644
--- a/extension.json
+++ b/extension.json
@@ -37,7 +37,9 @@
],
"dependencies": [
"ext.bluespice.extjs",
-   "mediawiki.api.edit"
+   "ext.bluespice.extjs.BS.deferred",
+   "mediawiki.api.edit",
+   "mediawiki.Title"
],
"messages": [
"bs-categorymanager-draganddrop-text",
@@ -45,7 +47,6 @@
"bs-categorymanager-dlg-new-title",
"bs-categorymanager-removecategoryconfirm-text",
"bs-categorymanager-removecategoryconfirm-title"
-
]
}
},
diff --git a/resources/BS.BlueSpiceCategoryManager/Model.js 
b/resources/BS.BlueSpiceCategoryManager/Model.js
index 4d91ee5..bd22d05 100644
--- a/resources/BS.BlueSpiceCategoryManager/Model.js
+++ b/resources/BS.BlueSpiceCategoryManager/Model.js
@@ -2,8 +2,19 @@
extend: 'BS.model.Category',
fields: [
{ name: 'text', type: 'string' },
-   { name: 'leaf', type: 'boolean', convert: function() {
-   return false;
-   } }
+   {
+   name: 'leaf', type: 'boolean', convert: function() {
+   return false;
+   }
+   },
+   {
+   name: 'href', type: 'string', convert: function( value, 
record  ) {
+   var catTitle = mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.get( 'text') );
+   return catTitle.getUrl();
+   }
+   },
+   {
+   name: 'hrefTarget', type: 'string', defaultValue: 
'_blank'
+   }
]
 } );
\ No newline at end of file
diff --git a/resources/BS.BlueSpiceCategoryManager/TreePanel.js 
b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
index 5dfa6cf..0553925 100644
--- a/resources/BS.BlueSpiceCategoryManager/TreePanel.js
+++ b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
@@ -1,6 +1,5 @@
 Ext.define( "BS.BlueSpiceCategoryManager.TreePanel", {
extend: 'BS.CRUDPanel',
-   id: 'BlueSpiceCategoryManager',
requires: [
'BS.action.APIAddCategories',
'BS.action.APIRemoveCategories',
@@ -33,6 +32,7 @@
 
this.treePanel = new Ext.tree.Panel( {
useArrows: true,
+   height: 500,
rootVisible: false,
displayField: 'text',
store: this.store,
@@ -41,80 +41,13 @@
ptype: 'treeviewdragdrop',
dragText: mw.message( 
'bs-categorymanager-draganddrop-text' ).plain(),
enableDrop: true
-   },
-   listeners: {
-   beforedrop: function( node, data, 
overModel, dropPosition, dropHandler, eOpts ){
-   Ext.Array.each( data.records, 
function ( record ) {
-   this.originalParent = 
record.parentNode.get('text');
-   });
-   },
-   drop: function ( node, data, overModel, 
dropPosition, dropHandler, eOpts ) {
-   function addCategories(page, 
categories){
-   return 
Ext.create('BS.action.APIAddCategories', {
-   pageTitle: page,
- 

[MediaWiki-commits] [Gerrit] integration/config[master]: Add a skin specific selenium job

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358088 )

Change subject: Add a skin specific selenium job
..

Add a skin specific selenium job

Bug: T167543
Change-Id: Iea445da68e71c32caf48cda4a45171324bd4872a
---
M jjb/mediawiki-skins.yaml
M zuul/layout.yaml
2 files changed, 29 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/88/358088/1

diff --git a/jjb/mediawiki-skins.yaml b/jjb/mediawiki-skins.yaml
index 497914c..fc3b41c 100644
--- a/jjb/mediawiki-skins.yaml
+++ b/jjb/mediawiki-skins.yaml
@@ -27,3 +27,23 @@
 name: mw-testskin-non-voting
 triggers:
  - zuul
+
+# Generic mw-selenium job for skins
+- job:
+name: 'mwext-mw-selenium-jessie-skin'
+node: ci-jessie-wikimedia
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - castor-load
+ - prepare-mediawiki-zuul-project
+ - mw-selenium-nodepool:
+ tests-dir: src/skins/$SKIN_NAME/tests/browser
+publishers:
+ - castor-save
+ - archive-log-dir
+properties:
+ - build-discarder:
+ days-to-keep: 15
+ artifact-days-to-keep: 3
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c105200..fbcfad2 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -988,6 +988,14 @@
 
   # Template to run per-patch selenium browser test
   # Intentionally not in gate because it's super slow
+  - name: skin-selenium
+test:
+  - mwext-mw-selenium-jessie-skin
+postmerge:
+  - mwext-mw-selenium-jessie-skin
+
+  # Template to run per-patch selenium browser test
+  # Intentionally not in gate because it's super slow
   - name: extension-selenium
 test:
   - mwext-mw-selenium-jessie
@@ -1781,7 +1789,7 @@
  - name: mwgate-npm
  - name: skin-tests
  - name: mwgate-rake
- - name: extension-selenium
+ - name: skin-selenium
 postmerge:
  - mwext-jsduck-publish
  - mwext-doxygen-publish

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea445da68e71c32caf48cda4a45171324bd4872a
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update gson to 2.8.1

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

Change subject: Update gson to 2.8.1
..


Update gson to 2.8.1

Changes:

* New: JsonObject.keySet()

* @JsonAdapter annotation can now use JsonSerializer and JsonDeserializer
  as well.

https://github.com/google/gson/blob/master/CHANGELOG.md

Change-Id: I97cacee482fd2fa8ed6b2730c53cf9ed7c652e2f
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index dbdd574..b72e787 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -189,7 +189,7 @@
 compile "com.facebook.fresco:animated-gif:$frescoVersion"
 compile "com.facebook.fresco:fresco:$frescoVersion"
 compile "com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion"
-compile 'com.google.code.gson:gson:2.8'
+compile 'com.google.code.gson:gson:2.8.1'
 compile 'com.romandanylyk:pageindicatorview:0.1.2'
 compile "com.squareup.okhttp3:okhttp-urlconnection:$okHttpVersion" // for 
JavaNetCookieJar
 compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97cacee482fd2fa8ed6b2730c53cf9ed7c652e2f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Handle simply newlines

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358086 )

Change subject: Handle simply newlines
..

Handle simply newlines

Remove multiple empty lines and add some lines to functions

Prepare to make phpcs pass

Change-Id: I82926472980bd51ebe6375252d4154155397158b
---
M CirrusSearch.php
M includes/BuildDocument/Completion/SuggestBuilder.php
M includes/BuildDocument/Completion/SuggestScoring.php
M includes/CompletionSuggester.php
M includes/Connection.php
M includes/Elastica/MultiSearch.php
M includes/Elastica/ReindexTask.php
M includes/Extra/Query/TokenCountRouter.php
M includes/Hooks.php
M includes/InterwikiSearcher.php
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/IndexCreator.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Maintenance/MetaStoreIndex.php
M includes/NearMatchPicker.php
M includes/OtherIndexes.php
M includes/Query/FullTextSimpleMatchQueryBuilder.php
M includes/Query/SimpleKeywordFeature.php
M includes/Sanity/Checker.php
M includes/Sanity/Remediator.php
M includes/Search/DatetimeIndexField.php
M includes/Search/RescoreBuilders.php
M includes/Search/ResultsType.php
M includes/Search/SearchContext.php
M includes/Search/SourceTextIndexField.php
M includes/Search/TextIndexField.php
M includes/Searcher.php
M includes/SiteMatrixInterwikiResolver.php
M includes/Util.php
M maintenance/forceSearchIndex.php
M maintenance/saneitizeJobs.php
M maintenance/updateSuggesterIndex.php
M profiles/PhraseSuggesterProfiles.config.php
M profiles/PhraseSuggesterProfiles.php
M tests/jenkins/FullyFeaturedConfig.php
M tests/relforge/bm25enwiki/rescore.inc
M tests/relforge/bm25enwiki_inclinks_pv/rescore.inc
M tests/relforge/bm25enwiki_inclinks_pv_reverse/rescore.inc
M tests/relforge/bm25frwiki/rescore.inc
M tests/relforge/en-wp-bm25-wp10-normal-sugg/rescore.inc
M tests/relforge/en-wp-bm25-wp10/rescore.inc
M tests/unit/CompletionSuggesterTest.php
M tests/unit/InterwikiResolverTest.php
M tests/unit/RequestLoggerTest.php
M tests/unit/SearcherTest.php
M tests/unit/SuggestScoringTest.php
M tests/unit/UserTestingTest.php
47 files changed, 68 insertions(+), 84 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 726c1cf..c2e6fc2 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -531,7 +531,6 @@
'minimum_should_match' => '30%',
 ];
 
-
 // Hard limit to the max_query_terms parameter of more like this queries.
 // This prevent running too large queries.
 $wgCirrusSearchMoreLikeThisMaxQueryTermsLimit = 100;
@@ -811,7 +810,6 @@
  */
 $wgCirrusSearchUseIcuTokenizer = 'default';
 
-
 /**
  * Set the default scoring function to be used by 
maintenance/updateSuggesterIndex.php
  * @see includes/BuildDocument/SuggestScoring.php for more details about 
scoring functions
@@ -1090,7 +1088,6 @@
  * reindex is running.
  */
 $wgCirrusSearchPrefixIds = false;
-
 
 /**
  * Adds an artificial backend latency in miroseconds.
diff --git a/includes/BuildDocument/Completion/SuggestBuilder.php 
b/includes/BuildDocument/Completion/SuggestBuilder.php
index 69c067b..7de959d 100644
--- a/includes/BuildDocument/Completion/SuggestBuilder.php
+++ b/includes/BuildDocument/Completion/SuggestBuilder.php
@@ -217,7 +217,6 @@
return array_values( array_unique( $fields ) );
}
 
-
/**
 * Builds the 'title' suggestion.
 *
diff --git a/includes/BuildDocument/Completion/SuggestScoring.php 
b/includes/BuildDocument/Completion/SuggestScoring.php
index 359e7de..ef64e76 100644
--- a/includes/BuildDocument/Completion/SuggestScoring.php
+++ b/includes/BuildDocument/Completion/SuggestScoring.php
@@ -66,7 +66,6 @@
public function setMaxDocs( $maxDocs );
 }
 
-
 /**
  * Very simple scoring method based on incoming links
  */
@@ -88,7 +87,8 @@
/**
 * @param int $maxDocs
 */
-   public function setMaxDocs( $maxDocs ) {}
+   public function setMaxDocs( $maxDocs ) {
+   }
 }
 
 /**
@@ -276,7 +276,6 @@
}
}
 }
-
 
 /**
  * Score that combines QualityScore and the pageviews statistics (popularity)
diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 9fc8bf7..84523d9 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -404,7 +404,6 @@
// for CrossNS redirect 
we prefer the returned suggestion
$suggestion->setText( 
$targetTitle );
 
-
} else {
$suggestion->setText( 
$page );
}
diff --git a/includes/Connection.php b/includes/Connection.php
index 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update Android SDK Build Tools to 25.0.3

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

Change subject: Update Android SDK Build Tools to 25.0.3
..


Update Android SDK Build Tools to 25.0.3

Release notes:

Updates to apksigner:

* Added --in parameter for symmetry with existing --out parameter.

* If you do not specify the key password using --key-pass, apksigner uses
  the keystore password as key password. However, if the key requires a
  different password, you are now prompted to enter the key password from
  the command line. (Issue #37134986)

* Added compatibility with jarsigner for non-ASCII passwords.
  (Issue #37135737)

https://developer.android.com/studio/releases/build-tools.html

Change-Id: Iaf459724492c85b2b8146cde5680e7a178f6212c
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index dbdd574..e0e8214 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,7 +39,7 @@
 android {
 // Keep version in sync with /project.properties
 compileSdkVersion 25
-buildToolsVersion '25.0.2'
+buildToolsVersion '25.0.3'
 
 compileOptions {
 sourceCompatibility = JAVA_VERSION

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf459724492c85b2b8146cde5680e7a178f6212c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: Unittests: manual backport of 357975

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

Change subject: Unittests: manual backport of 357975
..


Unittests: manual backport of 357975

Change-Id: Ic913945d445d25026526cd254f5eb4ae33c13bce
---
M tests/api/BSApiAdminUserStoreTest.php
M tests/api/BSApiUserStoreTest.php
2 files changed, 35 insertions(+), 13 deletions(-)

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



diff --git a/tests/api/BSApiAdminUserStoreTest.php 
b/tests/api/BSApiAdminUserStoreTest.php
index 5eae774..da3ad4d 100644
--- a/tests/api/BSApiAdminUserStoreTest.php
+++ b/tests/api/BSApiAdminUserStoreTest.php
@@ -3,11 +3,11 @@
 /**
  * @group medium
  * @group api
+ * @group Database
  * @group BlueSpice
  * @group BlueSpiceFoundation
  */
 class BSApiAdminUserStoreTest extends BSApiExtJSStoreTestBase {
-   protected $iFixtureTotal = 3;
 
protected function getStoreSchema() {
return [
@@ -45,7 +45,7 @@
}
 
protected function createStoreFixtureData() {
-   return 3;
+   self::$userFixtures = new BSUserFixtures( $this );
}
 
protected function getModuleName() {
@@ -54,7 +54,7 @@
 
public function provideSingleFilterData() {
return [
-   'Filter by user_name' => [ 'string', 'ct', 'user_name', 
'Sysop', 2 ]
+   'Filter by user_name' => [ 'string', 'ct', 'user_name', 
'John', 1 ]
];
}
 
@@ -66,18 +66,30 @@
'type' => 'string',
'comparison' => 'ct',
'field' => 'user_email',
-   'value' => 'example.com'
+   'value' => 
'example.doesnotexist'
],
[
'type' => 'string',
'comparison' => 'ct',
'field' => 'user_name',
-   'value' => 'Sysop'
+   'value' => 'John'
]
],
1
]
];
}
-}
 
+   public function provideKeyItemData() {
+   return[
+   'Test user John: name' => [ "user_name", "John" ],
+   'Test user Paul: name' => [ "user_name", "Paul" ],
+   'Test user John: email' => [ "user_email", 
"j@example.doesnotexist" ],
+   'Test user Paul: email' => [ "user_email", 
"p@example.doesnotexist" ]
+   ];
+   }
+
+   protected function skipAssertTotal() {
+   return true;
+   }
+}
\ No newline at end of file
diff --git a/tests/api/BSApiUserStoreTest.php b/tests/api/BSApiUserStoreTest.php
index 2fb0dbd..4547bb6 100644
--- a/tests/api/BSApiUserStoreTest.php
+++ b/tests/api/BSApiUserStoreTest.php
@@ -3,12 +3,11 @@
 /**
  * @group medium
  * @group api
+ * @group Database
  * @group BlueSpice
  * @group BlueSpiceFoundation
  */
 class BSApiUserStoreTest extends BSApiExtJSStoreTestBase {
-   protected $iFixtureTotal = 3;
-
protected function getStoreSchema() {
return [
'user_id' => [
@@ -42,7 +41,7 @@
}
 
protected function createStoreFixtureData() {
-   return 3;
+   self::$userFixtures = new BSUserFixtures( $this );
}
 
protected function getModuleName() {
@@ -51,7 +50,7 @@
 
public function provideSingleFilterData() {
return [
-   'Filter by user_name' => [ 'string', 'ct', 'user_name', 
'Sysop', 2 ]
+   'Filter by user_name' => [ 'string', 'ct', 'user_name', 
'John', 1 ]
];
}
 
@@ -63,18 +62,29 @@
'type' => 'string',
'comparison' => 'eq',
'field' => 'display_name',
-   'value' => 'UTSysop'
+   'value' => 'John L.'
],
[
'type' => 'string',
'comparison' => 'ct',
'field' => 'user_name',
-   'value' => 'Sysop'
+ 

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Removes pagequality-admin right from sysop user group

2017-06-09 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358084 )

Change subject: Removes pagequality-admin right from sysop user group
..

Removes pagequality-admin right from sysop user group

Bug: T167491
Change-Id: I8fa665aae76f3beaaac15286ba0a15bc5996f587
---
M extension.json
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/extension.json b/extension.json
index 47afd82..b547d79 100644
--- a/extension.json
+++ b/extension.json
@@ -15,9 +15,6 @@
"GroupPermissions": {
"user": {
"pagequality": true
-   },
-   "sysop": {
-   "pagequality-admin": true
}
},
"AvailableRights": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fa665aae76f3beaaac15286ba0a15bc5996f587
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: ApiUnitTests: Added simplified fixtures for users

2017-06-09 Thread Mglaser (Code Review)
Mglaser has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358013 )

Change subject: ApiUnitTests: Added simplified fixtures for users
..


ApiUnitTests: Added simplified fixtures for users

... and pages

This should ease development of tests that require more than
one page and three users (as it is default in ApiTestCase).

Change-Id: I5af8587aac6b5f6f402b1b73203cedf24041aa03
---
M extension.json
M tests/BSApiExtJSStoreTestBase.php
M tests/BSApiTasksTestBase.php
A tests/BSApiTestCase.php
A tests/BSFixturesProvider.php
A tests/BSFixturesTest.php
A tests/BSPageFixtures.php
M tests/BSPageFixturesProvider.php
A tests/BSUserFixtures.php
A tests/BSUserFixturesProvider.php
A tests/data/users.json
11 files changed, 178 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index 4f560ba..c8325da 100644
--- a/extension.json
+++ b/extension.json
@@ -562,7 +562,12 @@
"BSEntityConfig": "includes/entityconfigs/EntityConfig.php",
"BSEntityContent": "includes/content/EntityContent.php",
"BSEntityContentHandler": 
"includes/content/EntityContentHandler.php",
+   "BSApiTestCase": "tests/BSApiTestCase.php",
+   "BSFixturesProvider": "tests/BSFixturesProvider.php",
"BSPageFixturesProvider": "tests/BSPageFixturesProvider.php",
+   "BSUserFixturesProvider": "tests/BSUserFixturesProvider.php",
+   "BSPageFixtures": "tests/BSPageFixtures.php",
+   "BSUserFixtures": "tests/BSUserFixtures.php",
"BSApiExtJSStoreTestBase": "tests/BSApiExtJSStoreTestBase.php",
"BSApiTasksTestBase": "tests/BSApiTasksTestBase.php",
"BSTemplateHelper": "includes/TemplateHelper.php",
diff --git a/tests/BSApiExtJSStoreTestBase.php 
b/tests/BSApiExtJSStoreTestBase.php
index e4627a8..a9dfb84 100644
--- a/tests/BSApiExtJSStoreTestBase.php
+++ b/tests/BSApiExtJSStoreTestBase.php
@@ -4,7 +4,7 @@
  *
  * Class BSApiExtJSStoreTestBase
  */
-abstract class BSApiExtJSStoreTestBase extends ApiTestCase {
+abstract class BSApiExtJSStoreTestBase extends BSApiTestCase {
 
protected $iFixtureTotal = 0;
protected $sQuery = '';
diff --git a/tests/BSApiTasksTestBase.php b/tests/BSApiTasksTestBase.php
index 63fdb60..90f4b62 100644
--- a/tests/BSApiTasksTestBase.php
+++ b/tests/BSApiTasksTestBase.php
@@ -1,6 +1,6 @@
 makeTestUsers();
+   }
+   }
+
+   /**
+* Making this public so we cam make use of it from within a "*Fixtures"
+* class
+* @param string $pageName
+* @param string $text
+*/
+   public function insertPage($pageName, $text = 'Sample page for unit 
test.') {
+   return parent::insertPage($pageName, $text);
+   }
+}
+
diff --git a/tests/BSFixturesProvider.php b/tests/BSFixturesProvider.php
new file mode 100644
index 000..2d89afc
--- /dev/null
+++ b/tests/BSFixturesProvider.php
@@ -0,0 +1,8 @@
+assertTrue( $title->exists(), 'Title should be known' );
+   }
+
+   public function testUserFixtures() {
+   $user = User::newFromName( 'Paul' );
+   $this->assertFalse( $user->isAnon(), "User should be known" );
+
+
+   $groups = $user->getGroups();
+
+   $this->assertTrue( in_array( 'A', $groups ), 'User should be in 
group A' );
+   $this->assertFalse( in_array( 'B', $groups ), 'User should not 
be in group B' );
+   $this->assertTrue( in_array( 'C', $groups ), 'User should be in 
group C' );
+   }
+}
\ No newline at end of file
diff --git a/tests/BSPageFixtures.php b/tests/BSPageFixtures.php
new file mode 100644
index 000..50c6a4b
--- /dev/null
+++ b/tests/BSPageFixtures.php
@@ -0,0 +1,20 @@
+getFixtureData() as $pageData ) {
+   $testcase->insertPage( $pageData[0], $pageData[1] );
+   }
+   }
+}
\ No newline at end of file
diff --git a/tests/BSPageFixturesProvider.php b/tests/BSPageFixturesProvider.php
index 9779a75..5406143 100644
--- a/tests/BSPageFixturesProvider.php
+++ b/tests/BSPageFixturesProvider.php
@@ -1,12 +1,12 @@
 pages;
}
 }
\ No newline at end of file
diff --git a/tests/BSUserFixtures.php b/tests/BSUserFixtures.php
new file mode 100644
index 000..f998d51
--- /dev/null
+++ b/tests/BSUserFixtures.php
@@ -0,0 +1,51 @@
+setUserFixture( $this );
+
+   //Read in only once!
+   $this->fixtureData = $provider->getFixtureData();
+   }
+
+   /**
+*
+* @return \TestUser[]
+*/
+   public function makeTestUsers() {
+   $users = [];
+   foreach( $this->fixtureData as $userData ) {
+   $user = new TestUser(
+   $userData[0], $userData[1], $userData[2], 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: CI should pass

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358083 )

Change subject: CI should pass
..

CI should pass

Change-Id: I84ae3ea14191f672cabcd52020e80b0a40a72ce1
---
A .rubocop.yml
A Gemfile
A Gemfile.lock
M skin.json
A tests/browser/LocalSettings.php
A tests/browser/README.mediawiki
A tests/browser/ci.yml
A tests/browser/environments.yml
A tests/browser/features/helloworld.feature
9 files changed, 247 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/83/358083/1

diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 000..cc32da4
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1 @@
+inherit_from: .rubocop_todo.yml
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 000..144b926
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+gem 'chunky_png', '~> 1.3.4'
+gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.3'
+gem 'page-object', '1.1.0'
+gem 'rake', '~> 10.4', '>= 10.4.2'
+gem 'rubocop', '~> 0.29.1', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 000..0b46fb7
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,109 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+ast (2.2.0)
+astrolabe (1.3.1)
+  parser (~> 2.2)
+builder (3.2.2)
+childprocess (0.5.9)
+  ffi (~> 1.0, >= 1.0.11)
+chunky_png (1.3.5)
+cucumber (1.3.20)
+  builder (>= 2.1.2)
+  diff-lcs (>= 1.1.3)
+  gherkin (~> 2.12)
+  multi_json (>= 1.7.5, < 2.0)
+  multi_test (>= 0.1.2)
+data_magic (0.22)
+  faker (>= 1.1.2)
+  yml_reader (>= 0.6)
+diff-lcs (1.2.5)
+domain_name (0.5.20161129)
+  unf (>= 0.0.5, < 1.0.0)
+faker (1.6.3)
+  i18n (~> 0.5)
+faraday (0.10.0)
+  multipart-post (>= 1.2, < 3)
+faraday-cookie_jar (0.0.6)
+  faraday (>= 0.7.4)
+  http-cookie (~> 1.0.0)
+faraday_middleware (0.10.1)
+  faraday (>= 0.7.4, < 1.0)
+ffi (1.9.10)
+gherkin (2.12.2)
+  multi_json (~> 1.3)
+headless (2.3.1)
+http-cookie (1.0.3)
+  domain_name (~> 0.5)
+i18n (0.7.0)
+json (1.8.3)
+mediawiki_api (0.7.0)
+  faraday (~> 0.9, >= 0.9.0)
+  faraday-cookie_jar (~> 0.0, >= 0.0.6)
+  faraday_middleware (~> 0.10, >= 0.10.0)
+mediawiki_selenium (1.7.3)
+  cucumber (~> 1.3, >= 1.3.20)
+  headless (~> 2.0, >= 2.1.0)
+  json (~> 1.8, >= 1.8.1)
+  mediawiki_api (~> 0.7, >= 0.7.0)
+  page-object (~> 1.0)
+  rest-client (~> 1.6, >= 1.6.7)
+  rspec-core (~> 2.14, >= 2.14.4)
+  rspec-expectations (~> 2.14, >= 2.14.4)
+  selenium-webdriver (< 3)
+  syntax (~> 1.2, >= 1.2.0)
+  thor (~> 0.19, >= 0.19.1)
+mime-types (2.99.3)
+multi_json (1.12.1)
+multi_test (0.1.2)
+multipart-post (2.0.0)
+netrc (0.11.0)
+page-object (1.1.0)
+  page_navigation (>= 0.9)
+  selenium-webdriver (>= 2.44.0)
+  watir-webdriver (>= 0.6.11)
+page_navigation (0.9)
+  data_magic (>= 0.14)
+parser (2.3.0.7)
+  ast (~> 2.2)
+powerpack (0.1.1)
+rainbow (2.1.0)
+rake (10.5.0)
+rest-client (1.8.0)
+  http-cookie (>= 1.0.2, < 2.0)
+  mime-types (>= 1.16, < 3.0)
+  netrc (~> 0.7)
+rspec-core (2.99.2)
+rspec-expectations (2.99.2)
+  diff-lcs (>= 1.1.3, < 2.0)
+rubocop (0.29.1)
+  astrolabe (~> 1.3)
+  parser (>= 2.2.0.1, < 3.0)
+  powerpack (~> 0.1)
+  rainbow (>= 1.99.1, < 3.0)
+  ruby-progressbar (~> 1.4)
+ruby-progressbar (1.8.0)
+rubyzip (1.2.0)
+selenium-webdriver (2.53.0)
+  childprocess (~> 0.5)
+  rubyzip (~> 1.0)
+  websocket (~> 1.0)
+syntax (1.2.1)
+thor (0.19.4)
+unf (0.1.4)
+  unf_ext
+unf_ext (0.0.7.2)
+watir-webdriver (0.9.1)
+  selenium-webdriver (>= 2.46.2)
+websocket (1.2.3)
+yml_reader (0.7)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  chunky_png (~> 1.3.4)
+  mediawiki_selenium (~> 1.7, >= 1.7.3)
+  page-object (= 1.1.0)
+  rake (~> 10.4, >= 10.4.2)
+  rubocop (~> 0.29.1)
diff --git a/skin.json b/skin.json
index 9cec34b..2e8a4fd 100644
--- a/skin.json
+++ b/skin.json
@@ -21,7 +21,6 @@
 "minerva": "Minerva"
   },
   "author": [],
-  "callback": "MinervaHooks::onRegistration",
   "config": {},
   "descriptionmsg": "minerva-neue-skin-desc",
   "license-name": "GPL-2.0+",
diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
new file mode 100644
index 000..b3d9bbc
--- /dev/null
+++ b/tests/browser/LocalSettings.php
@@ -0,0 +1 @@
+
+include_once "$IP/extensions/MobileFrontend/tests/browser/LocalSettings.php";
+
+
+Further tweaks may be necessary to run tests that are not tagged @integration:
+* Ensure you have [//www.mediawiki.org/wiki/Extension:ConfirmEdit 
Extension:ConfirmEdit] installed
+** and setup with FancyCaptcha
+* The VisualEditor, Cite, and Echo 

[MediaWiki-commits] [Gerrit] mediawiki...GoogleLogin[master]: Add API module to manage the list of domains when using the ...

2017-06-09 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358082 )

Change subject: Add API module to manage the list of domains when using the 
database
..

Add API module to manage the list of domains when using the database

The new googleloginmanagealloweddomain api module allows an user with the
managegooglelogindomains permission to add and remove domains from the lits
of allowed domains, as long as the configured backend allows to be changed
using the API (e.g. the database backend).

Bug: T166423
Change-Id: I6c0249f6eab7463ae730799b1e6d71580470e2cd
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/alloweddomains/CachedAllowedDomainsStore.php
M includes/alloweddomains/DBAllowedDomainsStore.php
M includes/alloweddomains/MutableAllowedDomainsStore.php
A includes/api/ApiGoogleLoginManageAllowedDomains.php
7 files changed, 119 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/82/358082/1

diff --git a/extension.json b/extension.json
index 2843a81..564fb94 100644
--- a/extension.json
+++ b/extension.json
@@ -15,7 +15,8 @@
"MediaWiki": ">= 1.28.0"
},
"AvailableRights": [
-   "managegooglelogin"
+   "managegooglelogin",
+   "managegooglelogindomains"
],
"ConfigRegistry": {
"googlelogin": "GlobalVarConfig::newInstance"
@@ -30,7 +31,8 @@
"echo-subscriptions-email-change-googlelogin": true
},
"APIModules": {
-   "googleplusprofileinfo": "ApiGoogleLoginInfo"
+   "googleplusprofileinfo": "ApiGoogleLoginInfo",
+   "googleloginmanagealloweddomain": 
"GoogleLogin\\Api\\ApiGoogleLoginManageAllowedDomains"
},
"MessagesDirs": {
"GoogleLogin": [
@@ -61,6 +63,7 @@
"GoogleLogin\\AllowedDomains\\DBAllowedDomainsStore": 
"includes/alloweddomains/DBAllowedDomainsStore.php",
"GoogleLogin\\AllowedDomains\\CachedAllowedDomainsStore": 
"includes/alloweddomains/CachedAllowedDomainsStore.php",
"GoogleLogin\\AllowedDomains\\EmailDomain": 
"includes/alloweddomains/EmailDomain.php",
+   "GoogleLogin\\Api\\ApiGoogleLoginManageAllowedDomains": 
"includes/api/ApiGoogleLoginManageAllowedDomains.php",
"ApiGoogleLoginInfo": "includes/api/ApiGoogleLoginInfo.php"
},
"AuthManagerAutoConfig": {
diff --git a/i18n/en.json b/i18n/en.json
index fa2dfc2..f06da7e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,6 +6,9 @@
},
"apihelp-googleplusprofileinfo-description": "Makes a request to the 
Google+ api to find out some personal information about a given user.",
"apihelp-googleplusprofileinfo-param-googleid": "The Google ID of the 
user.",
+   "apihelp-googleloginmanagealloweddomain-description": "Allows you to 
manage the list of domains, which are allowed to be used to login with Google.",
+   "apihelp-googleloginmanagealloweddomain-param-method": "The method to 
execute, either removing or adding a domain from/to the list.",
+   "apihelp-googleloginmanagealloweddomain-param-domain": "The domain to 
add or remove to the list.",
"googlelogin": "Log in with Google",
"googlelogin-auth-service-name": "Google",
"managegooglelogin": "Manage GoogleLogin connections",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f921a3f..7e4c76f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -12,6 +12,9 @@
},
"apihelp-googleplusprofileinfo-description": 
"{{doc-apihelp-description|googleplusprofileinfo}}",
"apihelp-googleplusprofileinfo-param-googleid": 
"{{doc-apihelp-param|googleplusprofileinfo|googleid}}",
+   "apihelp-googleloginmanagealloweddomain-description": 
"{{doc-apihelp-description|googleloginmanagealloweddomain}}",
+   "apihelp-googleloginmanagealloweddomain-param-method": 
"{{doc-apihelp-param|googleloginmanagealloweddomain|method}}",
+   "apihelp-googleloginmanagealloweddomain-param-domain": 
"{{doc-apihelp-param|googleloginmanagealloweddomain|domain}}",
"googlelogin": "{{doc-special|GoogleLogin}}\nAlso used as label for the 
button shown in [[Special:Login]].",
"googlelogin-auth-service-name": "The name of the service used to 
authenticate an user.",
"managegooglelogin": "Title of Special:ManageGoogleLogin",
diff --git a/includes/alloweddomains/CachedAllowedDomainsStore.php 
b/includes/alloweddomains/CachedAllowedDomainsStore.php
index 60ac2ab..f8fc388 100644
--- a/includes/alloweddomains/CachedAllowedDomainsStore.php
+++ b/includes/alloweddomains/CachedAllowedDomainsStore.php
@@ -62,11 +62,22 @@
throw new \InvalidArgumentException(
'The backend domain store does not support to 
change the store 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] noreferences.py: outputs & frwiki dict

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

Change subject: [IMPR] noreferences.py: outputs & frwiki dict
..


[IMPR] noreferences.py: outputs & frwiki dict

Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
---
M scripts/noreferences.py
1 file changed, 14 insertions(+), 12 deletions(-)

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



diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 604cc17..ec98b79 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -34,7 +34,7 @@
 a list of affected articles
 """
 #
-# (C) Pywikibot team, 2007-2015
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -287,7 +287,8 @@
 u'Notes et références',
 u'Références',
 u'References',
-u'Notes'
+'Notes',
+'Sources',
 ],
 'he': [
 u'הערות שוליים',
@@ -644,23 +645,23 @@
 try:
 text = page.text
 except pywikibot.NoPage:
-pywikibot.output(u"Page %s does not exist?!"
- % page.title(asLink=True))
+pywikibot.warning('Page %s does not exist?!'
+  % page.title(asLink=True))
 continue
 except pywikibot.IsRedirectPage:
 pywikibot.output(u"Page %s is a redirect; skipping."
  % page.title(asLink=True))
 continue
 except pywikibot.LockedPage:
-pywikibot.output(u"Page %s is locked?!"
- % page.title(asLink=True))
+pywikibot.warning('Page %s is locked?!'
+  % page.title(asLink=True))
 continue
 if page.isDisambig():
 pywikibot.output(u"Page %s is a disambig; skipping."
  % page.title(asLink=True))
 continue
 if self.site.sitename == 'wikipedia:en' and page.isIpEdit():
-pywikibot.output(
+pywikibot.warning(
 u"Page %s is edited by IP. Possible vandalized"
 % page.title(asLink=True))
 continue
@@ -669,14 +670,15 @@
 try:
 self.userPut(page, page.text, newText, 
summary=self.comment)
 except pywikibot.EditConflict:
-pywikibot.output(u'Skipping %s because of edit conflict'
- % page.title())
+pywikibot.warning('Skipping %s because of edit conflict'
+  % page.title(asLink=True))
 except pywikibot.SpamfilterError as e:
-pywikibot.output(
+pywikibot.warning(
 u'Cannot change %s because of blacklist entry %s'
-% (page.title(), e.url))
+% (page.title(asLink=True), e.url))
 except pywikibot.LockedPage:
-pywikibot.output(u'Skipping %s (locked page)' % 
page.title())
+pywikibot.warning('Skipping %s (locked page)' %
+  page.title(asLink=True))
 
 
 def main(*args):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GoogleLogin[master]: Add backend services and functions for allowed domains in th...

2017-06-09 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358081 )

Change subject: Add backend services and functions for allowed domains in the 
database
..

Add backend services and functions for allowed domains in the database

Instead of requiring the users of this extension to manage the list of allowed
domains, from which the users can login with Google, in an array in the Local-
Settings.php file, this change implements to store this list in the database
in a new database table.

To allow different backends for the list of allowed domains, a new interface,
AllowedDomainsStore, is created, which allows different implementations for
the puprose of checking, if a specific domain is allowed or not (no matter where
the list of allowed domains is stored or comes from). There're three 
implementations,
which are inspired by the SiteStore implementations. One for the currently
used global array, one for a list out of the database and one which uses a 
BagOStuff
cache and another AllowedDomainsStore as a backend.

There's currently no api or user interface to manage the list of allowed 
domains,
therefore it has to be done in the database directly. There will be changes in
the future to allow to manage the list through an api and/or through a user
interface. The list, when the database is used, will be cached for up to 1 hour,
so changes will not take effect immediately at the moment.

Bug: T166423
Change-Id: I629534b97b0eddbc195c87b9a86d015c2e07a694
---
M extension.json
A includes/Constants.php
M includes/GoogleLogin.body.php
M includes/GoogleLogin.hooks.php
A includes/ServiceWiring.php
A includes/alloweddomains/AllowedDomainsStore.php
A includes/alloweddomains/ArrayAllowedDomainsStore.php
A includes/alloweddomains/CachedAllowedDomainsStore.php
A includes/alloweddomains/DBAllowedDomainsStore.php
A includes/alloweddomains/MutableAllowedDomainsStore.php
A includes/sql/googlelogin_allowed_domains.sql
11 files changed, 314 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/81/358081/1

diff --git a/extension.json b/extension.json
index 5a0349e..2843a81 100644
--- a/extension.json
+++ b/extension.json
@@ -49,12 +49,17 @@
"GoogleLogin\\Specials\\SpecialManageGoogleLogin": 
"includes/specials/SpecialManageGoogleLogin.php",
"GoogleLogin\\GoogleLoginHooks": 
"includes/GoogleLogin.hooks.php",
"GoogleLogin\\GoogleUser": "includes/GoogleUser.php",
+   "GoogleLogin\\Constants": "includes/Constants.php",
"GoogleLogin\\Auth\\GooglePrimaryAuthenticationProvider": 
"includes/auth/GooglePrimaryAuthenticationProvider.php",
"GoogleLogin\\Auth\\GoogleServerAuthenticationRequest": 
"includes/auth/GoogleServerAuthenticationRequest.php",
"GoogleLogin\\Auth\\GoogleAuthenticationRequest": 
"includes/auth/GoogleAuthenticationRequest.php",
"GoogleLogin\\Auth\\GoogleRemoveAuthenticationRequest": 
"includes/auth/GoogleRemoveAuthenticationRequest.php",
"GoogleLogin\\Auth\\GoogleUserInfoAuthenticationRequest": 
"includes/auth/GoogleUserInfoAuthenticationRequest.php",
"GoogleLogin\\AllowedDomains\\AllowedDomainsStore": 
"includes/alloweddomains/AllowedDomainsStore.php",
+   "GoogleLogin\\AllowedDomains\\MutableAllowedDomainsStore": 
"includes/alloweddomains/MutableAllowedDomainsStore.php",
+   "GoogleLogin\\AllowedDomains\\ArrayAllowedDomainsStore": 
"includes/alloweddomains/ArrayAllowedDomainsStore.php",
+   "GoogleLogin\\AllowedDomains\\DBAllowedDomainsStore": 
"includes/alloweddomains/DBAllowedDomainsStore.php",
+   "GoogleLogin\\AllowedDomains\\CachedAllowedDomainsStore": 
"includes/alloweddomains/CachedAllowedDomainsStore.php",
"GoogleLogin\\AllowedDomains\\EmailDomain": 
"includes/alloweddomains/EmailDomain.php",
"ApiGoogleLoginInfo": "includes/api/ApiGoogleLoginInfo.php"
},
@@ -150,9 +155,13 @@
"GLAppId": "",
"GLAllowedDomains": "",
"GLAllowedDomainsStrict": false,
+   "GLAllowedDomainsDB": false,
"GLAPIKey": "",
"GLEnableEchoEvents": true
},
+   "ServiceWiringFiles": [
+   "includes/ServiceWiring.php"
+   ],
"load_composer_autoloader": true,
"manifest_version": 1
 }
diff --git a/includes/Constants.php b/includes/Constants.php
new file mode 100644
index 000..e9e58d7
--- /dev/null
+++ b/includes/Constants.php
@@ -0,0 +1,14 @@
+get( 'GLAllowedDomains' ) ) ) {
+   /** @var AllowedDomainsStore $allowedDomainsStore */
+   $allowedDomainsStore = MediaWikiServices::getInstance()
+   ->getService( Constants::SERVICE_ALLOWED_DOMAINS_STORE 
);
+ 

[MediaWiki-commits] [Gerrit] mediawiki...GoogleLogin[master]: Move E-Mail host parsing to it's own class

2017-06-09 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358080 )

Change subject: Move E-Mail host parsing to it's own class
..

Move E-Mail host parsing to it's own class

This decouples the methods used for parsing an e-mail address to get the
host part of it from the GoogleLogin class into it's own EmailDomain class.
In the future, it will be easier to change e.g. how the caching is currently
implemented.

Change-Id: Ib0c7eea6b42773d0d0a154598b2ddb804ca2ffe4
---
M extension.json
M includes/GoogleLogin.body.php
A includes/alloweddomains/EmailDomain.php
M includes/auth/GooglePrimaryAuthenticationProvider.php
4 files changed, 180 insertions(+), 136 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/80/358080/1

diff --git a/extension.json b/extension.json
index 7cab228..5a0349e 100644
--- a/extension.json
+++ b/extension.json
@@ -54,6 +54,8 @@
"GoogleLogin\\Auth\\GoogleAuthenticationRequest": 
"includes/auth/GoogleAuthenticationRequest.php",
"GoogleLogin\\Auth\\GoogleRemoveAuthenticationRequest": 
"includes/auth/GoogleRemoveAuthenticationRequest.php",
"GoogleLogin\\Auth\\GoogleUserInfoAuthenticationRequest": 
"includes/auth/GoogleUserInfoAuthenticationRequest.php",
+   "GoogleLogin\\AllowedDomains\\AllowedDomainsStore": 
"includes/alloweddomains/AllowedDomainsStore.php",
+   "GoogleLogin\\AllowedDomains\\EmailDomain": 
"includes/alloweddomains/EmailDomain.php",
"ApiGoogleLoginInfo": "includes/api/ApiGoogleLoginInfo.php"
},
"AuthManagerAutoConfig": {
diff --git a/includes/GoogleLogin.body.php b/includes/GoogleLogin.body.php
index 2e8e4e2..534e6f1 100755
--- a/includes/GoogleLogin.body.php
+++ b/includes/GoogleLogin.body.php
@@ -5,14 +5,13 @@
 use ConfigFactory;
 
 use Google_Client;
+use GoogleLogin\AllowedDomains\EmailDomain;
 
 class GoogleLogin {
/** @var $mGoogleClient Stores an instance of GoogleClient */
private static $mGoogleClient;
/** @var $mConfig Config object created for GoogleLogin extension */
private static $mConfig;
-   /** @var $mHost The Host of E-Mail provided by Google */
-   private static $mHost;
 
/**
 * Returns an prepared instance of Google client to do requests with to 
Google API
@@ -53,9 +52,10 @@
public static function isValidDomain( $mailDomain ) {
$glConfig = self::getGLConfig();
if ( is_array( $glConfig->get( 'GLAllowedDomains' ) ) ) {
+   $domain = new EmailDomain( $mailDomain, $glConfig->get( 
'GLAllowedDomainsStrict' ) );
if (
in_array(
-   self::getHost( $mailDomain ),
+   $domain->getHost(),
$glConfig->get( 'GLAllowedDomains' )
)
) {
@@ -64,132 +64,5 @@
return false;
}
return true;
-   }
-
-   /**
-* Returns the domain and tld (without subdomains) of the provided 
E-Mailadress
-* @param string $domain The domain part of the email address to 
extract from.
-* @return string The Tld and domain of $domain without subdomains
-* @see 
http://www.programmierer-forum.de/domainnamen-ermitteln-t244185.htm
-*/
-   public static function getHost( $domain = '' ) {
-   $glConfig = self::getGLConfig();
-   if ( !empty( self::$mHost ) ) {
-   return self::$mHost;
-   }
-   $dir = __DIR__ . "/..";
-   if ( $glConfig->get( 'GLAllowedDomainsStrict' ) ) {
-   $domain = explode( '@', $domain );
-   // we can trust google to give us only valid email 
address, so give the last element
-   self::$mHost = array_pop( $domain );
-   return self::$mHost;
-   }
-   // for parse_url()
-   $domain =
-   !isset( $domain[5] ) ||
-   (
-   $domain[3] != ':' &&
-   $domain[4] != ':' &&
-   $domain[5] != ':'
-   ) ? 'http://' . $domain : $domain;
-   // remove "/path/file.html", "/:80", etc.
-   $domain = parse_url( $domain, PHP_URL_HOST );
-   // separate domain level
-   $lvl = explode( '.', $domain ); // 0 => www, 1 => example, 2 => 
co, 3 => uk
-   // set levels
-   krsort( $lvl ); // 3 => uk, 2 => co, 1 => example, 0 => www
-   $lvl = array_values( $lvl ); // 0 => uk, 1 => co, 2 => 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Code cleanup

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

Change subject: Code cleanup
..


Code cleanup

- Remove deprecated method which is no longer used.
  It is not needed to deprecate it for scripts which isn't derived anywhere.

Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
---
M scripts/checkimages.py
1 file changed, 1 insertion(+), 9 deletions(-)

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



diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 10f6599..7b22ade 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -102,7 +102,7 @@
 
 from pywikibot.exceptions import ArgumentDeprecationWarning, NotEmailableError
 from pywikibot.family import Family
-from pywikibot.tools import deprecated, issue_deprecation_warning, StringTypes
+from pywikibot.tools import issue_deprecation_warning
 
 ###
 # <--- Change only below! --->#
@@ -828,14 +828,6 @@
 # find the oldest image
 sec, image = max(listGiven, key=lambda element: element[0])
 return image
-
-@deprecated('Page.revision_count()')
-def countEdits(self, pagename, userlist):
-"""Function to count the edit of a user or a list of users in a 
page."""
-if isinstance(userlist, StringTypes):
-userlist = [userlist]
-page = pywikibot.Page(self.site, pagename)
-return page.revision_count(userlist)
 
 def checkImageOnCommons(self):
 """Checking if the file is on commons."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51c6492eef82af9f68b730d941797ad7f148d079
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Dashiki[master]: Fix warning thrown when api gets Dashiki pages

2017-06-09 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358079 )

Change subject: Fix warning thrown when api gets Dashiki pages
..

Fix warning thrown when api gets Dashiki pages

Bug: T166335
Change-Id: Id1d7317607b63210a7720ec1df9e895de23b9d37
---
M extension.json
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Dashiki 
refs/changes/79/358079/1

diff --git a/extension.json b/extension.json
index e1745a1..f13dce2 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,8 @@
},
"JsonConfigModels": {
"JsonConfig.Dashiki": {
-   "view": "Dashiki\\DashikiView"
+   "view": "Dashiki\\DashikiView",
+   "class": "JsonConfig\\JCObjContent"
}
},
"JsonConfigs": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1d7317607b63210a7720ec1df9e895de23b9d37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Dashiki
Gerrit-Branch: master
Gerrit-Owner: Milimetric 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Setup CI for MinervaNeue skin

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

Change subject: Setup CI for MinervaNeue skin
..


Setup CI for MinervaNeue skin

* Reflect MobileFrontend two way dependency
** Note in future we hope to break this, but that's a bug
for another time
* Run all the same jobs

Bug: T166750
Change-Id: I0fb3bf52e012ad3b466066fcf4e6bdd51507bbae
---
M zuul/layout.yaml
M zuul/parameter_functions.py
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4340749..c105200 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1780,6 +1780,11 @@
  - name: mwgate-composer
  - name: mwgate-npm
  - name: skin-tests
+ - name: mwgate-rake
+ - name: extension-selenium
+postmerge:
+ - mwext-jsduck-publish
+ - mwext-doxygen-publish
 
   - name: mediawiki/skins/Modern
 template:
diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 607b933..b3864c4 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -124,6 +124,7 @@
 dependencies = {
 # Skins are listed first to highlight the skin dependencies
 'skins/BlueSpiceSkin': ['BlueSpiceFoundation'],
+'skins/MinervaNeue': ['MobileFrontend'],
 
 # Extensions
 # One can add a skin by using: 'skin/X'
@@ -178,7 +179,8 @@
 'Math': ['VisualEditor', 'Wikidata'],
 'MathSearch': ['Math'],
 'MobileApp': ['Echo', 'MobileFrontend', 'VisualEditor'],
-'MobileFrontend': ['Echo', 'VisualEditor', 'ZeroBanner', 'MobileApp'],
+'MobileFrontend': ['Echo', 'VisualEditor', 'ZeroBanner', 'MobileApp',
+   'skins/MinervaNeue'],
 'NamespacePopups': ['PagePopups'],
 'NavigationTiming': ['EventLogging'],
 'NSFileRepo': ['Lockdown'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fb3bf52e012ad3b466066fcf4e6bdd51507bbae
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Extract rendering/parsing mediawiki responses into separate ...

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

Change subject: Extract rendering/parsing mediawiki responses into separate 
class
..


Extract rendering/parsing mediawiki responses into separate class

Page Previews should be able to consume HTML response generated by
MediaWiki. First we need to move out plain text crunching from
renderer.js and model.js. Mediawiki and Restbase gateways will have
to parse/htmlize plaintext into nice HTML by themselves.

Bug: T165018
Change-Id: I5d7e9f610bb809aa9fb035a4a9f96e9e8796c9d8
---
M resources/dist/index.js
M resources/dist/index.js.map
A src/formatter.js
M src/gateway/mediawiki.js
M src/gateway/rest.js
M src/preview/model.js
M src/renderer.js
A tests/node-qunit/formatter.test.js
M tests/node-qunit/gateway/mediawiki.test.js
M tests/node-qunit/gateway/rest.test.js
M tests/node-qunit/preview/model.test.js
M tests/node-qunit/renderer.js
12 files changed, 274 insertions(+), 223 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d7e9f610bb809aa9fb035a4a9f96e9e8796c9d8
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Pmiazga 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: designate.conf: Raise query a few more query limits.

2017-06-09 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358078 )

Change subject: designate.conf:  Raise query a few more query limits.
..


designate.conf:  Raise query a few more query limits.

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

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



diff --git a/modules/openstack/templates/liberty/designate/designate.conf.erb 
b/modules/openstack/templates/liberty/designate/designate.conf.erb
index cfca2f3..ae104d3 100644
--- a/modules/openstack/templates/liberty/designate/designate.conf.erb
+++ b/modules/openstack/templates/liberty/designate/designate.conf.erb
@@ -39,7 +39,7 @@
 quota_zone_recordsets = 1
 quota_zone_records = 1
 quota_recordset_records = 20
-quota_api_export_size = 1000
+quota_api_export_size = 1
 
 # These are used in Liberty but are (I think) deprecated in future versions.
 quota_domain_records = 1
@@ -122,7 +122,7 @@
 
 # Default per-page limit for the Admin API, a value of None means show all 
results
 # by default.  We need to override because the default is a miserly '20'
-default_limit_admin = 1000
+default_limit_admin = 1
 
 # Max page size in the Admin API
 #max_limit_admin = 1000

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: designate.conf: Raise query a few more query limits.

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

Change subject: designate.conf:  Raise query a few more query limits.
..

designate.conf:  Raise query a few more query limits.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/358078/1

diff --git a/modules/openstack/templates/liberty/designate/designate.conf.erb 
b/modules/openstack/templates/liberty/designate/designate.conf.erb
index cfca2f3..ae104d3 100644
--- a/modules/openstack/templates/liberty/designate/designate.conf.erb
+++ b/modules/openstack/templates/liberty/designate/designate.conf.erb
@@ -39,7 +39,7 @@
 quota_zone_recordsets = 1
 quota_zone_records = 1
 quota_recordset_records = 20
-quota_api_export_size = 1000
+quota_api_export_size = 1
 
 # These are used in Liberty but are (I think) deprecated in future versions.
 quota_domain_records = 1
@@ -122,7 +122,7 @@
 
 # Default per-page limit for the Admin API, a value of None means show all 
results
 # by default.  We need to override because the default is a miserly '20'
-default_limit_admin = 1000
+default_limit_admin = 1
 
 # Max page size in the Admin API
 #max_limit_admin = 1000

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Revert "Dump should return decrypted votes"

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

Change subject: Revert "Dump should return decrypted votes"
..


Revert "Dump should return decrypted votes"

For large elections the decryption takes too long (same reason tally page 
doesn't work) and prohibits use of the dump page because of timeout. 

This reverts commit d2eac8c31231136e8df57a30f88ff75d7231f102.

Change-Id: Ic0c145ac87074fe7c38331d6a5add690546e20b6
---
M includes/pages/DumpPage.php
1 file changed, 1 insertion(+), 16 deletions(-)

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



diff --git a/includes/pages/DumpPage.php b/includes/pages/DumpPage.php
index 5b0261c..71cb1ef 100644
--- a/includes/pages/DumpPage.php
+++ b/includes/pages/DumpPage.php
@@ -58,22 +58,7 @@
if ( !$this->headersSent ) {
$this->sendHeaders();
}
-   $record = $row->vote_record;
-   if ( $this->election->getCrypt() ) {
-   $status = $this->election->getCrypt()->decrypt( $record 
);
-   if ( !$status->isOK() ) {
-   // Decrypt failed, e.g. invalid or absent 
private key
-   // Still, return the encrypted vote
-   echo "\n" . $record . 
"\n\n";
-   } else {
-   $decrypted_record = $status->value;
-   echo "\n" . $record .
-   "\n" . 
$decrypted_record .
-   "\n\n";
-   }
-   } else {
-   echo "\n" . $record . 
"\n\n";
-   }
+   echo "" . $row->vote_record . "\n";
}
 
public function sendHeaders() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0c145ac87074fe7c38331d6a5add690546e20b6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Jalexander 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax

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

Change subject: Use short array syntax
..


Use short array syntax

Done by phpcbf over composer fix

Change-Id: I6ba21315abbe586ce4237be991daade483b259a4
---
M SecurePoll.i18n.php
M api/ApiStrikeVote.php
M includes/crypt/Crypt.php
M includes/entities/Election.php
M includes/entities/Entity.php
M includes/entities/Option.php
M includes/entities/Question.php
M includes/htmlform/HTMLFormRadioRangeColumnLabels.php
M includes/jobs/PopulateVoterListJob.php
M includes/main/Context.php
M includes/main/SecurePollContentHandler.php
M includes/main/SpecialSecurePoll.php
M includes/main/Store.php
M phpcs.xml
14 files changed, 247 insertions(+), 248 deletions(-)

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



diff --git a/SecurePoll.i18n.php b/SecurePoll.i18n.php
index e2af401..b627ebd 100644
--- a/SecurePoll.i18n.php
+++ b/SecurePoll.i18n.php
@@ -10,10 +10,10 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShim310d2110c88636f7' ) ) {
function wfJsonI18nShim310d2110c88636f7( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
$fileName = __DIR__ . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
diff --git a/api/ApiStrikeVote.php b/api/ApiStrikeVote.php
index efd9046..7e6cefc 100644
--- a/api/ApiStrikeVote.php
+++ b/api/ApiStrikeVote.php
@@ -44,7 +44,7 @@
// if not logged in: fail
$user = $this->getUser();
if ( !$user->isLoggedIn() ) {
-   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError(

'apierror-securepoll-mustbeloggedin-strikevote', 'notloggedin'
);
@@ -61,16 +61,16 @@
$db = $context->getDB();
$table = $db->tableName( 'securepoll_elections' );
$row = $db->selectRow(
-   array( 'securepoll_votes', 'securepoll_elections' ),
+   [ 'securepoll_votes', 'securepoll_elections' ],
"$table.*",
-   array( 'vote_id' => $voteid, 'vote_election=el_entity' 
),
+   [ 'vote_id' => $voteid, 'vote_election=el_entity' ],
__METHOD__
);
 
// if no vote: fail
if ( !$row ) {
-   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
-   $this->dieWithError( array( 
'apierror-securepoll-badvoteid', $voteid ), 'novote' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( [ 
'apierror-securepoll-badvoteid', $voteid ], 'novote' );
} else {
$this->dieUsage( "$voteid is not a valid vote 
id.", 'novote' );
}
@@ -81,7 +81,7 @@
$subpage->election = $context->newElectionFromRow( $row );
$status = $subpage->strike( $option, $voteid, $reason );
 
-   $result = array();
+   $result = [];
if ( $status->isGood() ) {
$result['status'] = 'good';
} else {
@@ -103,32 +103,32 @@
}
 
public function getAllowedParams() {
-   return array(
-   'option' => array(
-   ApiBase::PARAM_TYPE => array(
+   return [
+   'option' => [
+   ApiBase::PARAM_TYPE => [
'strike',
'unstrike'
-   ),
+   ],
ApiBase::PARAM_REQUIRED => true,
-   ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
-   ),
-   'reason' => array(
+   ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
+   ],
+   'reason' => [
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true,
-   ),
-   'voteid' => array(
+   ],
+   'voteid' => [
   

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/*

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

Change subject: Use short array syntax - includes/*
..


Use short array syntax - includes/*

Done by phpcbf over composer fix

Change-Id: I257c0ac219c570263017f891359628be42b7cee9
---
M includes/ballots/ApprovalBallot.php
M includes/ballots/Ballot.php
M includes/ballots/ChooseBallot.php
M includes/ballots/PreferentialBallot.php
M includes/ballots/RadioRangeBallot.php
M includes/ballots/RadioRangeCommentBallot.php
M includes/talliers/CommentDumper.php
M includes/talliers/ElectionTallier.php
M includes/talliers/HistogramRangeTallier.php
M includes/talliers/PairwiseTallier.php
M includes/talliers/PluralityTallier.php
M includes/talliers/SchulzeTallier.php
M includes/talliers/Tallier.php
M includes/user/Auth.php
M includes/user/Voter.php
15 files changed, 186 insertions(+), 186 deletions(-)

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



diff --git a/includes/ballots/ApprovalBallot.php 
b/includes/ballots/ApprovalBallot.php
index eb93a2e..b33ea39 100644
--- a/includes/ballots/ApprovalBallot.php
+++ b/includes/ballots/ApprovalBallot.php
@@ -5,7 +5,7 @@
  */
 class SecurePoll_ApprovalBallot extends SecurePoll_Ballot {
static function getTallyTypes() {
-   return array( 'plurality' );
+   return [ 'plurality' ];
}
 
/**
@@ -24,9 +24,9 @@
$oldValue = $wgRequest->getBool( $inputId );
$s .=
'' .
-   Xml::check( $inputId, $oldValue, array( 'id' => 
$inputId ) ) .
+   Xml::check( $inputId, $oldValue, [ 'id' => 
$inputId ] ) .
'' .
-   Xml::tags( 'label', array( 'for' => $inputId ), 
$optionHTML ) .
+   Xml::tags( 'label', [ 'for' => $inputId ], 
$optionHTML ) .
'' .
"\n";
}
@@ -53,7 +53,7 @@
}
 
function unpackRecord( $record ) {
-   $scores = array();
+   $scores = [];
$itemLength = 2 * 8 + 7;
for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-([yn])--/A',
@@ -70,8 +70,8 @@
return $scores;
}
 
-   function convertScores( $scores, $params = array() ) {
-   $result = array();
+   function convertScores( $scores, $params = [] ) {
+   $result = [];
foreach ( $this->election->getQuestions() as $question ) {
$qid = $question->getId();
if ( !isset( $scores[$qid] ) ) {
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 2a65f12..2e4e321 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -6,13 +6,13 @@
 abstract class SecurePoll_Ballot {
public $election, $context;
 
-   private static $ballotTypes = array(
+   private static $ballotTypes = [
'approval' => 'SecurePoll_ApprovalBallot',
'preferential' => 'SecurePoll_PreferentialBallot',
'choose' => 'SecurePoll_ChooseBallot',
'radio-range' => 'SecurePoll_RadioRangeBallot',
'radio-range-comment' => 'SecurePoll_RadioRangeCommentBallot',
-   );
+   ];
 
/**
 * Get a list of names of tallying methods, which may be used to 
produce a
@@ -36,24 +36,24 @@
 * @return array
 */
static function getCreateDescriptors() {
-   return array(
-   'election' => array(
-   'shuffle-questions' => array(
+   return [
+   'election' => [
+   'shuffle-questions' => [
'label-message' => 
'securepoll-create-label-shuffle_questions',
'type' => 'check',
'hidelabel' => true,
'SecurePoll_type' => 'property',
-   ),
-   'shuffle-options' => array(
+   ],
+   'shuffle-options' => [
'label-message' => 
'securepoll-create-label-shuffle_options',
'type' => 'check',
'hidelabel' => true,
'SecurePoll_type' => 'property',
-   ),
-   ),
-   'question' => array(),
-   

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/pages

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

Change subject: Use short array syntax - includes/pages
..


Use short array syntax - includes/pages

Done by phpcbf over composer fix

Change-Id: I17aa9005f8b2cf4fcd8c2455dcb9b3c017c1
---
M includes/pages/ActionPage.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
11 files changed, 444 insertions(+), 444 deletions(-)

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



diff --git a/includes/pages/ActionPage.php b/includes/pages/ActionPage.php
index 5cf05b0..a7227dd 100644
--- a/includes/pages/ActionPage.php
+++ b/includes/pages/ActionPage.php
@@ -45,7 +45,7 @@
}
 
$languages = array_merge(
-   array( $userLang ),
+   [ $userLang ],
Language::getFallbacksFor( $userLang ) );
 
if ( !in_array( $election->getLanguage(), $languages ) ) {
@@ -61,6 +61,6 @@
 * Relay for SpecialPage::msg
 */
protected function msg( /* args */ ) {
-   return call_user_func_array( array( $this->specialPage, 'msg' 
), func_get_args() );
+   return call_user_func_array( [ $this->specialPage, 'msg' ], 
func_get_args() );
}
 }
diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php
index d7b638c..2e44e02 100644
--- a/includes/pages/CreatePage.php
+++ b/includes/pages/CreatePage.php
@@ -66,38 +66,38 @@
 
# These are for injecting raw HTML into the HTMLForm for the
# multi-column aspects of the designed layout.
-   $layoutTableStart = array(
+   $layoutTableStart = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableMid = array(
+   ];
+   $layoutTableMid = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableEnd = array(
+   ];
+   $layoutTableEnd = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
+   ];
 
-   $formItems = array();
+   $formItems = [];
 
-   $formItems['election_id'] = array(
+   $formItems['election_id'] = [
'type' => 'hidden',
'default' => -1,
'output-as-default' => false,
-   );
+   ];
 
-   $formItems['election_title'] = array(
+   $formItems['election_title'] = [
'label-message' => 
'securepoll-create-label-election_title',
'type' => 'text',
'required' => true,
-   );
+   ];
 
$wikiNames = SecurePoll_FormStore::getWikiList();
-   $options = array();
+   $options = [];
$options['securepoll-create-option-wiki-this_wiki'] = 
wfWikiID();
if ( count( $wikiNames ) > 1 ) {
$options['securepoll-create-option-wiki-all_wikis'] = 
'*';
@@ -112,7 +112,7 @@
// Only option is wfWikiID(), so don't bother making 
the user select it.
} elseif ( count( $wikiNames ) < 10 ) {
// So few, we may as well just list them explicitly
-   $opts = array();
+   $opts = [];
foreach ( $options as $msg => $value ) {
$opts[$this->msg( $msg )->plain()] = $value;
}
@@ -124,165 +124,165 @@
$opts[$this->msg( 
'securepoll-create-option-wiki-other_wiki' )->plain()] =
$wikiNames;
}
-   $formItems['property_wiki'] = array(
+   $formItems['property_wiki'] = [
'type' => 'select',
'options' => $opts,
'label-message' => 
'securepoll-create-label-wiki',
-   );
+   ];
} else {
$options['securepoll-create-option-wiki-other_wiki'] = 
'other';
-   $formItems['property_wiki'] = array(
+  

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - cli

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

Change subject: Use short array syntax - cli
..


Use short array syntax - cli

Done by phpcbf over composer fix

Change-Id: Idd3caa4eaf982d8bd21afc3c0e8766fe390021ba
---
M cli/convertVotes.php
M cli/delete.php
M cli/dump.php
M cli/dumpComments.php
M cli/dumpVoteCsv.php
M cli/import.php
M cli/makeSimpleList.php
M cli/purgePrivateVoteData.php
M cli/tally.php
M cli/testDebian.php
M cli/voterList.php
M cli/wm-scripts/bv2013/buildSpamTranslations.php
M cli/wm-scripts/bv2013/doSpam.php
M cli/wm-scripts/bv2013/dumpMetaTranslations.php
M cli/wm-scripts/bv2013/populateEditCount.php
M cli/wm-scripts/bv2013/sendMails.php
M cli/wm-scripts/bv2013/voterList.php
M cli/wm-scripts/bv2015/doSpam.php
M cli/wm-scripts/bv2015/populateEditCount-fixup.php
M cli/wm-scripts/bv2015/populateEditCount.php
M cli/wm-scripts/bv2015/voterList.php
M cli/wm-scripts/bv2017/doSpam.php
M cli/wm-scripts/bv2017/populateEditCount.php
M cli/wm-scripts/bv2017/voterList.php
M cli/wm-scripts/dumpGlobalVoterList.php
25 files changed, 282 insertions(+), 282 deletions(-)

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



diff --git a/cli/convertVotes.php b/cli/convertVotes.php
index ed9c385..b69198d 100644
--- a/cli/convertVotes.php
+++ b/cli/convertVotes.php
@@ -57,12 +57,12 @@
}
 
function convert( $electionId ) {
-   $this->votes = array();
+   $this->votes = [];
$this->crypt = $this->election->getCrypt();
$this->ballot = $this->election->getBallot();
 
$status = $this->context->getStore()->callbackValidVotes(
-   $electionId, array( $this, 'convertVote' ) );
+   $electionId, [ $this, 'convertVote' ] );
if ( !$status->isOK() ) {
spFatal( "Error: " . $status->getWikiText() );
}
@@ -72,7 +72,7 @@
$s .= str_repeat( '-', 80 ) . "\n\n";
}
$s .= $question->getMessage( 'text' ) . "\n";
-   $names = array();
+   $names = [];
foreach ( $question->getOptions() as $option ) {
$names[$option->getId()] = $option->getMessage( 
'text' );
}
diff --git a/cli/delete.php b/cli/delete.php
index 17443ed..60ae029 100644
--- a/cli/delete.php
+++ b/cli/delete.php
@@ -29,8 +29,8 @@
$dbw = wfGetDB( DB_MASTER );
 
$type = $dbw->selectField( 'securepoll_entity', 'en_type',
-   array( 'en_id' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
+   [ 'en_id' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
if ( !$type ) {
echo "The specified id does not exist.\n";
return false;
@@ -41,37 +41,37 @@
}
 
# Get a list of entity IDs and lock them
-   $questionIds = array();
-   $res = $dbw->select( 'securepoll_questions', array( 'qu_entity' ),
-   array( 'qu_election' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
+   $questionIds = [];
+   $res = $dbw->select( 'securepoll_questions', [ 'qu_entity' ],
+   [ 'qu_election' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
foreach ( $res as $row ) {
$questionIds[] = $row->qu_entity;
}
 
-   $res = $dbw->select( 'securepoll_options', array( 'op_entity' ),
-   array( 'op_election' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
-   $optionIds = array();
+   $res = $dbw->select( 'securepoll_options', [ 'op_entity' ],
+   [ 'op_election' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
+   $optionIds = [];
foreach ( $res as $row ) {
$optionIds[] = $row->op_entity;
}
 
-   $entityIds = array_merge( $optionIds, $questionIds, array( $electionId 
) );
+   $entityIds = array_merge( $optionIds, $questionIds, [ $electionId ] );
 
# Delete the messages and properties
-   $dbw->delete( 'securepoll_msgs', array( 'msg_entity' => $entityIds ) );
-   $dbw->delete( 'securepoll_properties', array( 'pr_entity' => $entityIds 
) );
+   $dbw->delete( 'securepoll_msgs', [ 'msg_entity' => $entityIds ] );
+   $dbw->delete( 'securepoll_properties', [ 'pr_entity' => $entityIds ] );
 
# Delete the entities
if ( $optionIds ) {
-   $dbw->delete( 'securepoll_options', array( 'op_entity' => 
$optionIds ), __METHOD__ );
+   $dbw->delete( 'securepoll_options', [ 'op_entity' => $optionIds 
], __METHOD__ );
}
if ( $questionIds ) {
-   $dbw->delete( 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add code of conduct file to the repo

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

Change subject: Add code of conduct file to the repo
..

Add code of conduct file to the repo

Change-Id: If08ccba1d423787922f471455b6b40e78fec2fc9
---
A CODE_OF_CONDUCT.md
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000..d8e5d08
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax in alias file

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

Change subject: Use short array syntax in alias file
..


Use short array syntax in alias file

Done by phpcbf over composer fix

Change-Id: Icef22be9cfe8b5a4711d0f2dec3bd52a27959ed7
---
M SecurePoll.alias.php
M SecurePoll.namespaces.php
2 files changed, 148 insertions(+), 149 deletions(-)

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



diff --git a/SecurePoll.alias.php b/SecurePoll.alias.php
index e765c26..33b1b38 100644
--- a/SecurePoll.alias.php
+++ b/SecurePoll.alias.php
@@ -5,246 +5,245 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'SecurePoll' => array( 'SecurePoll' ),
-);
+$specialPageAliases['en'] = [
+   'SecurePoll' => [ 'SecurePoll' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'SecurePoll' => array( 'اقتراع_آمن' ),
-);
+$specialPageAliases['ar'] = [
+   'SecurePoll' => [ 'اقتراع_آمن' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'SecurePoll' => array( 'استطلاع_رأى_امان' ),
-);
+$specialPageAliases['arz'] = [
+   'SecurePoll' => [ 'استطلاع_رأى_امان' ],
+];
 
 /** Avaric (авар) */
-$specialPageAliases['av'] = array(
-   'SecurePoll' => array( 'Защищённое_голосование' ),
-);
+$specialPageAliases['av'] = [
+   'SecurePoll' => [ 'Защищённое_голосование' ],
+];
 
 /** Bashkir (башҡортса) */
-$specialPageAliases['ba'] = array(
-   'SecurePoll' => array( 'SecurePoll' ),
-);
+$specialPageAliases['ba'] = [
+   'SecurePoll' => [ 'SecurePoll' ],
+];
 
 /** Western Balochi (بلوچی رخشانی) */
-$specialPageAliases['bgn'] = array(
-   'SecurePoll' => array( 'ایمنین_رای_گیره_گ' ),
-);
+$specialPageAliases['bgn'] = [
+   'SecurePoll' => [ 'ایمنین_رای_گیره_گ' ],
+];
 
 /** Bengali (বাংলা) */
-$specialPageAliases['bn'] = array(
-   'SecurePoll' => array( 'সিকিউর_পোল' ),
-);
+$specialPageAliases['bn'] = [
+   'SecurePoll' => [ 'সিকিউর_পোল' ],
+];
 
 /** Chechen (нохчийн) */
-$specialPageAliases['ce'] = array(
-   'SecurePoll' => array( 'Лардина_кхаж_тасар' ),
-);
+$specialPageAliases['ce'] = [
+   'SecurePoll' => [ 'Лардина_кхаж_тасар' ],
+];
 
 /** Czech (čeština) */
-$specialPageAliases['cs'] = array(
-   'SecurePoll' => array( 'Bezpečné_hlasování' ),
-);
+$specialPageAliases['cs'] = [
+   'SecurePoll' => [ 'Bezpečné_hlasování' ],
+];
 
 /** Danish (dansk) */
-$specialPageAliases['da'] = array(
-   'SecurePoll' => array( 'Sikker_afstemning' ),
-);
+$specialPageAliases['da'] = [
+   'SecurePoll' => [ 'Sikker_afstemning' ],
+];
 
 /** German (Deutsch) */
-$specialPageAliases['de'] = array(
-   'SecurePoll' => array( 'Sichere_Abstimmung' ),
-);
+$specialPageAliases['de'] = [
+   'SecurePoll' => [ 'Sichere_Abstimmung' ],
+];
 
 /** Zazaki (Zazaki) */
-$specialPageAliases['diq'] = array(
-   'SecurePoll' => array( 'Dolaİtimadi' ),
-);
+$specialPageAliases['diq'] = [
+   'SecurePoll' => [ 'Dolaİtimadi' ],
+];
 
 /** Lower Sorbian (dolnoserbski) */
-$specialPageAliases['dsb'] = array(
-   'SecurePoll' => array( 'Wěste wótgłosowanje' ),
-);
+$specialPageAliases['dsb'] = [
+   'SecurePoll' => [ 'Wěste wótgłosowanje' ],
+];
 
 /** Estonian (eesti) */
-$specialPageAliases['et'] = array(
-   'SecurePoll' => array( 'Turvaline_hääletus' ),
-);
+$specialPageAliases['et'] = [
+   'SecurePoll' => [ 'Turvaline_hääletus' ],
+];
 
 /** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-   'SecurePoll' => array( 'نظرسنجی_امن', 'رأی‌گیری_ایمن' ),
-);
+$specialPageAliases['fa'] = [
+   'SecurePoll' => [ 'نظرسنجی_امن', 'رأی‌گیری_ایمن' ],
+];
 
 /** Finnish (suomi) */
-$specialPageAliases['fi'] = array(
-   'SecurePoll' => array( 'Suojattu_kysely' ),
-);
+$specialPageAliases['fi'] = [
+   'SecurePoll' => [ 'Suojattu_kysely' ],
+];
 
 /** French (français) */
-$specialPageAliases['fr'] = array(
-   'SecurePoll' => array( 'Vote_sécurisé' ),
-);
+$specialPageAliases['fr'] = [
+   'SecurePoll' => [ 'Vote_sécurisé' ],
+];
 
 /** Arpitan (arpetan) */
-$specialPageAliases['frp'] = array(
-   'SecurePoll' => array( 'Voto_sècurisâ', 'VotoSècurisâ' ),
-);
+$specialPageAliases['frp'] = [
+   'SecurePoll' => [ 'Voto_sècurisâ', 'VotoSècurisâ' ],
+];
 
 /** Galician (galego) */
-$specialPageAliases['gl'] = array(
-   'SecurePoll' => array( 'Enquisa_segura' ),
-);
+$specialPageAliases['gl'] = [
+   'SecurePoll' => [ 'Enquisa_segura' ],
+];
 
 /** Swiss German (Alemannisch) */
-$specialPageAliases['gsw'] = array(
-   'SecurePoll' => array( 'Sicheri_Abstimmig' ),
-);
+$specialPageAliases['gsw'] = [
+   'SecurePoll' => [ 'Sicheri_Abstimmig' ],
+];
 
 /** Hebrew (עברית) */

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Add phpcs and make pass

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

Change subject: Add phpcs and make pass
..


Add phpcs and make pass

Change-Id: Iccc25342734d12928b98d49e7dae02d64136607c
---
M auth-api.php
M composer.json
M includes/SecurePollHooks.php
M includes/crypt/Crypt.php
M includes/entities/Election.php
M includes/main/Context.php
M includes/main/SpecialSecurePoll.php
M includes/main/Store.php
M includes/user/Auth.php
M includes/user/Voter.php
A phpcs.xml
11 files changed, 66 insertions(+), 22 deletions(-)

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



diff --git a/auth-api.php b/auth-api.php
index ef06d1e..8e4fe0a 100644
--- a/auth-api.php
+++ b/auth-api.php
@@ -9,7 +9,7 @@
 }
 chdir( $IP );
 
-require( "$IP/includes/WebStart.php" );
+require "$IP/includes/WebStart.php";
 
 if ( !class_exists( 'SecurePoll_RemoteMWAuth' ) ) {
header( 'HTTP/1.1 500 Internal Server Error' );
@@ -40,4 +40,3 @@
 $auth = $context->newAuth( 'local' );
 $status = Status::newGood( $auth->getUserParams( $user ) );
 echo serialize( $status );
-
diff --git a/composer.json b/composer.json
index 686b65b..b8f68fb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,14 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
+   "fix": "phpcbf",
"test": [
-   "parallel-lint . --exclude vendor"
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
]
}
 }
diff --git a/includes/SecurePollHooks.php b/includes/SecurePollHooks.php
index adb2275..204aad0 100644
--- a/includes/SecurePollHooks.php
+++ b/includes/SecurePollHooks.php
@@ -79,7 +79,7 @@
 */
public static function onContentHandlerDefaultModelFor( $title, &$model 
) {
global $wgSecurePollUseNamespace;
-   if( $wgSecurePollUseNamespace && $title->getNamespace() == 
NS_SECUREPOLL ) {
+   if ( $wgSecurePollUseNamespace && $title->getNamespace() == 
NS_SECUREPOLL ) {
$model = 'SecurePoll';
return false;
}
diff --git a/includes/crypt/Crypt.php b/includes/crypt/Crypt.php
index 7d36b00..7734665 100644
--- a/includes/crypt/Crypt.php
+++ b/includes/crypt/Crypt.php
@@ -244,7 +244,9 @@
if ( !$dir ) {
return;
}
+   // @codingStandardsIgnoreStart
while ( false !== ( $file = readdir( $dir ) ) ) {
+   // @codingStandardsIgnoreEnd
if ( $file == '.' || $file == '..' ) {
continue;
}
diff --git a/includes/entities/Election.php b/includes/entities/Election.php
index 89a3b0c..08cb5a2 100644
--- a/includes/entities/Election.php
+++ b/includes/entities/Election.php
@@ -127,12 +127,16 @@
/**
 * Get the start date in MW internal form.
 */
-   function getStartDate() { return $this->startDate; }
+   function getStartDate() {
+   return $this->startDate;
+   }
 
/**
 * Get the end date in MW internal form.
 */
-   function getEndDate() { return $this->endDate; }
+   function getEndDate() {
+   return $this->endDate;
+   }
 
/**
 * Returns true if the election has started.
@@ -194,7 +198,7 @@
$edits = isset( $props['edit-count'] ) ? 
$props['edit-count'] : 0;
if ( $minEdits && $edits < $minEdits ) {
$status->fatal( 'securepoll-too-few-edits',
-   $wgLang->formatNum( $minEdits), 
$wgLang->formatNum( $edits ) );
+   $wgLang->formatNum( $minEdits ), 
$wgLang->formatNum( $edits ) );
}
 
// Registration date
diff --git a/includes/main/Context.php b/includes/main/Context.php
index 1d7c3cf..6e50517 100644
--- a/includes/main/Context.php
+++ b/includes/main/Context.php
@@ -109,7 +109,7 @@
 * @return SecurePoll_Election
 */
function getElection( $id ) {
-   if( !isset( $this->electionCache[$id] ) ) {
+   if ( !isset( $this->electionCache[$id] ) ) {
$info = $this->getStore()->getElectionInfo( array( $id 
) );
if ( $info ) {
$this->electionCache[$id] = $this->newElection( 
reset( $info ) );
diff --git a/includes/main/SpecialSecurePoll.php 
b/includes/main/SpecialSecurePoll.php
index 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - includes/*

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

Change subject: Make phpcs pass - includes/*
..


Make phpcs pass - includes/*

Change-Id: I59a78a920ad911ccbfcd322863683b2d8b5e4134
---
M includes/ballots/ApprovalBallot.php
M includes/ballots/Ballot.php
M includes/ballots/ChooseBallot.php
M includes/ballots/PreferentialBallot.php
M includes/ballots/RadioRangeBallot.php
M includes/ballots/RadioRangeCommentBallot.php
M includes/pages/CreatePage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
M includes/talliers/CommentDumper.php
M includes/talliers/SchulzeTallier.php
M includes/talliers/Tallier.php
14 files changed, 32 insertions(+), 42 deletions(-)

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



diff --git a/includes/ballots/ApprovalBallot.php 
b/includes/ballots/ApprovalBallot.php
index ec4c0b1..eb93a2e 100644
--- a/includes/ballots/ApprovalBallot.php
+++ b/includes/ballots/ApprovalBallot.php
@@ -54,11 +54,11 @@
 
function unpackRecord( $record ) {
$scores = array();
-   $itemLength = 2*8 + 7;
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 
$itemLength ) {
+   $itemLength = 2 * 8 + 7;
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-([yn])--/A',
-   $record, $m, 0, $offset ) )
-   {
+   $record, $m, 0, $offset )
+   ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
}
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 10cc35b..2a65f12 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -220,9 +220,8 @@
 * @return false on failure or if cast ballots are hidden, or the output
 * of unpackRecord().
 */
-   function getCurrentVote(){
-
-   if( !$this->election->getOption( 'show-change' ) ){
+   function getCurrentVote() {
+   if ( !$this->election->getOption( 'show-change' ) ) {
return false;
}
 
@@ -247,7 +246,7 @@
array( $this, 'getCurrentVoteCallback' ),
$voter->getId()
);
-   if( !$status->isOK() ){
+   if ( !$status->isOK() ){
return false;
}
 
@@ -256,7 +255,7 @@
: false;
}
 
-   function getCurrentVoteCallback( $store, $record ){
+   function getCurrentVoteCallback( $store, $record ) {
$this->currentVote = $record;
return Status::newGood();
}
diff --git a/includes/ballots/ChooseBallot.php 
b/includes/ballots/ChooseBallot.php
index 9eaa29d..5daec53 100644
--- a/includes/ballots/ChooseBallot.php
+++ b/includes/ballots/ChooseBallot.php
@@ -71,7 +71,7 @@
function unpackRecord( $record ) {
$result = array();
$record = trim( $record );
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 18 ) 
{
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += 18 ) {
if ( !preg_match( '/Q([0-9A-F]{8})A([0-9A-F]{8})/A', 
$record, $m, 0, $offset ) ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
diff --git a/includes/ballots/PreferentialBallot.php 
b/includes/ballots/PreferentialBallot.php
index 3a8e114..cf68f18 100644
--- a/includes/ballots/PreferentialBallot.php
+++ b/includes/ballots/PreferentialBallot.php
@@ -101,10 +101,10 @@
function unpackRecord( $record ) {
$ranks = array();
$itemLength = 3*8 + 7;
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 
$itemLength ) {
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-R([0-9A-F]{8})--/A',
-   $record, $m, 0, $offset ) )
-   {
+   $record, $m, 0, $offset )
+   ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
}
@@ -144,4 +144,3 @@
return $result;
}
 }
-
diff --git a/includes/ballots/RadioRangeBallot.php 
b/includes/ballots/RadioRangeBallot.php
index 0244e50..5f7e739 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - cli

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

Change subject: Make phpcs pass - cli
..


Make phpcs pass - cli

Change-Id: I145da93bcb92b2f2aed9c24bfe9fa33ae8738e28
---
M cli/cli.inc
M cli/convertVotes.php
M cli/delete.php
M cli/dump.php
M cli/dumpComments.php
M cli/dumpVoteCsv.php
M cli/import.php
M cli/makeSimpleList.php
M cli/purgePrivateVoteData.php
M cli/tally.php
M cli/testDebian.php
M cli/voterList.php
M cli/wm-scripts/bv2013/buildSpamTranslations.php
M cli/wm-scripts/bv2013/doSpam.php
M cli/wm-scripts/bv2013/dumpMetaTranslations.php
M cli/wm-scripts/bv2013/populateEditCount.php
M cli/wm-scripts/bv2013/sendMails.php
M cli/wm-scripts/bv2013/voterList.php
M cli/wm-scripts/bv2015/doSpam.php
M cli/wm-scripts/bv2015/populateEditCount-fixup.php
M cli/wm-scripts/bv2015/populateEditCount.php
M cli/wm-scripts/bv2015/voterList.php
M cli/wm-scripts/bv2017/doSpam.php
M cli/wm-scripts/bv2017/populateEditCount.php
M cli/wm-scripts/bv2017/voterList.php
M cli/wm-scripts/dumpGlobalVoterList.php
26 files changed, 42 insertions(+), 65 deletions(-)

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



diff --git a/cli/cli.inc b/cli/cli.inc
index ea3d7f9..3b112bb 100644
--- a/cli/cli.inc
+++ b/cli/cli.inc
@@ -13,4 +13,4 @@
exit( 1 );
 }
 
-require( $IP . '/maintenance/commandLine.inc' );
+require $IP . '/maintenance/commandLine.inc';
diff --git a/cli/convertVotes.php b/cli/convertVotes.php
index 6727dac..ed9c385 100644
--- a/cli/convertVotes.php
+++ b/cli/convertVotes.php
@@ -1,6 +1,6 @@
 convertLocalElection( $options['name'] );
 }
-
 
 class SecurePoll_ConvertVotes {
public $context, $election;
diff --git a/cli/delete.php b/cli/delete.php
index d0d26d2..17443ed 100644
--- a/cli/delete.php
+++ b/cli/delete.php
@@ -1,6 +1,6 @@
 
@@ -82,4 +81,3 @@
}
fwrite( $election->cbdata['outFile'], "" . $row->vote_record . 
"\n" );
 }
-
diff --git a/cli/dumpComments.php b/cli/dumpComments.php
index 71d5270..1ff5999 100644
--- a/cli/dumpComments.php
+++ b/cli/dumpComments.php
@@ -11,7 +11,7 @@
  */
 
 $optionsWithArgs = array( 'name' );
-require( __DIR__.'/cli.inc' );
+require __DIR__ . '/cli.inc';
 
 $wgTitle = Title::newFromText( 'Special:SecurePoll' );
 
@@ -29,7 +29,7 @@
if ( isset( $options['name'] ) ) {
spFatal( "Cannot load from database when SecurePoll is not 
installed" );
}
-   require( __DIR__ . '/../SecurePoll.php' );
+   require __DIR__ . '/../SecurePoll.php';
 }
 
 $context = new SecurePoll_Context;
@@ -55,13 +55,12 @@
 if ( !$status->isOK() ) {
spFatal( "Tally error: " . $status->getWikiText() );
 }
-//$tallier = $status->value;
+// $tallier = $status->value;
 if ( isset( $options['html'] ) ) {
echo $tallier->getHtmlResult();
 } else {
echo $tallier->getTextResult();
 }
-
 
 function spFatal( $message ) {
fwrite( STDERR, rtrim( $message ) . "\n" );
diff --git a/cli/dumpVoteCsv.php b/cli/dumpVoteCsv.php
index 14d7fe2..d019227 100644
--- a/cli/dumpVoteCsv.php
+++ b/cli/dumpVoteCsv.php
@@ -11,7 +11,7 @@
  */
 
 $optionsWithArgs = array( 'name' );
-require( __DIR__.'/cli.inc' );
+require __DIR__ . '/cli.inc';
 
 $wgTitle = Title::newFromText( 'Special:SecurePoll' );
 
@@ -29,7 +29,7 @@
if ( isset( $options['name'] ) ) {
spFatal( "Cannot load from database when SecurePoll is not 
installed" );
}
-   require( __DIR__ . '/../SecurePoll.php' );
+   require __DIR__ . '/../SecurePoll.php';
 }
 
 $context = new SecurePoll_Context;
@@ -55,13 +55,12 @@
 if ( !$status->isOK() ) {
spFatal( "Tally error: " . $status->getWikiText() );
 }
-//$tallier = $status->value;
+// $tallier = $status->value;
 if ( isset( $options['html'] ) ) {
echo $tallier->getHtmlResult();
 } else {
echo $tallier->getTextResult();
 }
-
 
 function spFatal( $message ) {
fwrite( STDERR, rtrim( $message ) . "\n" );
diff --git a/cli/import.php b/cli/import.php
index 92ba7ec..20470c5 100644
--- a/cli/import.php
+++ b/cli/import.php
@@ -1,6 +1,6 @@
 el_entity;
$this->output( "Election '{$row->el_title}' with end 
date '{$row->el_end_date}' " .
"will have data purged\n" );
@@ -92,7 +91,7 @@
 
$setMin = null;
$setMax = null;
-   foreach ( $vRes as $row  ) {
+   foreach ( $vRes as $row ) {
if ( $setMin === null ) {
$setMin = $row->vote_id;
}
@@ -100,7 +99,7 @@
}
$deleteSets[] = array( $setMin, $setMax );
$minVoteId = $setMax;
-   } while( 

[MediaWiki-commits] [Gerrit] mediawiki...Truglass[master]: CSS optimization

2017-06-09 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358076 )

Change subject: CSS optimization
..

CSS optimization

Putting $wgResourceModuleSkinStyles into good use in order to not load
unused CSS on every page. This way e.g. TablePager styles are loaded only
when needed.

Change-Id: I1dcd8ac60e1c5504ddfb667c14fcf38c00cf205f
---
M skin.json
M truglass/main.css
A truglass/mediawiki.action.history.styles.css
A truglass/mediawiki.pager.tablePager.css
4 files changed, 24 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Truglass 
refs/changes/76/358076/1

diff --git a/skin.json b/skin.json
index af740d7..0026da4 100644
--- a/skin.json
+++ b/skin.json
@@ -45,6 +45,8 @@
"ResourceModuleSkinStyles": {
"truglass": {
"+ext.echo.styles.badge": "truglass/echo.badge.css",
+   "+mediawiki.action.history.styles": 
"truglass/mediawiki.action.history.styles.css",
+   "+mediawiki.pager.tablePager": 
"truglass/mediawiki.pager.tablePager.css",
"+mediawiki.special.preferences.styles": 
"truglass/special.preferences.styles.css"
}
},
diff --git a/truglass/main.css b/truglass/main.css
index 834b9eb..d0c783d 100644
--- a/truglass/main.css
+++ b/truglass/main.css
@@ -1597,10 +1597,6 @@
font-style: italic;
 }
 
-span.updatedmarker {
-   color: black;
-   background-color: #0f0;
-}
 span.newpageletter {
font-weight: bold;
color: black;
@@ -1854,29 +1850,6 @@
 table.multipageimage td {
text-align: center;
 }
-
-/*
-  Table pager (e.g. Special:FileList)
-  - remove underlines from the navigation link
-  - collapse borders
-  - set the borders to outsets (similar to Special:Allmessages)
-  - remove line wrapping for all td and th, set background color
-  - restore line wrapping for the last two table cells (description and size)
-*/
-.TablePager_nav a { text-decoration: none; }
-.TablePager { border-collapse: collapse; }
-.TablePager, .TablePager td, .TablePager th {
-   border: 0.15em solid #77;
-   padding: 0 0.15em 0 0.15em;
-}
-.TablePager th { background-color: #ff; }
-.TablePager td { background-color: #ff; }
-.TablePager tr:hover td { background-color: #ff; }
-
-.imagelist td, .imagelist th { white-space: nowrap; }
-.imagelist .TablePager_col_links { background-color: #ff; }
-.imagelist .TablePager_col_img_description { white-space: normal; }
-.imagelist th.TablePager_sort { background-color: #ff; }
 
 .templatesUsed { margin-top: 1.5em; }
 
diff --git a/truglass/mediawiki.action.history.styles.css 
b/truglass/mediawiki.action.history.styles.css
new file mode 100644
index 000..bb7f2a6
--- /dev/null
+++ b/truglass/mediawiki.action.history.styles.css
@@ -0,0 +1,5 @@
+/* "Updated since your last visit" marker on the page history of pages that 
are on your watchlist */
+span.updatedmarker {
+   background-color: #0f0;
+   color: #000;
+}
\ No newline at end of file
diff --git a/truglass/mediawiki.pager.tablePager.css 
b/truglass/mediawiki.pager.tablePager.css
new file mode 100644
index 000..a7173e0
--- /dev/null
+++ b/truglass/mediawiki.pager.tablePager.css
@@ -0,0 +1,17 @@
+/*
+  Table pager (e.g. Special:FileList)
+  - remove underlines from the navigation link
+  - collapse borders
+  - set the borders to outsets (similar to Special:AllMessages)
+  - remove line wrapping for all td and th, set background color
+  - restore line wrapping for the last two table cells (description and size)
+*/
+.TablePager_nav a { text-decoration: none; }
+.TablePager { border-collapse: collapse; }
+.TablePager, .TablePager td, .TablePager th {
+   border: 0.15em solid #77;
+   padding: 0 0.15em 0 0.15em;
+}
+.TablePager th { background-color: #ff; }
+.TablePager td { background-color: #ff; }
+.TablePager tr:hover td { background-color: #ff; }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dcd8ac60e1c5504ddfb667c14fcf38c00cf205f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Truglass
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/*

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358074 )

Change subject: Use short array syntax - includes/*
..

Use short array syntax - includes/*

Done by phpcbf over composer fix

Change-Id: I257c0ac219c570263017f891359628be42b7cee9
---
M includes/ballots/ApprovalBallot.php
M includes/ballots/Ballot.php
M includes/ballots/ChooseBallot.php
M includes/ballots/PreferentialBallot.php
M includes/ballots/RadioRangeBallot.php
M includes/ballots/RadioRangeCommentBallot.php
M includes/talliers/CommentDumper.php
M includes/talliers/ElectionTallier.php
M includes/talliers/HistogramRangeTallier.php
M includes/talliers/PairwiseTallier.php
M includes/talliers/PluralityTallier.php
M includes/talliers/SchulzeTallier.php
M includes/talliers/Tallier.php
M includes/user/Auth.php
M includes/user/Voter.php
15 files changed, 186 insertions(+), 186 deletions(-)


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

diff --git a/includes/ballots/ApprovalBallot.php 
b/includes/ballots/ApprovalBallot.php
index eb93a2e..b33ea39 100644
--- a/includes/ballots/ApprovalBallot.php
+++ b/includes/ballots/ApprovalBallot.php
@@ -5,7 +5,7 @@
  */
 class SecurePoll_ApprovalBallot extends SecurePoll_Ballot {
static function getTallyTypes() {
-   return array( 'plurality' );
+   return [ 'plurality' ];
}
 
/**
@@ -24,9 +24,9 @@
$oldValue = $wgRequest->getBool( $inputId );
$s .=
'' .
-   Xml::check( $inputId, $oldValue, array( 'id' => 
$inputId ) ) .
+   Xml::check( $inputId, $oldValue, [ 'id' => 
$inputId ] ) .
'' .
-   Xml::tags( 'label', array( 'for' => $inputId ), 
$optionHTML ) .
+   Xml::tags( 'label', [ 'for' => $inputId ], 
$optionHTML ) .
'' .
"\n";
}
@@ -53,7 +53,7 @@
}
 
function unpackRecord( $record ) {
-   $scores = array();
+   $scores = [];
$itemLength = 2 * 8 + 7;
for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-([yn])--/A',
@@ -70,8 +70,8 @@
return $scores;
}
 
-   function convertScores( $scores, $params = array() ) {
-   $result = array();
+   function convertScores( $scores, $params = [] ) {
+   $result = [];
foreach ( $this->election->getQuestions() as $question ) {
$qid = $question->getId();
if ( !isset( $scores[$qid] ) ) {
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 2a65f12..2e4e321 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -6,13 +6,13 @@
 abstract class SecurePoll_Ballot {
public $election, $context;
 
-   private static $ballotTypes = array(
+   private static $ballotTypes = [
'approval' => 'SecurePoll_ApprovalBallot',
'preferential' => 'SecurePoll_PreferentialBallot',
'choose' => 'SecurePoll_ChooseBallot',
'radio-range' => 'SecurePoll_RadioRangeBallot',
'radio-range-comment' => 'SecurePoll_RadioRangeCommentBallot',
-   );
+   ];
 
/**
 * Get a list of names of tallying methods, which may be used to 
produce a
@@ -36,24 +36,24 @@
 * @return array
 */
static function getCreateDescriptors() {
-   return array(
-   'election' => array(
-   'shuffle-questions' => array(
+   return [
+   'election' => [
+   'shuffle-questions' => [
'label-message' => 
'securepoll-create-label-shuffle_questions',
'type' => 'check',
'hidelabel' => true,
'SecurePoll_type' => 'property',
-   ),
-   'shuffle-options' => array(
+   ],
+   'shuffle-options' => [
'label-message' => 
'securepoll-create-label-shuffle_options',
'type' => 'check',
'hidelabel' => true,
'SecurePoll_type' => 'property',
-   ),
-   ),
-   'question' => 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - cli

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358072 )

Change subject: Use short array syntax - cli
..

Use short array syntax - cli

Done by phpcbf over composer fix

Change-Id: Idd3caa4eaf982d8bd21afc3c0e8766fe390021ba
---
M cli/convertVotes.php
M cli/delete.php
M cli/dump.php
M cli/dumpComments.php
M cli/dumpVoteCsv.php
M cli/import.php
M cli/makeSimpleList.php
M cli/purgePrivateVoteData.php
M cli/tally.php
M cli/testDebian.php
M cli/voterList.php
M cli/wm-scripts/bv2013/buildSpamTranslations.php
M cli/wm-scripts/bv2013/doSpam.php
M cli/wm-scripts/bv2013/dumpMetaTranslations.php
M cli/wm-scripts/bv2013/populateEditCount.php
M cli/wm-scripts/bv2013/sendMails.php
M cli/wm-scripts/bv2013/voterList.php
M cli/wm-scripts/bv2015/doSpam.php
M cli/wm-scripts/bv2015/populateEditCount-fixup.php
M cli/wm-scripts/bv2015/populateEditCount.php
M cli/wm-scripts/bv2015/voterList.php
M cli/wm-scripts/bv2017/doSpam.php
M cli/wm-scripts/bv2017/populateEditCount.php
M cli/wm-scripts/bv2017/voterList.php
M cli/wm-scripts/dumpGlobalVoterList.php
25 files changed, 282 insertions(+), 282 deletions(-)


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

diff --git a/cli/convertVotes.php b/cli/convertVotes.php
index ed9c385..b69198d 100644
--- a/cli/convertVotes.php
+++ b/cli/convertVotes.php
@@ -57,12 +57,12 @@
}
 
function convert( $electionId ) {
-   $this->votes = array();
+   $this->votes = [];
$this->crypt = $this->election->getCrypt();
$this->ballot = $this->election->getBallot();
 
$status = $this->context->getStore()->callbackValidVotes(
-   $electionId, array( $this, 'convertVote' ) );
+   $electionId, [ $this, 'convertVote' ] );
if ( !$status->isOK() ) {
spFatal( "Error: " . $status->getWikiText() );
}
@@ -72,7 +72,7 @@
$s .= str_repeat( '-', 80 ) . "\n\n";
}
$s .= $question->getMessage( 'text' ) . "\n";
-   $names = array();
+   $names = [];
foreach ( $question->getOptions() as $option ) {
$names[$option->getId()] = $option->getMessage( 
'text' );
}
diff --git a/cli/delete.php b/cli/delete.php
index 17443ed..60ae029 100644
--- a/cli/delete.php
+++ b/cli/delete.php
@@ -29,8 +29,8 @@
$dbw = wfGetDB( DB_MASTER );
 
$type = $dbw->selectField( 'securepoll_entity', 'en_type',
-   array( 'en_id' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
+   [ 'en_id' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
if ( !$type ) {
echo "The specified id does not exist.\n";
return false;
@@ -41,37 +41,37 @@
}
 
# Get a list of entity IDs and lock them
-   $questionIds = array();
-   $res = $dbw->select( 'securepoll_questions', array( 'qu_entity' ),
-   array( 'qu_election' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
+   $questionIds = [];
+   $res = $dbw->select( 'securepoll_questions', [ 'qu_entity' ],
+   [ 'qu_election' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
foreach ( $res as $row ) {
$questionIds[] = $row->qu_entity;
}
 
-   $res = $dbw->select( 'securepoll_options', array( 'op_entity' ),
-   array( 'op_election' => $electionId ),
-   __METHOD__, array( 'FOR UPDATE' ) );
-   $optionIds = array();
+   $res = $dbw->select( 'securepoll_options', [ 'op_entity' ],
+   [ 'op_election' => $electionId ],
+   __METHOD__, [ 'FOR UPDATE' ] );
+   $optionIds = [];
foreach ( $res as $row ) {
$optionIds[] = $row->op_entity;
}
 
-   $entityIds = array_merge( $optionIds, $questionIds, array( $electionId 
) );
+   $entityIds = array_merge( $optionIds, $questionIds, [ $electionId ] );
 
# Delete the messages and properties
-   $dbw->delete( 'securepoll_msgs', array( 'msg_entity' => $entityIds ) );
-   $dbw->delete( 'securepoll_properties', array( 'pr_entity' => $entityIds 
) );
+   $dbw->delete( 'securepoll_msgs', [ 'msg_entity' => $entityIds ] );
+   $dbw->delete( 'securepoll_properties', [ 'pr_entity' => $entityIds ] );
 
# Delete the entities
if ( $optionIds ) {
-   $dbw->delete( 'securepoll_options', array( 'op_entity' => 
$optionIds ), __METHOD__ );
+   $dbw->delete( 'securepoll_options', [ 'op_entity' => $optionIds 
], __METHOD__ );
}
if ( $questionIds ) {
-   

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax - includes/pages

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358073 )

Change subject: Use short array syntax - includes/pages
..

Use short array syntax - includes/pages

Done by phpcbf over composer fix

Change-Id: I17aa9005f8b2cf4fcd8c2455dcb9b3c017c1
---
M includes/pages/ActionPage.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
11 files changed, 444 insertions(+), 444 deletions(-)


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

diff --git a/includes/pages/ActionPage.php b/includes/pages/ActionPage.php
index 5cf05b0..a7227dd 100644
--- a/includes/pages/ActionPage.php
+++ b/includes/pages/ActionPage.php
@@ -45,7 +45,7 @@
}
 
$languages = array_merge(
-   array( $userLang ),
+   [ $userLang ],
Language::getFallbacksFor( $userLang ) );
 
if ( !in_array( $election->getLanguage(), $languages ) ) {
@@ -61,6 +61,6 @@
 * Relay for SpecialPage::msg
 */
protected function msg( /* args */ ) {
-   return call_user_func_array( array( $this->specialPage, 'msg' 
), func_get_args() );
+   return call_user_func_array( [ $this->specialPage, 'msg' ], 
func_get_args() );
}
 }
diff --git a/includes/pages/CreatePage.php b/includes/pages/CreatePage.php
index d7b638c..2e44e02 100644
--- a/includes/pages/CreatePage.php
+++ b/includes/pages/CreatePage.php
@@ -66,38 +66,38 @@
 
# These are for injecting raw HTML into the HTMLForm for the
# multi-column aspects of the designed layout.
-   $layoutTableStart = array(
+   $layoutTableStart = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableMid = array(
+   ];
+   $layoutTableMid = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
-   $layoutTableEnd = array(
+   ];
+   $layoutTableEnd = [
'type' => 'info',
'rawrow' => true,
'default' => '',
-   );
+   ];
 
-   $formItems = array();
+   $formItems = [];
 
-   $formItems['election_id'] = array(
+   $formItems['election_id'] = [
'type' => 'hidden',
'default' => -1,
'output-as-default' => false,
-   );
+   ];
 
-   $formItems['election_title'] = array(
+   $formItems['election_title'] = [
'label-message' => 
'securepoll-create-label-election_title',
'type' => 'text',
'required' => true,
-   );
+   ];
 
$wikiNames = SecurePoll_FormStore::getWikiList();
-   $options = array();
+   $options = [];
$options['securepoll-create-option-wiki-this_wiki'] = 
wfWikiID();
if ( count( $wikiNames ) > 1 ) {
$options['securepoll-create-option-wiki-all_wikis'] = 
'*';
@@ -112,7 +112,7 @@
// Only option is wfWikiID(), so don't bother making 
the user select it.
} elseif ( count( $wikiNames ) < 10 ) {
// So few, we may as well just list them explicitly
-   $opts = array();
+   $opts = [];
foreach ( $options as $msg => $value ) {
$opts[$this->msg( $msg )->plain()] = $value;
}
@@ -124,165 +124,165 @@
$opts[$this->msg( 
'securepoll-create-option-wiki-other_wiki' )->plain()] =
$wikiNames;
}
-   $formItems['property_wiki'] = array(
+   $formItems['property_wiki'] = [
'type' => 'select',
'options' => $opts,
'label-message' => 
'securepoll-create-label-wiki',
-   );
+   ];
} else {
$options['securepoll-create-option-wiki-other_wiki'] = 
'other';
-   $formItems['property_wiki'] = 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358075 )

Change subject: Use short array syntax
..

Use short array syntax

Done by phpcbf over composer fix

Change-Id: I6ba21315abbe586ce4237be991daade483b259a4
---
M SecurePoll.i18n.php
M api/ApiStrikeVote.php
M includes/crypt/Crypt.php
M includes/entities/Election.php
M includes/entities/Entity.php
M includes/entities/Option.php
M includes/entities/Question.php
M includes/htmlform/HTMLFormRadioRangeColumnLabels.php
M includes/jobs/PopulateVoterListJob.php
M includes/main/Context.php
M includes/main/SecurePollContentHandler.php
M includes/main/SpecialSecurePoll.php
M includes/main/Store.php
M phpcs.xml
14 files changed, 247 insertions(+), 248 deletions(-)


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

diff --git a/SecurePoll.i18n.php b/SecurePoll.i18n.php
index e2af401..b627ebd 100644
--- a/SecurePoll.i18n.php
+++ b/SecurePoll.i18n.php
@@ -10,10 +10,10 @@
  *
  * This shim maintains compatibility back to MediaWiki 1.17.
  */
-$messages = array();
+$messages = [];
 if ( !function_exists( 'wfJsonI18nShim310d2110c88636f7' ) ) {
function wfJsonI18nShim310d2110c88636f7( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
$fileName = __DIR__ . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
diff --git a/api/ApiStrikeVote.php b/api/ApiStrikeVote.php
index efd9046..7e6cefc 100644
--- a/api/ApiStrikeVote.php
+++ b/api/ApiStrikeVote.php
@@ -44,7 +44,7 @@
// if not logged in: fail
$user = $this->getUser();
if ( !$user->isLoggedIn() ) {
-   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
$this->dieWithError(

'apierror-securepoll-mustbeloggedin-strikevote', 'notloggedin'
);
@@ -61,16 +61,16 @@
$db = $context->getDB();
$table = $db->tableName( 'securepoll_elections' );
$row = $db->selectRow(
-   array( 'securepoll_votes', 'securepoll_elections' ),
+   [ 'securepoll_votes', 'securepoll_elections' ],
"$table.*",
-   array( 'vote_id' => $voteid, 'vote_election=el_entity' 
),
+   [ 'vote_id' => $voteid, 'vote_election=el_entity' ],
__METHOD__
);
 
// if no vote: fail
if ( !$row ) {
-   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
-   $this->dieWithError( array( 
'apierror-securepoll-badvoteid', $voteid ), 'novote' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( [ 
'apierror-securepoll-badvoteid', $voteid ], 'novote' );
} else {
$this->dieUsage( "$voteid is not a valid vote 
id.", 'novote' );
}
@@ -81,7 +81,7 @@
$subpage->election = $context->newElectionFromRow( $row );
$status = $subpage->strike( $option, $voteid, $reason );
 
-   $result = array();
+   $result = [];
if ( $status->isGood() ) {
$result['status'] = 'good';
} else {
@@ -103,32 +103,32 @@
}
 
public function getAllowedParams() {
-   return array(
-   'option' => array(
-   ApiBase::PARAM_TYPE => array(
+   return [
+   'option' => [
+   ApiBase::PARAM_TYPE => [
'strike',
'unstrike'
-   ),
+   ],
ApiBase::PARAM_REQUIRED => true,
-   ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
-   ),
-   'reason' => array(
+   ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
+   ],
+   'reason' => [
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true,
-   ),
-   'voteid' => array(
+   ],
+   'voteid' => [
  

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Use short array syntax in alias file

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358071 )

Change subject: Use short array syntax in alias file
..

Use short array syntax in alias file

Done by phpcbf over composer fix

Change-Id: Icef22be9cfe8b5a4711d0f2dec3bd52a27959ed7
---
M SecurePoll.alias.php
M SecurePoll.namespaces.php
2 files changed, 148 insertions(+), 149 deletions(-)


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

diff --git a/SecurePoll.alias.php b/SecurePoll.alias.php
index e765c26..33b1b38 100644
--- a/SecurePoll.alias.php
+++ b/SecurePoll.alias.php
@@ -5,246 +5,245 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'SecurePoll' => array( 'SecurePoll' ),
-);
+$specialPageAliases['en'] = [
+   'SecurePoll' => [ 'SecurePoll' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'SecurePoll' => array( 'اقتراع_آمن' ),
-);
+$specialPageAliases['ar'] = [
+   'SecurePoll' => [ 'اقتراع_آمن' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'SecurePoll' => array( 'استطلاع_رأى_امان' ),
-);
+$specialPageAliases['arz'] = [
+   'SecurePoll' => [ 'استطلاع_رأى_امان' ],
+];
 
 /** Avaric (авар) */
-$specialPageAliases['av'] = array(
-   'SecurePoll' => array( 'Защищённое_голосование' ),
-);
+$specialPageAliases['av'] = [
+   'SecurePoll' => [ 'Защищённое_голосование' ],
+];
 
 /** Bashkir (башҡортса) */
-$specialPageAliases['ba'] = array(
-   'SecurePoll' => array( 'SecurePoll' ),
-);
+$specialPageAliases['ba'] = [
+   'SecurePoll' => [ 'SecurePoll' ],
+];
 
 /** Western Balochi (بلوچی رخشانی) */
-$specialPageAliases['bgn'] = array(
-   'SecurePoll' => array( 'ایمنین_رای_گیره_گ' ),
-);
+$specialPageAliases['bgn'] = [
+   'SecurePoll' => [ 'ایمنین_رای_گیره_گ' ],
+];
 
 /** Bengali (বাংলা) */
-$specialPageAliases['bn'] = array(
-   'SecurePoll' => array( 'সিকিউর_পোল' ),
-);
+$specialPageAliases['bn'] = [
+   'SecurePoll' => [ 'সিকিউর_পোল' ],
+];
 
 /** Chechen (нохчийн) */
-$specialPageAliases['ce'] = array(
-   'SecurePoll' => array( 'Лардина_кхаж_тасар' ),
-);
+$specialPageAliases['ce'] = [
+   'SecurePoll' => [ 'Лардина_кхаж_тасар' ],
+];
 
 /** Czech (čeština) */
-$specialPageAliases['cs'] = array(
-   'SecurePoll' => array( 'Bezpečné_hlasování' ),
-);
+$specialPageAliases['cs'] = [
+   'SecurePoll' => [ 'Bezpečné_hlasování' ],
+];
 
 /** Danish (dansk) */
-$specialPageAliases['da'] = array(
-   'SecurePoll' => array( 'Sikker_afstemning' ),
-);
+$specialPageAliases['da'] = [
+   'SecurePoll' => [ 'Sikker_afstemning' ],
+];
 
 /** German (Deutsch) */
-$specialPageAliases['de'] = array(
-   'SecurePoll' => array( 'Sichere_Abstimmung' ),
-);
+$specialPageAliases['de'] = [
+   'SecurePoll' => [ 'Sichere_Abstimmung' ],
+];
 
 /** Zazaki (Zazaki) */
-$specialPageAliases['diq'] = array(
-   'SecurePoll' => array( 'Dolaİtimadi' ),
-);
+$specialPageAliases['diq'] = [
+   'SecurePoll' => [ 'Dolaİtimadi' ],
+];
 
 /** Lower Sorbian (dolnoserbski) */
-$specialPageAliases['dsb'] = array(
-   'SecurePoll' => array( 'Wěste wótgłosowanje' ),
-);
+$specialPageAliases['dsb'] = [
+   'SecurePoll' => [ 'Wěste wótgłosowanje' ],
+];
 
 /** Estonian (eesti) */
-$specialPageAliases['et'] = array(
-   'SecurePoll' => array( 'Turvaline_hääletus' ),
-);
+$specialPageAliases['et'] = [
+   'SecurePoll' => [ 'Turvaline_hääletus' ],
+];
 
 /** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-   'SecurePoll' => array( 'نظرسنجی_امن', 'رأی‌گیری_ایمن' ),
-);
+$specialPageAliases['fa'] = [
+   'SecurePoll' => [ 'نظرسنجی_امن', 'رأی‌گیری_ایمن' ],
+];
 
 /** Finnish (suomi) */
-$specialPageAliases['fi'] = array(
-   'SecurePoll' => array( 'Suojattu_kysely' ),
-);
+$specialPageAliases['fi'] = [
+   'SecurePoll' => [ 'Suojattu_kysely' ],
+];
 
 /** French (français) */
-$specialPageAliases['fr'] = array(
-   'SecurePoll' => array( 'Vote_sécurisé' ),
-);
+$specialPageAliases['fr'] = [
+   'SecurePoll' => [ 'Vote_sécurisé' ],
+];
 
 /** Arpitan (arpetan) */
-$specialPageAliases['frp'] = array(
-   'SecurePoll' => array( 'Voto_sècurisâ', 'VotoSècurisâ' ),
-);
+$specialPageAliases['frp'] = [
+   'SecurePoll' => [ 'Voto_sècurisâ', 'VotoSècurisâ' ],
+];
 
 /** Galician (galego) */
-$specialPageAliases['gl'] = array(
-   'SecurePoll' => array( 'Enquisa_segura' ),
-);
+$specialPageAliases['gl'] = [
+   'SecurePoll' => [ 'Enquisa_segura' ],
+];
 
 /** Swiss German (Alemannisch) */
-$specialPageAliases['gsw'] = array(
-   'SecurePoll' => array( 'Sicheri_Abstimmig' ),
-);
+$specialPageAliases['gsw'] = [
+   'SecurePoll' => [ 'Sicheri_Abstimmig' ],
+];
 
 /** Hebrew 

[MediaWiki-commits] [Gerrit] mediawiki...Truglass[master]: [WIP] Fixes for the Echo extension

2017-06-09 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358070 )

Change subject: [WIP] Fixes for the Echo extension
..

[WIP] Fixes for the Echo extension

Change-Id: I53d50c9e479b452770850d1bd0a0e940c9433e92
---
M skin.json
A truglass/echo.badge.css
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Truglass 
refs/changes/70/358070/1

diff --git a/skin.json b/skin.json
index dac92f5..af740d7 100644
--- a/skin.json
+++ b/skin.json
@@ -1,6 +1,6 @@
 {
"name": "Truglass",
-   "version": "4.1.5",
+   "version": "4.1.6",
"author": [
"Elliott Franklin Cable",
"Jack Phoenix",
@@ -44,6 +44,7 @@
},
"ResourceModuleSkinStyles": {
"truglass": {
+   "+ext.echo.styles.badge": "truglass/echo.badge.css",
"+mediawiki.special.preferences.styles": 
"truglass/special.preferences.styles.css"
}
},
diff --git a/truglass/echo.badge.css b/truglass/echo.badge.css
new file mode 100644
index 000..c5f1350
--- /dev/null
+++ b/truglass/echo.badge.css
@@ -0,0 +1,7 @@
+/* Lazy fix for the Echo extension icons in the personal tools area to stop
+ * them from messing up the whole #ptools
+ */
+#ptools li#pt-notifications-alert,
+#ptools li#pt-notifications-notice {
+   display: inline-block;
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53d50c9e479b452770850d1bd0a0e940c9433e92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Truglass
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Event sampling is based on user bucket

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358069 )

Change subject: Event sampling is based on user bucket
..

Event sampling is based on user bucket

Ensure the event sampling is consistent with the A/B test
sampling token.

Change-Id: I947159b44c567ddf9b4461488f6ef781b2e2f269
Depends-On: I07fd3b7933e7b18cc71f3d38453d9661e57d896b
Bug: T167236
---
M resources/ext.relatedArticles.readMore.eventLogging/index.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/resources/ext.relatedArticles.readMore.eventLogging/index.js 
b/resources/ext.relatedArticles.readMore.eventLogging/index.js
index afe721b..0944066 100644
--- a/resources/ext.relatedArticles.readMore.eventLogging/index.js
+++ b/resources/ext.relatedArticles.readMore.eventLogging/index.js
@@ -28,7 +28,9 @@
skin: ( skin === 'minerva' ) ? skin + '-' + 
mw.config.get( 'wgMFMode' ) : skin,
// This should persist for a given user across their 
session.
userSessionToken: mw.user.sessionId()
-   }
+   },
+   // Force bucketing by user
+   true
);
 
mw.trackSubscribe( 'ext.relatedArticles.logEnabled', function ( _, data 
) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove (i) from correction for case insensitive textfields

2017-06-09 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358068 )

Change subject: Remove (i) from correction for case insensitive textfields
..

Remove (i) from correction for case insensitive textfields

Case insensitive textfields use parameter (i) inside answer format.
The (i) parameter is currently shown in correction which is undesirable.
This change removes the parameter by using substring function.
Change can be confirmed by checking correction of textfield using (i)
parameter.

Bug:T166926
Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
---
M Question.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/68/358068/1

diff --git a/Question.php b/Question.php
index 952e853..3fe1700 100644
--- a/Question.php
+++ b/Question.php
@@ -432,6 +432,8 @@
}
}
if ( $this->mBeingCorrected ) {
+   $strlen = preg_match( '` \(i\)$`', 
$possibility ) ? mb_strlen( $possibility ) - 4 : mb_strlen( $possibility );
+   $possibility = substr( $possibility, 0, 
$strlen );
$poss .= $possibility . '';
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9800f85e31f696d6be78c33463425123548dc0aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Setup CI for MinervaNeue skin

2017-06-09 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358067 )

Change subject: Setup CI for MinervaNeue skin
..

Setup CI for MinervaNeue skin

* Reflect MobileFrontend two way dependency
** Note in future we hope to break this, but that's a bug
for another time
* Run all the same jobs

Bug: T166750
Change-Id: I0fb3bf52e012ad3b466066fcf4e6bdd51507bbae
---
M zuul/layout.yaml
M zuul/parameter_functions.py
2 files changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/67/358067/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4340749..9a336af 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1777,9 +1777,13 @@
 
   - name: mediawiki/skins/MinervaNeue
 template:
- - name: mwgate-composer
- - name: mwgate-npm
- - name: skin-tests
+  - name: extension-gate
+  - name: mwgate-rake
+  - name: mwgate-npm
+  - name: extension-selenium
+postmerge:
+  - mwext-jsduck-publish
+  - mwext-doxygen-publish
 
   - name: mediawiki/skins/Modern
 template:
diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 607b933..30f51bb 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -124,6 +124,7 @@
 dependencies = {
 # Skins are listed first to highlight the skin dependencies
 'skins/BlueSpiceSkin': ['BlueSpiceFoundation'],
+'skins/MinervaNeue': ['MobileFrontend'],
 
 # Extensions
 # One can add a skin by using: 'skin/X'
@@ -178,7 +179,7 @@
 'Math': ['VisualEditor', 'Wikidata'],
 'MathSearch': ['Math'],
 'MobileApp': ['Echo', 'MobileFrontend', 'VisualEditor'],
-'MobileFrontend': ['Echo', 'VisualEditor', 'ZeroBanner', 'MobileApp'],
+'MobileFrontend': ['Echo', 'VisualEditor', 'ZeroBanner', 'MobileApp', 
'skins/MinervaNeue'],
 'NamespacePopups': ['PagePopups'],
 'NavigationTiming': ['EventLogging'],
 'NSFileRepo': ['Lockdown'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fb3bf52e012ad3b466066fcf4e6bdd51507bbae
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Add phpcs and make pass

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358066 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: Iccc25342734d12928b98d49e7dae02d64136607c
---
M auth-api.php
M composer.json
M includes/SecurePollHooks.php
M includes/crypt/Crypt.php
M includes/entities/Election.php
M includes/main/Context.php
M includes/main/SpecialSecurePoll.php
M includes/main/Store.php
M includes/user/Auth.php
M includes/user/Voter.php
A phpcs.xml
11 files changed, 66 insertions(+), 22 deletions(-)


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

diff --git a/auth-api.php b/auth-api.php
index ef06d1e..8e4fe0a 100644
--- a/auth-api.php
+++ b/auth-api.php
@@ -9,7 +9,7 @@
 }
 chdir( $IP );
 
-require( "$IP/includes/WebStart.php" );
+require "$IP/includes/WebStart.php";
 
 if ( !class_exists( 'SecurePoll_RemoteMWAuth' ) ) {
header( 'HTTP/1.1 500 Internal Server Error' );
@@ -40,4 +40,3 @@
 $auth = $context->newAuth( 'local' );
 $status = Status::newGood( $auth->getUserParams( $user ) );
 echo serialize( $status );
-
diff --git a/composer.json b/composer.json
index 686b65b..b8f68fb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,14 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
+   "fix": "phpcbf",
"test": [
-   "parallel-lint . --exclude vendor"
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
]
}
 }
diff --git a/includes/SecurePollHooks.php b/includes/SecurePollHooks.php
index adb2275..204aad0 100644
--- a/includes/SecurePollHooks.php
+++ b/includes/SecurePollHooks.php
@@ -79,7 +79,7 @@
 */
public static function onContentHandlerDefaultModelFor( $title, &$model 
) {
global $wgSecurePollUseNamespace;
-   if( $wgSecurePollUseNamespace && $title->getNamespace() == 
NS_SECUREPOLL ) {
+   if ( $wgSecurePollUseNamespace && $title->getNamespace() == 
NS_SECUREPOLL ) {
$model = 'SecurePoll';
return false;
}
diff --git a/includes/crypt/Crypt.php b/includes/crypt/Crypt.php
index 7d36b00..7734665 100644
--- a/includes/crypt/Crypt.php
+++ b/includes/crypt/Crypt.php
@@ -244,7 +244,9 @@
if ( !$dir ) {
return;
}
+   // @codingStandardsIgnoreStart
while ( false !== ( $file = readdir( $dir ) ) ) {
+   // @codingStandardsIgnoreEnd
if ( $file == '.' || $file == '..' ) {
continue;
}
diff --git a/includes/entities/Election.php b/includes/entities/Election.php
index 89a3b0c..08cb5a2 100644
--- a/includes/entities/Election.php
+++ b/includes/entities/Election.php
@@ -127,12 +127,16 @@
/**
 * Get the start date in MW internal form.
 */
-   function getStartDate() { return $this->startDate; }
+   function getStartDate() {
+   return $this->startDate;
+   }
 
/**
 * Get the end date in MW internal form.
 */
-   function getEndDate() { return $this->endDate; }
+   function getEndDate() {
+   return $this->endDate;
+   }
 
/**
 * Returns true if the election has started.
@@ -194,7 +198,7 @@
$edits = isset( $props['edit-count'] ) ? 
$props['edit-count'] : 0;
if ( $minEdits && $edits < $minEdits ) {
$status->fatal( 'securepoll-too-few-edits',
-   $wgLang->formatNum( $minEdits), 
$wgLang->formatNum( $edits ) );
+   $wgLang->formatNum( $minEdits ), 
$wgLang->formatNum( $edits ) );
}
 
// Registration date
diff --git a/includes/main/Context.php b/includes/main/Context.php
index 1d7c3cf..6e50517 100644
--- a/includes/main/Context.php
+++ b/includes/main/Context.php
@@ -109,7 +109,7 @@
 * @return SecurePoll_Election
 */
function getElection( $id ) {
-   if( !isset( $this->electionCache[$id] ) ) {
+   if ( !isset( $this->electionCache[$id] ) ) {
$info = $this->getStore()->getElectionInfo( array( $id 
) );
if ( $info ) {
$this->electionCache[$id] = $this->newElection( 
reset( $info ) );
diff --git a/includes/main/SpecialSecurePoll.php 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - includes/*

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358065 )

Change subject: Make phpcs pass - includes/*
..

Make phpcs pass - includes/*

Change-Id: I59a78a920ad911ccbfcd322863683b2d8b5e4134
---
M includes/ballots/ApprovalBallot.php
M includes/ballots/Ballot.php
M includes/ballots/ChooseBallot.php
M includes/ballots/PreferentialBallot.php
M includes/ballots/RadioRangeBallot.php
M includes/ballots/RadioRangeCommentBallot.php
M includes/pages/CreatePage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
M includes/talliers/CommentDumper.php
M includes/talliers/SchulzeTallier.php
M includes/talliers/Tallier.php
14 files changed, 32 insertions(+), 42 deletions(-)


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

diff --git a/includes/ballots/ApprovalBallot.php 
b/includes/ballots/ApprovalBallot.php
index ec4c0b1..eb93a2e 100644
--- a/includes/ballots/ApprovalBallot.php
+++ b/includes/ballots/ApprovalBallot.php
@@ -54,11 +54,11 @@
 
function unpackRecord( $record ) {
$scores = array();
-   $itemLength = 2*8 + 7;
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 
$itemLength ) {
+   $itemLength = 2 * 8 + 7;
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-([yn])--/A',
-   $record, $m, 0, $offset ) )
-   {
+   $record, $m, 0, $offset )
+   ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
}
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 10cc35b..2a65f12 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -220,9 +220,8 @@
 * @return false on failure or if cast ballots are hidden, or the output
 * of unpackRecord().
 */
-   function getCurrentVote(){
-
-   if( !$this->election->getOption( 'show-change' ) ){
+   function getCurrentVote() {
+   if ( !$this->election->getOption( 'show-change' ) ) {
return false;
}
 
@@ -247,7 +246,7 @@
array( $this, 'getCurrentVoteCallback' ),
$voter->getId()
);
-   if( !$status->isOK() ){
+   if ( !$status->isOK() ){
return false;
}
 
@@ -256,7 +255,7 @@
: false;
}
 
-   function getCurrentVoteCallback( $store, $record ){
+   function getCurrentVoteCallback( $store, $record ) {
$this->currentVote = $record;
return Status::newGood();
}
diff --git a/includes/ballots/ChooseBallot.php 
b/includes/ballots/ChooseBallot.php
index 9eaa29d..5daec53 100644
--- a/includes/ballots/ChooseBallot.php
+++ b/includes/ballots/ChooseBallot.php
@@ -71,7 +71,7 @@
function unpackRecord( $record ) {
$result = array();
$record = trim( $record );
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 18 ) 
{
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += 18 ) {
if ( !preg_match( '/Q([0-9A-F]{8})A([0-9A-F]{8})/A', 
$record, $m, 0, $offset ) ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
diff --git a/includes/ballots/PreferentialBallot.php 
b/includes/ballots/PreferentialBallot.php
index 3a8e114..cf68f18 100644
--- a/includes/ballots/PreferentialBallot.php
+++ b/includes/ballots/PreferentialBallot.php
@@ -101,10 +101,10 @@
function unpackRecord( $record ) {
$ranks = array();
$itemLength = 3*8 + 7;
-   for ( $offset = 0; $offset < strlen( $record ); $offset += 
$itemLength ) {
+   for ( $offset = 0, $len = strlen( $record ); $offset < $len; 
$offset += $itemLength ) {
if ( !preg_match( 
'/Q([0-9A-F]{8})-A([0-9A-F]{8})-R([0-9A-F]{8})--/A',
-   $record, $m, 0, $offset ) )
-   {
+   $record, $m, 0, $offset )
+   ) {
wfDebug( __METHOD__.": regex doesn't match\n" );
return false;
}
@@ -144,4 +144,3 @@
return $result;
}
 }
-
diff --git a/includes/ballots/RadioRangeBallot.php 
b/includes/ballots/RadioRangeBallot.php
index 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Make phpcs pass - cli

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358064 )

Change subject: Make phpcs pass - cli
..

Make phpcs pass - cli

Change-Id: I145da93bcb92b2f2aed9c24bfe9fa33ae8738e28
---
M cli/cli.inc
M cli/convertVotes.php
M cli/delete.php
M cli/dump.php
M cli/dumpComments.php
M cli/dumpVoteCsv.php
M cli/import.php
M cli/makeSimpleList.php
M cli/purgePrivateVoteData.php
M cli/tally.php
M cli/testDebian.php
M cli/voterList.php
M cli/wm-scripts/bv2013/buildSpamTranslations.php
M cli/wm-scripts/bv2013/doSpam.php
M cli/wm-scripts/bv2013/dumpMetaTranslations.php
M cli/wm-scripts/bv2013/populateEditCount.php
M cli/wm-scripts/bv2013/sendMails.php
M cli/wm-scripts/bv2013/voterList.php
M cli/wm-scripts/bv2015/doSpam.php
M cli/wm-scripts/bv2015/populateEditCount-fixup.php
M cli/wm-scripts/bv2015/populateEditCount.php
M cli/wm-scripts/bv2015/voterList.php
M cli/wm-scripts/bv2017/doSpam.php
M cli/wm-scripts/bv2017/populateEditCount.php
M cli/wm-scripts/bv2017/voterList.php
M cli/wm-scripts/dumpGlobalVoterList.php
26 files changed, 42 insertions(+), 65 deletions(-)


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

diff --git a/cli/cli.inc b/cli/cli.inc
index ea3d7f9..3b112bb 100644
--- a/cli/cli.inc
+++ b/cli/cli.inc
@@ -13,4 +13,4 @@
exit( 1 );
 }
 
-require( $IP . '/maintenance/commandLine.inc' );
+require $IP . '/maintenance/commandLine.inc';
diff --git a/cli/convertVotes.php b/cli/convertVotes.php
index 6727dac..ed9c385 100644
--- a/cli/convertVotes.php
+++ b/cli/convertVotes.php
@@ -1,6 +1,6 @@
 convertLocalElection( $options['name'] );
 }
-
 
 class SecurePoll_ConvertVotes {
public $context, $election;
diff --git a/cli/delete.php b/cli/delete.php
index d0d26d2..17443ed 100644
--- a/cli/delete.php
+++ b/cli/delete.php
@@ -1,6 +1,6 @@
 
@@ -82,4 +81,3 @@
}
fwrite( $election->cbdata['outFile'], "" . $row->vote_record . 
"\n" );
 }
-
diff --git a/cli/dumpComments.php b/cli/dumpComments.php
index 71d5270..1ff5999 100644
--- a/cli/dumpComments.php
+++ b/cli/dumpComments.php
@@ -11,7 +11,7 @@
  */
 
 $optionsWithArgs = array( 'name' );
-require( __DIR__.'/cli.inc' );
+require __DIR__ . '/cli.inc';
 
 $wgTitle = Title::newFromText( 'Special:SecurePoll' );
 
@@ -29,7 +29,7 @@
if ( isset( $options['name'] ) ) {
spFatal( "Cannot load from database when SecurePoll is not 
installed" );
}
-   require( __DIR__ . '/../SecurePoll.php' );
+   require __DIR__ . '/../SecurePoll.php';
 }
 
 $context = new SecurePoll_Context;
@@ -55,13 +55,12 @@
 if ( !$status->isOK() ) {
spFatal( "Tally error: " . $status->getWikiText() );
 }
-//$tallier = $status->value;
+// $tallier = $status->value;
 if ( isset( $options['html'] ) ) {
echo $tallier->getHtmlResult();
 } else {
echo $tallier->getTextResult();
 }
-
 
 function spFatal( $message ) {
fwrite( STDERR, rtrim( $message ) . "\n" );
diff --git a/cli/dumpVoteCsv.php b/cli/dumpVoteCsv.php
index 14d7fe2..d019227 100644
--- a/cli/dumpVoteCsv.php
+++ b/cli/dumpVoteCsv.php
@@ -11,7 +11,7 @@
  */
 
 $optionsWithArgs = array( 'name' );
-require( __DIR__.'/cli.inc' );
+require __DIR__ . '/cli.inc';
 
 $wgTitle = Title::newFromText( 'Special:SecurePoll' );
 
@@ -29,7 +29,7 @@
if ( isset( $options['name'] ) ) {
spFatal( "Cannot load from database when SecurePoll is not 
installed" );
}
-   require( __DIR__ . '/../SecurePoll.php' );
+   require __DIR__ . '/../SecurePoll.php';
 }
 
 $context = new SecurePoll_Context;
@@ -55,13 +55,12 @@
 if ( !$status->isOK() ) {
spFatal( "Tally error: " . $status->getWikiText() );
 }
-//$tallier = $status->value;
+// $tallier = $status->value;
 if ( isset( $options['html'] ) ) {
echo $tallier->getHtmlResult();
 } else {
echo $tallier->getTextResult();
 }
-
 
 function spFatal( $message ) {
fwrite( STDERR, rtrim( $message ) . "\n" );
diff --git a/cli/import.php b/cli/import.php
index 92ba7ec..20470c5 100644
--- a/cli/import.php
+++ b/cli/import.php
@@ -1,6 +1,6 @@
 el_entity;
$this->output( "Election '{$row->el_title}' with end 
date '{$row->el_end_date}' " .
"will have data purged\n" );
@@ -92,7 +91,7 @@
 
$setMin = null;
$setMax = null;
-   foreach ( $vRes as $row  ) {
+   foreach ( $vRes as $row ) {
if ( $setMin === null ) {
$setMin = $row->vote_id;
}
@@ -100,7 +99,7 @@
}
$deleteSets[] = array( $setMin, $setMax );
$minVoteId = $setMax;
- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove dumpsdata100[12] from netboot for testing

2017-06-09 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358063 )

Change subject: remove dumpsdata100[12] from netboot for testing
..


remove dumpsdata100[12] from netboot for testing

paritioning woes, setting to go to manual partitioning for testing

Change-Id: Iac7f414d1d8e677a2f0473ad66ca1f4dbc714c8f
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  RobH: 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 42de62d..900a731 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -132,7 +132,7 @@
 labservices1001|labservices1002|radium|silver|uranium) echo 
partman/raid1.cfg ;; \
 osm-cp*) echo partman/mw.cfg ;; \
 ores200[1-9]) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
-oresrdb2001|dumpsdata100[12]) echo partman/lvm-ext-srv.cfg 
virtual.cfg;; \
+oresrdb2001) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
 pc100[4-6]|pc200[4-6]) echo partman/raid0-lvm-srv.cfg ;; \
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
 poolcounter1002) echo partman/raid1-lvm-ext4-srv.cfg ;; \

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove dumpsdata100[12] from netboot for testing

2017-06-09 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358063 )

Change subject: remove dumpsdata100[12] from netboot for testing
..

remove dumpsdata100[12] from netboot for testing

paritioning woes, setting to go to manual partitioning for testing

Change-Id: Iac7f414d1d8e677a2f0473ad66ca1f4dbc714c8f
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/358063/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 42de62d..900a731 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -132,7 +132,7 @@
 labservices1001|labservices1002|radium|silver|uranium) echo 
partman/raid1.cfg ;; \
 osm-cp*) echo partman/mw.cfg ;; \
 ores200[1-9]) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
-oresrdb2001|dumpsdata100[12]) echo partman/lvm-ext-srv.cfg 
virtual.cfg;; \
+oresrdb2001) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
 pc100[4-6]|pc200[4-6]) echo partman/raid0-lvm-srv.cfg ;; \
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
 poolcounter1002) echo partman/raid1-lvm-ext4-srv.cfg ;; \

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

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

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


[MediaWiki-commits] [Gerrit] eventlogging[master]: Make eventlogging-consumer support a local schema repo, and ...

2017-06-09 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358062 )

Change subject: Make eventlogging-consumer support a local schema repo, and 
teach jrm.py how to serialize arrays
..

Make eventlogging-consumer support a local schema repo, and teach jrm.py how to 
serialize arrays

This will allow us to use eventlogging-consumer to consume from eventbus topics 
and insert into MySQL

Bug: T150369
Change-Id: I78dcc351f737286e5253cec3be76dc87478a020f
---
M bin/eventlogging-consumer
M eventlogging/jrm.py
2 files changed, 49 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/62/358062/1

diff --git a/bin/eventlogging-consumer b/bin/eventlogging-consumer
index 7734038..0aa391b 100755
--- a/bin/eventlogging-consumer
+++ b/bin/eventlogging-consumer
@@ -30,6 +30,7 @@
 import logging
 
 import eventlogging
+import eventlogging.schema
 
 
 eventlogging.setup_logging()
@@ -40,11 +41,19 @@
 ap.add_argument('output', help='URI of output stream', default='stdout://')
 ap.add_argument('--no-plugins', help='run without loading plug-ins',
 action='store_false', dest='load_plugins')
+
+ap.add_argument(
+'--schemas-path',
+help='Path to local schema repository',
+)
 ap.set_defaults(load_plugins=True)
 args = ap.parse_args()
 
 if args.load_plugins:
 eventlogging.load_plugins()
 
+if args.schemas_path:
+eventlogging.schema.load_local_schemas(args.schemas_path)
+
 logging.info('Driving %s -> %s..', args.input, args.output)
 eventlogging.drive(args.input, args.output)
diff --git a/eventlogging/jrm.py b/eventlogging/jrm.py
index 15a7e0b..3cfd62a 100644
--- a/eventlogging/jrm.py
+++ b/eventlogging/jrm.py
@@ -15,10 +15,11 @@
 import logging
 import _mysql
 import os
+import re
 import sqlalchemy
 import time
 
-from .compat import items
+from .compat import items, json
 from .schema import get_schema
 from .utils import flatten
 
@@ -30,9 +31,16 @@
 # timestamps. See ``_.
 MEDIAWIKI_TIMESTAMP = '%Y%m%d%H%M%S'
 
-# Format string for table names. Interpolates a `SCID` -- i.e., a tuple
-# of (schema_name, revision_id).
-TABLE_NAME_FORMAT = '%s_%s'
+
+
+def scid_to_table_name(scid):
+# Format string for table names. Interpolates a `SCID` -- i.e., a tuple
+# of (schema_name, revision_id).
+return '{}_{}'.format(
+re.sub('[^A-Za-z0-9]+', '_', scid[0]),
+scid[1]
+)
+
 
 # An iterable of properties that should not be stored in the database.
 NO_DB_PROPERTIES = (
@@ -48,6 +56,14 @@
 )
 }
 }
+
+# Maximum length for string and string-like types. Because InnoDB limits index
+# columns to 767 bytes, the maximum length for a utf8mb4 column (which
+# reserves up to four bytes per character) is 191 (191 * 4 = 764).
+STRING_MAX_LEN = 1024
+
+# Default table column definition, to be overridden by mappers below.
+COLUMN_DEFAULTS = {'type_': sqlalchemy.Unicode(STRING_MAX_LEN)}
 
 
 class MediaWikiTimestamp(sqlalchemy.TypeDecorator):
@@ -73,13 +89,22 @@
 return datetime.datetime.strptime(value, MEDIAWIKI_TIMESTAMP)
 
 
-# Maximum length for string and string-like types. Because InnoDB limits index
-# columns to 767 bytes, the maximum length for a utf8mb4 column (which
-# reserves up to four bytes per character) is 191 (191 * 4 = 764).
-STRING_MAX_LEN = 1024
+class JsonSerde(sqlalchemy.TypeDecorator):
+"""A :class:`sqlalchemy.TypeDecorator` for converting to and from JSON 
strings."""
 
-# Default table column definition, to be overridden by mappers below.
-COLUMN_DEFAULTS = {'type_': sqlalchemy.Unicode(STRING_MAX_LEN)}
+impl = sqlalchemy.Unicode(STRING_MAX_LEN)
+
+def process_bind_param(self, value, dialect=None):
+"""Convert the value to a JSON string"""
+value = json.dumps(value)
+if hasattr(value, 'decode'):
+value = value.decode('utf-8')
+return value
+
+def process_result_value(self, value, dialect=None):
+"""Convert a JSON string into a Python object"""
+return json.loads(value)
+
 
 # Mapping of JSON Schema attributes to valid values. Each value maps to
 # a dictionary of options. The options are compounded into a single
@@ -97,6 +122,8 @@
 'integer': {'type_': sqlalchemy.BigInteger},
 'number': {'type_': sqlalchemy.Float},
 'string': {'type_': sqlalchemy.Unicode(STRING_MAX_LEN)},
+# Encode arrays as JSON strings.
+'array': {'type_': JsonSerde},
 }),
 ('format', {
 'utc-millisec': {'type_': MediaWikiTimestamp, 'index': True},
@@ -152,8 +179,9 @@
 #   | | +-++
 #   +-+>| Return table description |
 #   +--+
+table_name = scid_to_table_name(scid)
 try:
-return 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] noreferences.py: outputs & frwiki dict

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358061 )

Change subject: [IMPR] noreferences.py: outputs & frwiki dict
..

[IMPR] noreferences.py: outputs & frwiki dict

Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
---
M scripts/noreferences.py
1 file changed, 12 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/61/358061/1

diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 604cc17..712cb0e 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -34,7 +34,7 @@
 a list of affected articles
 """
 #
-# (C) Pywikibot team, 2007-2015
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -287,7 +287,8 @@
 u'Notes et références',
 u'Références',
 u'References',
-u'Notes'
+'Notes',
+'Sources',
 ],
 'he': [
 u'הערות שוליים',
@@ -644,7 +645,7 @@
 try:
 text = page.text
 except pywikibot.NoPage:
-pywikibot.output(u"Page %s does not exist?!"
+pywikibot.warning('Page %s does not exist?!'
  % page.title(asLink=True))
 continue
 except pywikibot.IsRedirectPage:
@@ -652,7 +653,7 @@
  % page.title(asLink=True))
 continue
 except pywikibot.LockedPage:
-pywikibot.output(u"Page %s is locked?!"
+pywikibot.warning('Page %s is locked?!'
  % page.title(asLink=True))
 continue
 if page.isDisambig():
@@ -660,7 +661,7 @@
  % page.title(asLink=True))
 continue
 if self.site.sitename == 'wikipedia:en' and page.isIpEdit():
-pywikibot.output(
+pywikibot.warning(
 u"Page %s is edited by IP. Possible vandalized"
 % page.title(asLink=True))
 continue
@@ -669,14 +670,15 @@
 try:
 self.userPut(page, page.text, newText, 
summary=self.comment)
 except pywikibot.EditConflict:
-pywikibot.output(u'Skipping %s because of edit conflict'
- % page.title())
+pywikibot.warning('Skipping %s because of edit conflict'
+ % page.title(asLink=True))
 except pywikibot.SpamfilterError as e:
-pywikibot.output(
+pywikibot.warning(
 u'Cannot change %s because of blacklist entry %s'
-% (page.title(), e.url))
+% (page.title(asLink=True), e.url))
 except pywikibot.LockedPage:
-pywikibot.output(u'Skipping %s (locked page)' % 
page.title())
+pywikibot.warning('Skipping %s (locked page)' %
+  page.title(asLink=True))
 
 
 def main(*args):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib70ac5307c42ab6379c12f1c62247cfa171ec823
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove anarchopedia from wikimedia_sites.py maintenance script

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358060 )

Change subject: Remove anarchopedia from wikimedia_sites.py maintenance script
..

Remove anarchopedia from wikimedia_sites.py maintenance script

This is an external wiki, I don't think that it should be in this file.

Bug: T167534
Change-Id: Ib18fca35495011deba79350e942de820fff2e125
---
M scripts/maintenance/wikimedia_sites.py
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/60/358060/1

diff --git a/scripts/maintenance/wikimedia_sites.py 
b/scripts/maintenance/wikimedia_sites.py
index a9df474..fa6bfd6 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -22,7 +22,6 @@
 
 # supported families by this script
 families_list = [
-'anarchopedia',
 'wikibooks',
 'wikinews',
 'wikipedia',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib18fca35495011deba79350e942de820fff2e125
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add NS:100 to wgNamespacesToBeSearchedDefault for enwikisource

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358059 )

Change subject: Add NS:100 to wgNamespacesToBeSearchedDefault for enwikisource
..

Add NS:100 to wgNamespacesToBeSearchedDefault for enwikisource

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7605c12..b312da0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7394,7 +7394,7 @@
'+elwikisource' => [ 102 => 1, 108 => 1 ],
'+enwikibooks' => [ 4 => 1, 112 => 1 ],
'+enwikinews' => [ 14 => 1, ], // T87522
-   '+enwikisource' => [ 102 => 1, 106 => 1, 114 => 1 ], // T52007
+   '+enwikisource' => [ 100 => 1, 102 => 1, 106 => 1, 114 => 1 ], // 
T52007, T167511
'+eswiki' => [ 100 => 1, 104 => 1 ],
'+eswikisource' => [ 104 => 1 ],
'+etwikisource' => [ 104 => 1, 106 => 1 ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Fix phpDocumentor type syntax

2017-06-09 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358058 )

Change subject: Fix phpDocumentor type syntax
..

Fix phpDocumentor type syntax

I assumed that the Optional? syntax, which I knew from Ceylon [1], was
also supported by phpDocumentor; according to its documentation [2], I
assumed wrong :)

[1]: 
https://ceylon-lang.org/documentation/1.3/reference/structure/type-abbreviation/
[2]: https://www.phpdoc.org/docs/latest/guides/types.html

Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
M tests/phpunit/ResultAssertions.php
M tests/phpunit/SparqlHelperMock.php
3 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 8060342..8023a4c 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -97,7 +97,7 @@
 
/**
 * @param Statement $statement
-* @return EntityId?[]
+* @return (EntityId|null)[]
 */
public function findEntitiesWithSameStatement( Statement $statement ) {
$pid = $statement->getPropertyId()->serialize();
diff --git a/tests/phpunit/ResultAssertions.php 
b/tests/phpunit/ResultAssertions.php
index c053ec7..96a8561 100644
--- a/tests/phpunit/ResultAssertions.php
+++ b/tests/phpunit/ResultAssertions.php
@@ -35,7 +35,7 @@
 * Assert that $result indicates violation of a constraint.
 *
 * @param CheckResult $result
-* @param string? $messageKey If present, additionally assert that the 
violation message
+* @param string|null $messageKey If present, additionally assert that 
the violation message
 *matches the message given by this key.
 */
public function assertViolation( CheckResult $result, $messageKey = 
null ) {
@@ -96,7 +96,7 @@
 * and also record that $result should indicate violation once the 
constraint is implemented.
 *
 * @param CheckResult $result
-* @param string? $messageKey
+* @param string|null $messageKey
 * @see assertTodo
 * @see assertViolation
 */
diff --git a/tests/phpunit/SparqlHelperMock.php 
b/tests/phpunit/SparqlHelperMock.php
index 51dc540..de366bd 100644
--- a/tests/phpunit/SparqlHelperMock.php
+++ b/tests/phpunit/SparqlHelperMock.php
@@ -41,7 +41,7 @@
 
/**
 * @param Statement $expectedStatement
-* @param EntityId?[] $result
+* @param (EntityId|null)[] $result
 * @return SparqlHelper
 */
private function getSparqlHelperMockFindEntities(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] VCL: switch to resp.reason testing

2017-06-09 Thread Ema (Code Review)
Ema has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358057 )

Change subject: [WIP] VCL: switch to resp.reason testing
..

[WIP] VCL: switch to resp.reason testing

Change-Id: I4d38748d3a00fa4870d6ea7a2352c91fb9528ea5
---
M modules/varnish/templates/misc-frontend.inc.vcl.erb
M modules/varnish/templates/text-frontend.inc.vcl.erb
M modules/varnish/templates/upload-frontend.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
4 files changed, 17 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/358057/1

diff --git a/modules/varnish/templates/misc-frontend.inc.vcl.erb 
b/modules/varnish/templates/misc-frontend.inc.vcl.erb
index 7b98338..7b32a74 100644
--- a/modules/varnish/templates/misc-frontend.inc.vcl.erb
+++ b/modules/varnish/templates/misc-frontend.inc.vcl.erb
@@ -15,7 +15,7 @@
 // re-use the TLS-redirector code and send them to the wikimedia site.
 if (req.http.Host == "wmfusercontent.org") {
 set req.http.Location = "https://www.wikimedia.org;;
-return (synth(751, "TLS Redirect"));
+return (synth(301, "TLS Redirect"));
 }
 
 call misc_recv_pass;
diff --git a/modules/varnish/templates/text-frontend.inc.vcl.erb 
b/modules/varnish/templates/text-frontend.inc.vcl.erb
index 6629921..b17414c 100644
--- a/modules/varnish/templates/text-frontend.inc.vcl.erb
+++ b/modules/varnish/templates/text-frontend.inc.vcl.erb
@@ -42,7 +42,7 @@
} else {
set req.http.Location = "http://; + 
req.http.MobileHost + req.url;
}
-   return (synth(666, "Found"));
+   return (synth(302, "Mobile Redirect"));
}
unset req.http.MobileHost;
}
@@ -147,7 +147,7 @@
 sub cluster_fe_recv {
// Experiment on dealing with a buggy UA that's spamming requests in 
T141786
if (req.http.User-Agent ~ "Windows NT .*Chrome/41\.0\.2272\.76" && 
req.url == "/" && req.http.X-Connection-Properties ~ "SSL=TLSv1.1; 
C=ECDHE-ECDSA-AES128-SHA;") {
-   return (synth(741, "Buggy request, please report at 
https://phabricator.wikimedia.org/T141786;));
+   return (synth(401, "Buggy request, please report at 
https://phabricator.wikimedia.org/T141786;));
}
 
call mobile_redirect;
@@ -189,7 +189,7 @@
   || (req.http.X-Connection-Properties ~ "C=DES-CBC3-SHA;"
   && req.url ~ "^/wiki/" && req.url !~ ":" && req.method == "GET"
   && std.random(0,100) < 1.0)) {
-   return (synth(787, "Browser Connection Security Warning"));
+   return (synth(418, "Browser Connection Security Warning"));
}
 
call text_common_recv;
@@ -204,7 +204,7 @@
 sub cluster_fe_ratelimit {
if (req.http.User-Agent ~ "^wikiScrape/[0-9]+\.[0-9]+\.[0-9]+$") {
if (vsthrottle.is_denied(req.http.X-Client-IP, 25, 5s)) {
-   return (synth(742, "Too Many Requests"));
+   return (synth(429, "Too Many Requests"));
}
}
 }
@@ -298,24 +298,16 @@
 
 sub cluster_fe_err_synth {
// Support mobile redirects
-   if (resp.status == 666) {
+   if (resp.reason == "Mobile Redirect") {
+   set resp.reason = "Found";
set resp.http.Location = req.http.Location;
-   set resp.status = 302;
set resp.http.Connection = "keep-alive";
set resp.http.Content-Length = "0"; // BZ #62245
-   return (deliver);
}
 
// Chrome/41-on-Windows: T141786
-   if (resp.status == 741) {
-   set resp.status = 401;
+   if (resp.reason == "Buggy request, please report at 
https://phabricator.wikimedia.org/T141786;) {
set resp.http.WWW-Authenticate = {"Basic realm="Buggy request, 
please report at https://phabricator.wikimedia.org/T141786""};
-   return (deliver);
-   }
-
-   // Clients performing too many requests
-   if (resp.status == 742) {
-   set resp.status = 429;
return (deliver);
}
 
@@ -325,8 +317,7 @@
// confusing to extract from stats because they have other legitimate
// causes.  We could also invent a new unique from unused 4xx space,
// but I don't think it would be any better than 418 in practice.
-   if (resp.status == 787) {
-   set resp.status = 418;
+   if (resp.reason == "Browser Connection Security Warning") {
set resp.http.Connection = "keep-alive";
set resp.http.Cache-Control = "max-age=0, must-revalidate, 
no-cache, no-store";
set resp.http.Content-Type = "text/html; charset=utf-8";
diff --git a/modules/varnish/templates/upload-frontend.inc.vcl.erb 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Lift IP throttle for Editathon (13 June 2017)

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358056 )

Change subject: Lift IP throttle for Editathon (13 June 2017)
..

Lift IP throttle for Editathon (13 June 2017)

IPs:
130.209.6.43
130.209.6.40
130.209.6.41
Start: 2017-06-13 08:30 (UTC+1)
End: 2017-06-13 11:30 (UTC+1)
Expected number of participants: up to 30
Effected wikis: en.wp primarily, possibly some editing from ga.wp, cy.wp, and 
gd.wp (+commons, wikidata)

Bug: T167517
Change-Id: I56e0ae4b7e3378b2a9dd2fab780b6db657a198b2
---
M wmf-config/throttle.php
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 274d9f9..c084132 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -62,6 +62,18 @@
'value' => 120 // 100 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T167517
+   'from'=> '2017-06-13T07:30 UTC',
+   'to' => '2017-06-06T10:30 UTC',
+   'IP' => [
+   '130.209.6.43',
+   '130.209.6.40',
+   '130.209.6.41',
+   ],
+   'dbname' => [ 'enwiki', 'gawiki', 'cywiki', 'gdwiki', 'wikidatawiki', 
'commonswiki' ],
+   'value' => 40 // 30 expected
+];
+
 ## Add throttling definitions above.
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Inject+use SparqlHelper in TypeCheckerHelper

2017-06-09 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358055 )

Change subject: Inject+use SparqlHelper in TypeCheckerHelper
..

Inject+use SparqlHelper in TypeCheckerHelper

TypeCheckerHelper can optionally be instantiated with a SparqlHelper,
and isSubclassOf delegates to it if the configured limit is exceeded and
the SparqlHelper is present. This should remove all false positives from
the type checks.

(Note that this commit does not remove the dedicated SPARQL checkers.)

Bug: T166379
Change-Id: Ie7c67a88a10c7071b9dbfcb3751a175ba0c304d4
---
M includes/ConstraintCheck/Helper/TypeCheckerHelper.php
M includes/ConstraintReportFactory.php
M tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
3 files changed, 61 insertions(+), 7 deletions(-)


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

diff --git a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php 
b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php
index 88149c2..1136a0f 100644
--- a/includes/ConstraintCheck/Helper/TypeCheckerHelper.php
+++ b/includes/ConstraintCheck/Helper/TypeCheckerHelper.php
@@ -39,18 +39,26 @@
private $constraintParameterRenderer;
 
/**
+* @var SparqlHelper
+*/
+   private $sparqlHelper;
+
+   /**
 * @param EntityLookup $lookup
 * @param Config $config
 * @param ConstraintParameterRenderer $constraintParameterRenderer
+* @param SparqlHelper|null $sparqlHelper
 */
public function __construct(
EntityLookup $lookup,
Config $config,
-   ConstraintParameterRenderer $constraintParameterRenderer
+   ConstraintParameterRenderer $constraintParameterRenderer,
+   SparqlHelper $sparqlHelper = null
) {
$this->entityLookup = $lookup;
$this->config = $config;
$this->constraintParameterRenderer = 
$constraintParameterRenderer;
+   $this->sparqlHelper = $sparqlHelper;
}
 
/**
@@ -58,7 +66,8 @@
 * of one of the item ID serializations in $classesToCheck.
 * If the class hierarchy is not exhausted before
 * the configured limit (WBQualityConstraintsTypeCheckMaxEntities) is 
reached,
-* the check aborts and returns false.
+* the injected {@link SparqlHelper} is consulted if present,
+* otherwise the check aborts and returns false.
 *
 * @param EntityId $comparativeClass
 * @param string[] $classesToCheck
@@ -67,8 +76,17 @@
 * @return bool
 */
public function isSubclassOf( EntityId $comparativeClass, array 
$classesToCheck, &$entitiesChecked = 0 ) {
-   if ( ++$entitiesChecked > $this->config->get( 
'WBQualityConstraintsTypeCheckMaxEntities' ) ) {
-   return false;
+   $maxEntities = $this->config->get( 
'WBQualityConstraintsTypeCheckMaxEntities' );
+   if ( ++$entitiesChecked > $maxEntities ) {
+   if ( $entitiesChecked === $maxEntities + 1 && 
$this->sparqlHelper !== null ) {
+   return $this->sparqlHelper->hasType(
+   $comparativeClass->getSerialization(),
+   $classesToCheck,
+   /* withInstance = */ false
+   );
+   } else {
+   return false;
+   }
}
 
$item = $this->entityLookup->getEntity( $comparativeClass );
diff --git a/includes/ConstraintReportFactory.php 
b/includes/ConstraintReportFactory.php
index 544faff..4e5a7ee 100644
--- a/includes/ConstraintReportFactory.php
+++ b/includes/ConstraintReportFactory.php
@@ -166,7 +166,6 @@
$constraintParameterParser = new 
ConstraintParameterParser();
$connectionCheckerHelper = new 
ConnectionCheckerHelper();
$rangeCheckerHelper = new RangeCheckerHelper();
-   $typeCheckerHelper = new TypeCheckerHelper( 
$this->lookup, $this->config, $this->constraintParameterRenderer );
if ( $this->config->get( 
'WBQualityConstraintsSparqlEndpoint' ) !== '' ) {
$sparqlHelper = new SparqlHelper(
$this->config,
@@ -176,6 +175,12 @@
} else {
$sparqlHelper = null;
}
+   $typeCheckerHelper = new TypeCheckerHelper(
+   $this->lookup,
+   $this->config,
+   $this->constraintParameterRenderer,
+   

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Bump versionCode

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

Change subject: Bump versionCode
..


Bump versionCode

Change-Id: Ie96db076ec511bad83a6bbeb1d053f7436e2cf7b
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index dbdd574..98e1948 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -54,7 +54,7 @@
 applicationId 'org.wikipedia'
 minSdkVersion 16
 targetSdkVersion 25
-versionCode 197
+versionCode 198
 testApplicationId 'org.wikipedia.test'
 testInstrumentationRunner 'org.wikipedia.test.AndroidTestRunner'
 vectorDrawables.useSupportLibrary = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie96db076ec511bad83a6bbeb1d053f7436e2cf7b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: DB: Add join conditions to selectField, selectFieldValues, a...

2017-06-09 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358054 )

Change subject: DB: Add join conditions to selectField, selectFieldValues, and 
insertSelect
..

DB: Add join conditions to selectField, selectFieldValues, and insertSelect

selectField() and selectFieldValues() are trivial, they just need to
pass it through to select(). In fact, selectFieldValues() was already
doing it, just no one ever updated IDatabase.

insertSelect() is a little more work. nativeInsertSelect() was
originally written as largely a copy-paste of select() and has since
gotten well out of sync. Now that we have selectSQLText(), we should be
able to just use that. DatabasePostgres's implementation can wrap the
parent implementation instead of being another copy-paste, but
DatabaseOracle seems to still need to be special.

Change-Id: I0e6a9e6daa510639d3212641606047a5db96c500
---
M includes/db/DatabaseOracle.php
M includes/libs/rdbms/database/DBConnRef.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabaseMssql.php
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/database/IDatabase.php
6 files changed, 48 insertions(+), 80 deletions(-)


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

diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php
index b728786..556fe75 100644
--- a/includes/db/DatabaseOracle.php
+++ b/includes/db/DatabaseOracle.php
@@ -558,19 +558,9 @@
}
 
function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, 
$fname = __METHOD__,
-   $insertOptions = [], $selectOptions = []
+   $insertOptions = [], $selectOptions = [], $selectJoinConds = []
) {
$destTable = $this->tableName( $destTable );
-   if ( !is_array( $selectOptions ) ) {
-   $selectOptions = [ $selectOptions ];
-   }
-   list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) =
-   $this->makeSelectOptions( $selectOptions );
-   if ( is_array( $srcTable ) ) {
-   $srcTable = implode( ',', array_map( [ $this, 
'tableName' ], $srcTable ) );
-   } else {
-   $srcTable = $this->tableName( $srcTable );
-   }
 
$sequenceData = $this->getSequenceData( $destTable );
if ( $sequenceData !== false &&
@@ -585,13 +575,16 @@
$val = $val . ' field' . ( $i++ );
}
 
-   $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( 
$varMap ) ) . ')' .
-   " SELECT $startOpts " . implode( ',', $varMap ) .
-   " FROM $srcTable $useIndex $ignoreIndex ";
-   if ( $conds != '*' ) {
-   $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND );
-   }
-   $sql .= " $tailOpts";
+   $selectSql = $this->selectSQLText(
+   $srcTable,
+   array_values( $varMap ),
+   $conds,
+   $fname,
+   $selectOptions,
+   $selectJoinConds
+   );
+
+   $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( 
$varMap ) ) . ') ' . $selectSql;
 
if ( in_array( 'IGNORE', $insertOptions ) ) {
$this->ignoreDupValOnIndex = true;
diff --git a/includes/libs/rdbms/database/DBConnRef.php 
b/includes/libs/rdbms/database/DBConnRef.php
index b6167aa..c4aeab7 100644
--- a/includes/libs/rdbms/database/DBConnRef.php
+++ b/includes/libs/rdbms/database/DBConnRef.php
@@ -243,13 +243,13 @@
}
 
public function selectField(
-   $table, $var, $cond = '', $fname = __METHOD__, $options = []
+   $table, $var, $cond = '', $fname = __METHOD__, $options = [], 
$join_conds = []
) {
return $this->__call( __FUNCTION__, func_get_args() );
}
 
public function selectFieldValues(
-   $table, $var, $cond = '', $fname = __METHOD__, $options = []
+   $table, $var, $cond = '', $fname = __METHOD__, $options = [], 
$join_conds = []
) {
return $this->__call( __FUNCTION__, func_get_args() );
}
@@ -407,7 +407,7 @@
 
public function insertSelect(
$destTable, $srcTable, $varMap, $conds,
-   $fname = __METHOD__, $insertOptions = [], $selectOptions = []
+   $fname = __METHOD__, $insertOptions = [], $selectOptions = [], 
$selectJoinConds = []
) {
return $this->__call( __FUNCTION__, func_get_args() );
}
diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index ee7644f..2021c86 100644
--- 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] weblinkchecker.py: Use https for web.archive.org

2017-06-09 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358053 )

Change subject: [bugfix] weblinkchecker.py: Use https for web.archive.org
..

[bugfix] weblinkchecker.py: Use https for web.archive.org

It's a temporary patch until the bug waiting for this bug to be fixed by 
memento_client library

Bug: T167463
Change-Id: I26cfebe7c1a09a93dfe4be659226ecb08f9315d5
---
M scripts/weblinkchecker.py
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/53/358053/1

diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index c1618a5..34b563d 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -221,13 +221,17 @@
 def get_archive_url(url):
 """Get archive URL."""
 try:
-return _get_closest_memento_url(
+archive = _get_closest_memento_url(
 url,
 timegate_uri='http://web.archive.org/web/')
 except Exception:
-return _get_closest_memento_url(
+archive = _get_closest_memento_url(
 url,
 timegate_uri='http://timetravel.mementoweb.org/webcite/timegate/')
+# FIXME: Hack for T167463: Use https instead of http for archive.org links
+if archive[:22] == 'http://web.archive.org':
+archive = 'https://web.archive.org' + archive[22:]
+return archive
 
 
 def weblinksIn(text, withoutBracketed=False, onlyBracketed=False):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26cfebe7c1a09a93dfe4be659226ecb08f9315d5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use short array syntax

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358052 )

Change subject: Use short array syntax
..

Use short array syntax

Change-Id: I5d7e139e4ff21c5a3fdd9d497c33ef82a0dedd88
---
M CentralNotice.hooks.php
M CentralNoticeBannerLogPager.php
M CentralNoticeCampaignLogPager.php
M CentralNoticePageLogPager.php
M CentralNoticePager.php
M TemplatePager.php
M includes/HtmlFormElements/HTMLCentralNoticeBanner.php
M includes/HtmlFormElements/HTMLCentralNoticeBannerMessage.php
M maintenance/CleanCNTranslateMetadata.php
M patches/CNDatabasePatcher.php
M phpcs.xml
11 files changed, 228 insertions(+), 230 deletions(-)


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

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index c5f0a51..61c5e49 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -105,8 +105,8 @@
global $wgNoticeInfrastructure;
if ( $wgNoticeInfrastructure ) {
// array( tableName, idField, textField )
-   $updateFields[] = array( 'cn_notice_log', 
'notlog_user_id' );
-   $updateFields[] = array( 'cn_template_log', 
'tmplog_user_id' );
+   $updateFields[] = [ 'cn_notice_log', 'notlog_user_id' ];
+   $updateFields[] = [ 'cn_template_log', 'tmplog_user_id' 
];
}
return true;
}
@@ -231,7 +231,7 @@
if ( $wgUser->isAllowed( 'bot' ) ) {
$userData = false;
} else {
-   $userData = array();
+   $userData = [];
 
// Add the user's registration date 
(MediaWiki timestamp)
$registrationDate = 
$wgUser->getRegistration() ? $wgUser->getRegistration() : 0;
@@ -362,9 +362,9 @@
 
// Set up test fixtures module, which is added as a dependency 
for all QUnit
// tests.
-   $testModules['qunit']['ext.centralNotice.testFixtures'] = array(
+   $testModules['qunit']['ext.centralNotice.testFixtures'] = [
'class' => 'CNTestFixturesResourceLoaderModule'
-   );
+   ];
 
// These classes are only used here or in phpunit tests
$wgAutoloadClasses['CNTestFixturesResourceLoaderModule'] =
@@ -373,10 +373,10 @@
$wgAutoloadClasses['CentralNoticeTestFixtures'] =
__DIR__ . '/tests/CentralNoticeTestFixtures.php';
 
-   $testModuleBoilerplate = array(
+   $testModuleBoilerplate = [
'localBasePath' => __DIR__,
'remoteExtPath' => 'CentralNotice',
-   );
+   ];
 
// find test files for every RL module
$prefix = 'ext.centralNotice';
@@ -385,7 +385,7 @@
if ( substr( $key, 0, strlen( $prefix ) ) ===
$prefix && isset( $module['scripts'] ) ) {
 
-   $testFiles = array();
+   $testFiles = [];
 
foreach ( ( (array)$module['scripts'] ) as 
$script ) {
 
@@ -403,12 +403,12 @@
if ( count( $testFiles ) > 0 ) {
 
$testModules['qunit']["$key.tests"] = 
$testModuleBoilerplate +
-   array(
+   [
'dependencies' =>
-   array( $key, 
'ext.centralNotice.testFixtures' ),
+   [ $key, 
'ext.centralNotice.testFixtures' ],
 
'scripts' => $testFiles,
-   );
+   ];
}
}
}
diff --git a/CentralNoticeBannerLogPager.php b/CentralNoticeBannerLogPager.php
index f49dc44..01a078d 100644
--- a/CentralNoticeBannerLogPager.php
+++ b/CentralNoticeBannerLogPager.php
@@ -19,10 +19,10 @@
 * Pull log entries from the database
 */
function getQueryInfo() {
-   return array(
-   'tables' => array( 'template_log' => 'cn_template_log' 
),
+   return [
+   'tables' => [ 'template_log' => 'cn_template_log' ],
'fields' => '*',
-   );
+   ];
}
 

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use short array syntax in alias file

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358048 )

Change subject: Use short array syntax in alias file
..

Use short array syntax in alias file

Change-Id: I657b7e20d50b0f66d758a40f04808fd7fffd1882
---
M CentralNotice.alias.php
1 file changed, 379 insertions(+), 380 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/48/358048/1

diff --git a/CentralNotice.alias.php b/CentralNotice.alias.php
index 9c8f422..0449647 100644
--- a/CentralNotice.alias.php
+++ b/CentralNotice.alias.php
@@ -2,468 +2,467 @@
 /**
  * Aliases for special pages of CentralNotice extension.
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'CentralNotice' => array( 'CentralNotice' ),
-   'CentralNoticeBanners' => array( 'CentralNoticeBanners' ),
-   'CentralNoticeLogs' => array( 'CentralNoticeLogs' ),
-   'CNReporter' => array( 'CNReporter' ),
-   'NoticeTemplate' => array( 'NoticeTemplate' ),
-   'GlobalAllocation' => array( 'GlobalAllocation' ),
-   'BannerAllocation' => array( 'BannerAllocation' ),
-   'BannerController' => array( 'BannerController' ),
-   'BannerLoader' => array( 'BannerLoader' ),
-   'BannerRandom' => array( 'BannerRandom' ),
-   'RecordImpression' => array( 'RecordImpression' ),
-   'HideBanners' => array( 'HideBanners' ),
-);
+$specialPageAliases['en'] = [
+   'CentralNotice' => [ 'CentralNotice' ],
+   'CentralNoticeBanners' => [ 'CentralNoticeBanners' ],
+   'CentralNoticeLogs' => [ 'CentralNoticeLogs' ],
+   'CNReporter' => [ 'CNReporter' ],
+   'NoticeTemplate' => [ 'NoticeTemplate' ],
+   'GlobalAllocation' => [ 'GlobalAllocation' ],
+   'BannerAllocation' => [ 'BannerAllocation' ],
+   'BannerController' => [ 'BannerController' ],
+   'BannerLoader' => [ 'BannerLoader' ],
+   'BannerRandom' => [ 'BannerRandom' ],
+   'RecordImpression' => [ 'RecordImpression' ],
+   'HideBanners' => [ 'HideBanners' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'CentralNotice' => array( 'ملاحظة_مركزية' ),
-   'CentralNoticeBanners' => array( 'إعلانات_الملاحظة_المركزية' ),
-   'CentralNoticeLogs' => array( 'سجلات_الملاحظة_المركزية' ),
-   'CNReporter' => array( 'مبلغ_م_م' ),
-   'NoticeTemplate' => array( 'قالب_الملاحظة' ),
-   'GlobalAllocation' => array( 'تخصيص_عام' ),
-   'BannerAllocation' => array( 'وضع_الإعلان' ),
-   'BannerController' => array( 'متحكم_الإعلان' ),
-   'BannerLoader' => array( 'محمل_الإعلان' ),
-   'BannerRandom' => array( 'إعلان_عشوائي' ),
-   'RecordImpression' => array( 'تسجيل_الانطباع' ),
-   'HideBanners' => array( 'إخفاء_الإعلان' ),
-);
+$specialPageAliases['ar'] = [
+   'CentralNotice' => [ 'ملاحظة_مركزية' ],
+   'CentralNoticeBanners' => [ 'إعلانات_الملاحظة_المركزية' ],
+   'CentralNoticeLogs' => [ 'سجلات_الملاحظة_المركزية' ],
+   'CNReporter' => [ 'مبلغ_م_م' ],
+   'NoticeTemplate' => [ 'قالب_الملاحظة' ],
+   'GlobalAllocation' => [ 'تخصيص_عام' ],
+   'BannerAllocation' => [ 'وضع_الإعلان' ],
+   'BannerController' => [ 'متحكم_الإعلان' ],
+   'BannerLoader' => [ 'محمل_الإعلان' ],
+   'BannerRandom' => [ 'إعلان_عشوائي' ],
+   'RecordImpression' => [ 'تسجيل_الانطباع' ],
+   'HideBanners' => [ 'إخفاء_الإعلان' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'CentralNotice' => array( 'ملاحظة_مركزية' ),
-   'CentralNoticeBanners' => array( 'اعلانات_النوتيس_المركزيه' ),
-   'CentralNoticeLogs' => array( 'سجلات_النوتيس_المركزيه' ),
-   'CNReporter' => array( 'مبلغ_م_م' ),
-   'NoticeTemplate' => array( 'قالب_الملاحظة' ),
-   'GlobalAllocation' => array( 'تخصيص_عمومى' ),
-   'BannerAllocation' => array( 'وضع_البانر' ),
-   'BannerController' => array( 'متحكم_فى_البانر' ),
-   'BannerLoader' => array( 'محمل_البانر' ),
-   'BannerRandom' => array( 'بانر_عشوائى' ),
-   'RecordImpression' => array( 'تسجيل_الانطباع' ),
-   'HideBanners' => array( 'تخبيه-البانر' ),
-);
+$specialPageAliases['arz'] = [
+   'CentralNotice' => [ 'ملاحظة_مركزية' ],
+   'CentralNoticeBanners' => [ 'اعلانات_النوتيس_المركزيه' ],
+   'CentralNoticeLogs' => [ 'سجلات_النوتيس_المركزيه' ],
+   'CNReporter' => [ 'مبلغ_م_م' ],
+   'NoticeTemplate' => [ 'قالب_الملاحظة' ],
+   'GlobalAllocation' => [ 'تخصيص_عمومى' ],
+   'BannerAllocation' => [ 'وضع_البانر' ],
+   'BannerController' => [ 'متحكم_فى_البانر' ],
+   'BannerLoader' => [ 'محمل_البانر' ],
+   'BannerRandom' => [ 'بانر_عشوائى' ],
+   'RecordImpression' => [ 'تسجيل_الانطباع' ],
+   'HideBanners' => [ 'تخبيه-البانر' ],
+];
 
 /** Assamese (অসমীয়া) */

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use short array syntax - special

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358049 )

Change subject: Use short array syntax - special
..

Use short array syntax - special

Change-Id: If3aea4ddf3e66d56781e3a219becaa9657ccd49d
---
M special/SpecialBannerAllocation.php
M special/SpecialBannerLoader.php
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
M special/SpecialCentralNoticeLogs.php
M special/SpecialGlobalAllocation.php
M special/SpecialHideBanners.php
7 files changed, 392 insertions(+), 392 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/49/358049/1

diff --git a/special/SpecialBannerAllocation.php 
b/special/SpecialBannerAllocation.php
index 242778d..bb37a0e 100644
--- a/special/SpecialBannerAllocation.php
+++ b/special/SpecialBannerAllocation.php
@@ -83,9 +83,9 @@
$this->setHeaders();
 
// Output ResourceLoader module for styling and javascript 
functions
-   $out->addModules( array(
+   $out->addModules( [
'ext.centralNotice.adminUi',
-   ) );
+   ] );
 
// Initialize error variable
$this->centralNoticeError = false;
@@ -94,24 +94,24 @@
$out->addWikiMsg( 'centralnotice-summary' );
 
// Begin Banners tab content
-   $out->addHTML( Html::openElement( 'div', array( 'id' => 
'preferences' ) ) );
+   $out->addHTML( Html::openElement( 'div', [ 'id' => 
'preferences' ] ) );
 
$htmlOut = '';
 
// Begin Allocation selection fieldset
-   $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 
'prefsection' ) );
+   $htmlOut .= Html::openElement( 'fieldset', [ 'class' => 
'prefsection' ] );
 
-   $htmlOut .= Html::openElement( 'form', array( 'method' => 'get' 
) );
-   $htmlOut .= Html::element( 'h2', array(), $this->msg( 
'centralnotice-view-allocation' )->text() );
+   $htmlOut .= Html::openElement( 'form', [ 'method' => 'get' ] );
+   $htmlOut .= Html::element( 'h2', [], $this->msg( 
'centralnotice-view-allocation' )->text() );
$htmlOut .= Xml::tags( 'p', null, $this->msg( 
'centralnotice-allocation-instructions' )->text() );
 
-   $htmlOut .= Html::openElement( 'table', array( 'id' => 
'envpicker', 'cellpadding' => 7 ) );
+   $htmlOut .= Html::openElement( 'table', [ 'id' => 'envpicker', 
'cellpadding' => 7 ] );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
-   array( 'style' => 'width: 20%;' ),
+   [ 'style' => 'width: 20%;' ],
$this->msg( 'centralnotice-project-name' )->text() );
$htmlOut .= Html::openElement( 'td' );
-   $htmlOut .= Html::openElement( 'select', array( 'name' => 
'project' ) );
+   $htmlOut .= Html::openElement( 'select', [ 'name' => 'project' 
] );
 
foreach ( $wgNoticeProjects as $value ) {
$htmlOut .= Xml::option( $value, $value, $value === 
$this->project );
@@ -122,7 +122,7 @@
$htmlOut .= Html::closeElement( 'tr' );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
-   array( 'valign' => 'top' ),
+   [ 'valign' => 'top' ],
$this->msg( 'centralnotice-project-lang' )->text() );
$htmlOut .= Html::openElement( 'td' );
 
@@ -136,7 +136,7 @@
 
ksort( $languages );
 
-   $htmlOut .= Html::openElement( 'select', array( 'name' => 
'language' ) );
+   $htmlOut .= Html::openElement( 'select', [ 'name' => 'language' 
] );
 
foreach ( $languages as $code => $name ) {
$htmlOut .= Xml::option(
@@ -148,13 +148,13 @@
$htmlOut .= Html::closeElement( 'td' );
$htmlOut .= Html::closeElement( 'tr' );
$htmlOut .= Html::openElement( 'tr' );
-   $htmlOut .= Xml::tags( 'td', array(), $this->msg( 
'centralnotice-country' )->text() );
+   $htmlOut .= Xml::tags( 'td', [], $this->msg( 
'centralnotice-country' )->text() );
$htmlOut .= Html::openElement( 'td' );
 
$userLanguageCode = $this->getLanguage()->getCode();
$countries = GeoTarget::getCountriesList( $userLanguageCode );
 
-   $htmlOut .= Html::openElement( 'select', array( 'name' => 
'country' ) );
+   $htmlOut .= Html::openElement( 'select', [ 'name' => 'country' 
] );
 
foreach ( $countries as $code => $name ) {
$htmlOut .= Xml::option( $name, $code, $code 

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use short array syntax - api / tests

2017-06-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358051 )

Change subject: Use short array syntax - api / tests
..

Use short array syntax - api / tests

Change-Id: I0e23bb8eee6d123b6a2609623b91b9f2342760e4
---
M api/ApiCentralNoticeChoiceData.php
M api/ApiCentralNoticeLogs.php
M api/ApiCentralNoticeQueryCampaign.php
M tests/ApiCentralNoticeChoiceDataTest.php
M tests/BannerTest.php
M tests/CNChoiceDataResourceLoaderModuleTest.php
M tests/CNTestFixturesResourceLoaderModule.php
M tests/CentralNoticeTest.php
M tests/CentralNoticeTestFixtures.php
M tests/HistoryTest.php
10 files changed, 102 insertions(+), 102 deletions(-)


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

diff --git a/api/ApiCentralNoticeChoiceData.php 
b/api/ApiCentralNoticeChoiceData.php
index a552def..0c01747 100644
--- a/api/ApiCentralNoticeChoiceData.php
+++ b/api/ApiCentralNoticeChoiceData.php
@@ -50,23 +50,23 @@
}
 
public function getAllowedParams() {
-   return array(
-   'project' => array(
+   return [
+   'project' => [
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
-   ),
-   'language' => array(
+   ],
+   'language' => [
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
-   )
-   );
+   ]
+   ];
}
 
protected function getExamplesMessages() {
-   return array(
+   return [

'action=centralnoticechoicedata=wikipedia=en'
=> 'apihelp-centralnoticechoicedata-example-1'
-   );
+   ];
}
 
/**
@@ -80,7 +80,7 @@
 * @return string The sanitized value
 */
protected static function sanitizeText( $param, $regex, $default = null 
) {
-   $matches = array();
+   $matches = [];
 
if ( preg_match( $regex, $param, $matches ) ) {
return $matches[ 0 ];
diff --git a/api/ApiCentralNoticeLogs.php b/api/ApiCentralNoticeLogs.php
index 6176121..083adbd 100644
--- a/api/ApiCentralNoticeLogs.php
+++ b/api/ApiCentralNoticeLogs.php
@@ -26,45 +26,45 @@
 
$logs = Campaign::campaignLogs( $campaign, $user, $start, $end, 
$limit, $offset );
 
-   $result->addValue( array( 'query', $this->getModuleName() ), 
'logs', $logs );
+   $result->addValue( [ 'query', $this->getModuleName() ], 'logs', 
$logs );
}
 
public function getAllowedParams() {
-   return array(
-   'campaign' => array(
+   return [
+   'campaign' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'user' => array(
+   ],
+   'user' => [
ApiBase::PARAM_TYPE => 'string',
-   ),
-   'limit' => array(
+   ],
+   'limit' => [
ApiBase::PARAM_DFLT => 50,
ApiBase::PARAM_TYPE => 'limit',
ApiBase::PARAM_MIN  => 1,
ApiBase::PARAM_MAX  => ApiBase::LIMIT_BIG1,
ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
-   ),
-   'offset' => array(
+   ],
+   'offset' => [
ApiBase::PARAM_DFLT => 0,
ApiBase::PARAM_TYPE => 'integer',
-   ),
-   'start' => array(
+   ],
+   'start' => [
ApiBase::PARAM_TYPE => 'timestamp',
-   ),
-   'end' => array(
+   ],
+   'end' => [
ApiBase::PARAM_TYPE => 'timestamp',
-   ),
-   );
+   ],
+   ];
}
 
/**
 * @see ApiBase::getExamplesMessages()
 */
protected function getExamplesMessages() {
-   return array(
+   return [
'action=query=centralnoticelogs=json'
=> 'apihelp-query+centralnoticelogs-example-1',
-   );
+   ];
}
 
/**
@@ -78,7 +78,7 

  1   2   3   >