Brion VIBBER has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354607 )
Change subject: Add \b to regexes in BlockLevelPass to avoid confusing tr &
track
..
Add \b to regexes in BlockLevelPass to avoid confusing tr & track
With TimedMediaHandler in video.js mode, videos can be inline,
without a wrapper div.
Previously, in this mode two paragraphs where one contained a
video would end up merged into one paragraph, due to BlockLevelPass
matching "" against "
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354606 )
Change subject: Use normalized key for supplemental_address_1
..
Use normalized key for supplemental_address_1
Change-Id: If176acf49f515956c97541139fbe9d66d790952a
---
M adyen_gateway/BlankAddressFields.php
M adyen_gateway/config/var_map.yaml
M gateway_common/DonationData.php
M gateway_common/DonationQueue.php
M gateway_common/donation.api.php
M gateway_common/i18n/interface/af.json
M gateway_common/i18n/interface/ast.json
M gateway_common/i18n/interface/ba.json
M gateway_common/i18n/interface/bg.json
M gateway_common/i18n/interface/cs.json
M gateway_common/i18n/interface/cy.json
M gateway_common/i18n/interface/de.json
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/es.json
M gateway_common/i18n/interface/fr.json
M gateway_common/i18n/interface/gl.json
M gateway_common/i18n/interface/he.json
M gateway_common/i18n/interface/it.json
M gateway_common/i18n/interface/ka.json
M gateway_common/i18n/interface/ksh.json
M gateway_common/i18n/interface/lij.json
M gateway_common/i18n/interface/lt.json
M gateway_common/i18n/interface/mk.json
M gateway_common/i18n/interface/nb.json
M gateway_common/i18n/interface/nl.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/pt.json
M gateway_common/i18n/interface/qqq.json
M gateway_common/i18n/interface/roa-tara.json
M gateway_common/i18n/interface/ru.json
M gateway_common/i18n/interface/sv.json
M gateway_common/i18n/interface/uk.json
M gateway_common/i18n/interface/vi.json
M gateway_common/i18n/interface/zh-hans.json
M tests/phpunit/DonationDataTest.php
35 files changed, 37 insertions(+), 38 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/06/354606/1
diff --git a/adyen_gateway/BlankAddressFields.php
b/adyen_gateway/BlankAddressFields.php
index a4675ca..a440c15 100644
--- a/adyen_gateway/BlankAddressFields.php
+++ b/adyen_gateway/BlankAddressFields.php
@@ -11,7 +11,7 @@
'city',
'state',
'street',
- 'street_supplemental',
+ 'supplemental_address_1',
'postal_code',
);
diff --git a/adyen_gateway/config/var_map.yaml
b/adyen_gateway/config/var_map.yaml
index 5fae1d1..7629aca 100644
--- a/adyen_gateway/config/var_map.yaml
+++ b/adyen_gateway/config/var_map.yaml
@@ -4,7 +4,7 @@
billingAddress.postalCode: postal_code
billingAddress.stateOrProvince: state
billingAddress.street: street
-billingAddress.houseNumberOrName: street_supplemental
+billingAddress.houseNumberOrName: supplemental_address_1
billingAddressType: billing_address_type
blockedMethods: blocked_methods
card.cardHolderName: full_name
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index bfd3178..d7a7ac8 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -46,7 +46,7 @@
'fname',
'lname',
'street',
- 'street_supplemental',
+ 'supplemental_address_1',
'city',
'state',
'postal_code',
@@ -917,7 +917,7 @@
'fname',
'lname',
'street',
- 'street_supplemental',
+ 'supplemental_address_1',
'city',
'state',
'country',
diff --git a/gateway_common/DonationQueue.php b/gateway_common/DonationQueue.php
index a32df89..890a188 100644
--- a/gateway_common/DonationQueue.php
+++ b/gateway_common/DonationQueue.php
@@ -178,7 +178,7 @@
'risk_score' => 'risk_score',
'state_province' => 'state',
'street_address' => 'street',
- 'supplemental_address_1' => 'street_supplemental',
+ 'supplemental_address_1' => 'supplemental_address_1',
'subscr_id' => 'subscr_id',
'utm_campaign' => 'utm_campaign',
'utm_medium' => 'utm_medium',
@@ -217,7 +217,6 @@
'last_name' => 'lname',
'state_province' => 'state',
'street_address' => 'street',
- 'supplemental_address_1' => 'street_supplemental',
);
foreach ( $rekey as $wire => $normal ){
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index 16c82c6..df596ad 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -122,7 +122,7 @@
'fname' => $this->defineParam( false ),
'lname' => $this->defineParam( false ),
'street' =>
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354603 )
Change subject: wikistats: ensure systemuser exists before backup dir
..
wikistats: ensure systemuser exists before backup dir
Change-Id: Ic1fa990a236b8b0fc76767de7eda72058736796b
---
M modules/wikistats/manifests/init.pp
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Paladox: Looks good to me, but someone else must approve
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index 6963ce2..c3e30f1 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -37,7 +37,10 @@
# directory used by deploy-script to store backups
file { '/usr/lib/wikistats/backup':
-ensure => 'directory',
+ensure => 'directory',
+owner => 'wikistatsuser',
+group => 'wikistatsuser',
+require => User['wikistatsuser'],
}
file { '/usr/local/bin/wikistats':
--
To view, visit https://gerrit.wikimedia.org/r/354603
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1fa990a236b8b0fc76767de7eda72058736796b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
Gerrit-Reviewer: Paladox
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354605 )
Change subject: WIP consolidate queue message generation.
..
WIP consolidate queue message generation.
Pretty silly to have two functions that massage the same thing.
Unfortunately, this breaks things due to mismatched keys. We need
to start using the same keys everywhere.
Bug: T95647
Change-Id: Icffc82d2a14c4e86a705b053a644ce4476f6e33f
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M gateway_common/DonationData.php
M gateway_common/DonationQueue.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/orphan.adapter.php
6 files changed, 61 insertions(+), 132 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/05/354605/1
diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index b1ddad6..2fe5d42 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -215,8 +215,8 @@
* whether to capture the payment or leave it for manual review.
* @return array
*/
- protected function getStompTransaction() {
- $transaction = parent::getStompTransaction();
+ protected function getQueueDonationMessage() {
+ $transaction = parent::getQueueDonationMessage();
$transaction['risk_score'] = $this->risk_score;
return $transaction;
}
diff --git a/amazon_gateway/amazon.adapter.php
b/amazon_gateway/amazon.adapter.php
index 8a7d675..3ff8d6c 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -199,7 +199,7 @@
) );
// Stash their info in pending queue and logs to fill in data
for
// audit and IPN messages
- $details = $this->getStompTransaction();
+ $details = $this->getQueueDonationMessage();
$this->logger->info( 'Got info for Amazon donation: ' .
json_encode( $details ) );
$this->sendPendingMessage();
}
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index bfd3178..6347d08 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -908,7 +908,6 @@
'contribution_tracking_id',
'optout',
'anonymous',
- 'size',
'utm_source',
'utm_medium',
'utm_campaign',
diff --git a/gateway_common/DonationQueue.php b/gateway_common/DonationQueue.php
index a32df89..e987e1b 100644
--- a/gateway_common/DonationQueue.php
+++ b/gateway_common/DonationQueue.php
@@ -34,12 +34,12 @@
return $sourceRevision;
}
- public function push( $transaction, $queue ) {
+ public function push( $message, $queue ) {
// TODO: This should be checked once, at a higher level.
if ( !GatewayAdapter::getGlobal( 'EnableQueue' ) ) {
return;
}
- $message = $this->buildBody( $transaction );
+ SourceFields::addToMessage( $message );
$this->newBackend( $queue )->push( $message );
}
@@ -59,25 +59,6 @@
$backend = $this->newBackend( $queue );
return $backend->peek();
- }
-
- /**
-* Build a body string, given a donation data array
-*
-* @param array $transaction
-*
-* @return array Message body. Note that we aren't json_encoding here,
cos
-* PHPQueue expects an array.
-*/
- protected function buildBody( $transaction ) {
- if ( array_key_exists( 'freeform', $transaction ) &&
$transaction['freeform'] ) {
- $data = $transaction;
- } else {
- // Assume anything else is a regular donation.
- $data = $this->buildTransactionMessage( $transaction );
- }
- SourceFields::addToMessage( $data );
- return $data;
}
/**
@@ -119,81 +100,6 @@
throw new RuntimeException( "Queue backend class not
found: [$className]" );
}
return new $className( $serverConfig );
- }
-
- /**
-* Assign correct values to the array of data to be sent to the
ActiveMQ server
-* TODO: Probably something else. I don't like the way this works and
neither do you.
-*
-* Older notes follow:
-* Currency in receiving module has currency set to USD, should take
passed variable for these
-* PAssed both ISO and country code, no need to look up
-* 'gateway' = globalcollect, e.g.
-* 'date' is sent as
Srishakatux has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354604 )
Change subject: Fixed the where condition in the NewsletterEditPage.php
..
Fixed the where condition in the NewsletterEditPage.php
Bug: T159081
Change-Id: I87185b8f17a07f20f91922d32f852b31a83719c7
---
M includes/NewsletterEditPage.php
1 file changed, 8 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/04/354604/1
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index 7a87c8d..06d2d16 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -209,19 +209,18 @@
}
$mainPageId = $data['MainPage']->getArticleID();
-
$dbr = wfGetDB( DB_SLAVE );
$rows = $dbr->select(
'nl_newsletters',
[ 'nl_name', 'nl_main_page_id', 'nl_active' ],
- $dbr->makeList(
- [
- 'nl_name' => $data['Name'],
- 'nl_main_page_id' => $mainPageId,
- 'nl_active' => 1
- ],
- LIST_OR
- )
+ $dbr->makeList([
+ 'nl_name' => $data['Name'],
+ $dbr->makeList(
+ [
+ 'nl_main_page_id' =>
$mainPageId,
+ 'nl_active' => 1
+ ], LIST_AND )
+ ], LIST_OR )
);
// Check whether another existing newsletter has the same name
or main page
foreach ( $rows as $row ) {
--
To view, visit https://gerrit.wikimedia.org/r/354604
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I87185b8f17a07f20f91922d32f852b31a83719c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Srishakatux
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354598 )
Change subject: Hack around icu breakage for fa sorting
..
Hack around icu breakage for fa sorting
Bug: T139110
Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1
---
M includes/collation/CollationFa.php
1 file changed, 19 insertions(+), 13 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/collation/CollationFa.php
b/includes/collation/CollationFa.php
index 9cce087..f8506d7 100644
--- a/includes/collation/CollationFa.php
+++ b/includes/collation/CollationFa.php
@@ -21,30 +21,36 @@
/**
* Temporary workaround for incorrect collation of Persian language ('fa') in
ICU 52 (bug T139110).
*
- * All of the following will be considered separate letters for category
headings in Persian:
+ * Replace with other letters that appear in an okish spot in the alphabet
+ *
* - Characters 'و' 'ا' (often appear at the beginning of words)
* - Characters 'ٲ' 'ٳ' (may appear at the beginning of words in loanwords)
- * - Characters 'ء' 'ئ' (don't appear at the beginning of words, but it's
easier to implement)
*
* @since 1.29
*/
class CollationFa extends IcuCollation {
- private $tertiaryCollator;
+
+ // Really hacky - replace with stuff from other blocks.
+ private $override = [
+ "\xd8\xa7" => "\u{0621}",
+ "\xd9\x88" => "\u{0649}",
+ "\xd9\xb2" => "\xF3\xB3\x80\x81",
+ "\xd9\xb3" => "\xF3\xB3\x80\x82",
+ ];
public function __construct() {
parent::__construct( 'fa' );
- $this->tertiaryCollator = Collator::create( 'fa' );
}
- public function getPrimarySortKey( $string ) {
- $primary = parent::getPrimarySortKey( $string );
- // We have to use a tertiary sortkey for everything with the
primary sortkey of 2627.
- // Otherwise, the "Remove duplicate prefixes" logic in
IcuCollation would remove them.
- // This matches sortkeys for the following characters: ء ئ ا و
ٲ ٳ
- if ( substr( $primary, 0, 2 ) === "\x26\x27" ) {
- wfDebug( "Using tertiary sortkey for '$string'\n" );
- return $this->tertiaryCollator->getSortKey( $string );
+ public function getSortKey( $string ) {
+ $modified = strtr( $string, $this->override );
+ return parent::getSortKey( $modified );
+ }
+
+ public function getFirstLetter( $string ) {
+ if ( isset( $this->override[substr( $string, 0, 2 )] ) ) {
+ return substr( $string, 0, 2 );
}
- return $primary;
+ return parent::getFirstLetter( $string );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff
Gerrit-Reviewer: Bartosz Dziewoński
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Dzahn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354603 )
Change subject: wikistats: puppetize missing dir in /usr/lib/
..
wikistats: puppetize missing dir in /usr/lib/
Change-Id: Ic1fa990a236b8b0fc76767de7eda72058736796b
---
M modules/wikistats/manifests/init.pp
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/03/354603/1
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index 6963ce2..bbc7d95 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -36,9 +36,11 @@
}
# directory used by deploy-script to store backups
-file { '/usr/lib/wikistats/backup':
+file { ['/usr/lib/wikistats', '/usr/lib/wikistats/backup']:
ensure => 'directory',
-}
+owner => 'wikistatsuser',
+group => 'wikistatsuser',
+}
file { '/usr/local/bin/wikistats':
ensure => 'directory',
--
To view, visit https://gerrit.wikimedia.org/r/354603
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1fa990a236b8b0fc76767de7eda72058736796b
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
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354599 )
Change subject: Refactor example skin to use single echo statement
..
Refactor example skin to use single echo statement
Change-Id: I9d92ddf2011a2904f4c9aaee4a3286e0b21877ad
---
M ExampleTemplate.php
1 file changed, 145 insertions(+), 100 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 5cfe714..48ebb4e 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -9,117 +9,78 @@
* Outputs the entire contents of the page
*/
public function execute() {
- $this->html( 'headelement' );
- ?>
-
-
- data['sitenotice'] ) {
- echo Html::rawElement(
- 'div',
- array( 'id' => 'siteNotice' ),
- $this->get( 'sitenotice' )
- );
- }
- if ( $this->data['newtalk'] ) {
- echo Html::rawElement(
- 'div',
- array( 'class' => 'usermessage'
),
- $this->get( 'newtalk' )
- );
- }
- echo $this->getIndicators();
- echo Html::rawElement(
- 'h1',
- array(
+ $html = '';
+ $html .= $this->get( 'headelement' );
+
+ $html .= Html::rawElement( 'div', [ 'id' => 'mw-wrapper' ],
+ Html::rawElement( 'div', [ 'class' => 'mw-body', 'role'
=> 'main' ],
+ $this->getSiteNotice() .
+ $this->getNewTalk() .
+ $this->getIndicators() .
+ Html::rawElement( 'h1',
+ [
'class' => 'firstHeading',
'lang' => $this->get(
'pageLanguage' )
- ),
+ ],
$this->get( 'title' )
- );
-
- echo Html::rawElement(
- 'div',
- array( 'id' => 'siteSub' ),
+ ) .
+ Html::rawElement( 'div', [ 'id' => 'siteSub' ],
$this->getMsg( 'tagline' )->parse()
- );
- ?>
-
-
-'contentSub' )
- );
- if ( $this->data['subtitle'] ) {
- echo Html::rawelement (
+ ) .
+ Html::rawElement( 'div', [ 'class' =>
'mw-body-content' ],
+ Html::rawElement( 'div', [ 'id' =>
'contentSub' ],
+ $this->getPageSubtitle() .
+ Html::rawelement (
'p',
[],
- $this->get( 'subtitle' )
- );
- }
- echo Html::rawelement (
- 'p',
- [],
- $this->get( 'undelete' )
- );
- echo Html::closeElement( 'div' );
-
- $this->html( 'bodycontent' );
- echo $this->getClear();
- echo Html::rawElement(
- 'div',
- array( 'class' => 'printfooter'
),
+ $this->get( 'undelete' )
+ )
+
Brian Wolff has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354602 )
Change subject: Fix EnhancedChangesList::getDiffHistLinks null exception
..
Fix EnhancedChangesList::getDiffHistLinks null exception
If a page is deleted, rc_cur_id is missing, but it takes
a while before job queue deletes RC entries. If we encounter
something like that, just skip it since its bound for
deletion anyways.
Bug: T164059
Change-Id: I286109a9707e54939c0da31656ef54fd29acf481
---
M includes/changes/EnhancedChangesList.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/02/354602/1
diff --git a/includes/changes/EnhancedChangesList.php
b/includes/changes/EnhancedChangesList.php
index b8a2ac8..b493315 100644
--- a/includes/changes/EnhancedChangesList.php
+++ b/includes/changes/EnhancedChangesList.php
@@ -712,6 +712,11 @@
if ( $rc->getAttribute( 'rc_type' ) == RC_CATEGORIZE ) {
// For categorizations we must swap the category title
with the page title!
$pageTitle = Title::newFromID( $rc->getAttribute(
'rc_cur_id' ) );
+ if ( !$pageTitle ) {
+ // The page has been deleted, but the RC entry
+ // deletion job has not run yet. Just skip.
+ return;
+ }
}
$retVal = ' ' . $this->msg( 'parentheses' )
--
To view, visit https://gerrit.wikimedia.org/r/354602
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I286109a9707e54939c0da31656ef54fd29acf481
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
TheDJ has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354601 )
Change subject: [WIP] Update to VideoJS v6
..
[WIP] Update to VideoJS v6
- update to video.js 6.10 (pre-release)
- remove the replay button plugin (now native)
- has hardcoded changes for videojs/video.js#4371
Bug: T165815
Change-Id: Ia1c16a4fab9af0481487f75c32d3ab1a191e555f
---
M Gruntfile.js
M TimedMediaHandler.hooks.php
M package.json
M resources/ext.tmh.player.js
M resources/mw-info-button/mw-info-button.js
D resources/videojs-replay/lang/en.js
D resources/videojs-replay/videojs-replay.css
D resources/videojs-replay/videojs-replay.js
M resources/videojs-resolution-switcher/videojs-resolution-switcher.css
M resources/videojs-resolution-switcher/videojs-resolution-switcher.js
A resources/videojs-responsive-layout/videojs-responsive-layout.min.js
M resources/videojs/lang/de.js
M resources/videojs/lang/el.js
M resources/videojs/lang/en.js
M resources/videojs/lang/es.js
M resources/videojs/lang/fr.js
A resources/videojs/lang/pt-PT.js
M resources/videojs/lang/ru.js
M resources/videojs/lang/tr.js
M resources/videojs/lang/uk.js
M resources/videojs/lang/vi.js
M resources/videojs/lang/zh-TW.js
M resources/videojs/video-js.css
D resources/videojs/video-js.swf
M resources/videojs/video.js
25 files changed, 13,964 insertions(+), 11,273 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler
refs/changes/01/354601/1
--
To view, visit https://gerrit.wikimedia.org/r/354601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1c16a4fab9af0481487f75c32d3ab1a191e555f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Nemo bis has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354600 )
Change subject: Remove $wgEnableValidationStatisticsUpdates from FlaggedRevs
config
..
Remove $wgEnableValidationStatisticsUpdates from FlaggedRevs config
This configuration setting does not exist in the current code.
Change-Id: Ifcc67dd15491378ee6548afdcbe150d748d826d3
---
M wmf-config/flaggedrevs.php
1 file changed, 0 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/00/354600/1
diff --git a/wmf-config/flaggedrevs.php b/wmf-config/flaggedrevs.php
index 9982e90..4fdb13c 100644
--- a/wmf-config/flaggedrevs.php
+++ b/wmf-config/flaggedrevs.php
@@ -24,8 +24,6 @@
$wgGroupPermissions['sysop']['stablesettings'] = false; // -aaron 3/20/10
-$wgEnableValidationStatisticsUpdates = false;
-
///
// Wiki-specific configurations
--
To view, visit https://gerrit.wikimedia.org/r/354600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcc67dd15491378ee6548afdcbe150d748d826d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Nemo bis
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354593 )
Change subject: Fix crasher introduced in d722f895
..
Fix crasher introduced in d722f895
* The old code would send, say, {{デフォルトソート:あきやま とくそう}}
off for expansion, which would return
{{DEFAULTSORT:あきやまとくそう}}. This time around,
resolveTemplateTarget would recognize that as a masquerading
magicWordType and do the expected thing.
* The new code determines beforehand that it's a masq, and so must
provide the canonical name to be added as the page property. If not,
by the time we get to the tree builder, the token is expected to have
typeof and crashes without it.
Change-Id: Ia2035f3eb26f2bb8a24d2bde5fe9f4a1c6c755d6
---
M lib/wt2html/tt/TemplateHandler.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/wt2html/tt/TemplateHandler.js
b/lib/wt2html/tt/TemplateHandler.js
index 82bcfcf..cbeaecb 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -503,7 +503,7 @@
return {
isPF: true,
- prefix: prefix,
+ prefix: canonicalFunctionName,
magicWordType: magicWordType,
target: 'pf_' + canonicalFunctionName,
pfArg: target.substr(prefix.length + 1),
--
To view, visit https://gerrit.wikimedia.org/r/354593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2035f3eb26f2bb8a24d2bde5fe9f4a1c6c755d6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra
Gerrit-Reviewer: Subramanya Sastry
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/336103 )
Change subject: [IMPR] Use bot classes for table2wiki.py
..
[IMPR] Use bot classes for table2wiki.py
- Remove -skip option which doesn't work for a very long time ago
- rename -auto option with -always and -sql wiht -mysqlquery which
we use for other bots and print a deprecation warning when the old
options are used.
- a new option -skipwarning skips pages with warnings. The old settings
table2wikiAskOnlyWarnings and table2wikiSkipWarnings are deleted
- use treat_page method instead of treat
- use pagegenerators for -namespace option
- use positional_arg_name with 'page' as default
- a new tools method has_module() to check whether a library can be imported
- docs added
Change-Id: Ie50078ae3315ba8ba70946b889a31e403c998dd7
---
M pywikibot/config2.py
M pywikibot/tools/__init__.py
M scripts/table2wiki.py
3 files changed, 115 insertions(+), 134 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 85ad1a7..9f732f2 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -661,9 +661,6 @@
# sometimes HTML-tables are indented for better reading.
# That can do very ugly results.
deIndentTables = True
-# table2wiki.py works quite stable, so you might switch to True
-table2wikiAskOnlyWarnings = True
-table2wikiSkipWarnings = False
# # WEBLINK CHECKER SETTINGS ##
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index c89bd6a..7e1c9c1 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -155,6 +155,16 @@
count = itertools.count
+def has_module(module):
+"""Check whether a module can be imported."""
+try:
+__import__(module)
+except ImportError:
+return False
+else:
+return True
+
+
def empty_iterator():
# http://stackoverflow.com/a/13243870/473890
"""An iterator which does nothing."""
diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py
index b2527f7..82dba5b 100644
--- a/scripts/table2wiki.py
+++ b/scripts/table2wiki.py
@@ -7,32 +7,22 @@
--xml Retrieve information from a local XML dump (pages_current,
see
- http://download.wikimedia.org).
+-always The bot won't ask for confirmation when putting a page
+
+-skipwarning Skip processing a page when a warning occurred.
+ Only used when -always is or becomes True.
+
+-quietDon't show diffs in -always mode
+
+-mysqlquery Retrieve information from a local mirror.
+ Searches for pages with HTML tables, and tries to convert
+ them on the live wiki.
+
+-xml Retrieve information from a local XML dump
+ (pages_current, see http://download.wikimedia.org).
Argument can also be given as "-xml:filename".
- Searches for pages with HTML tables, and tries to convert
them
- on the live wiki.
-
--sql Retrieve information from a local mirror.
- Searches for pages with HTML tables, and tries to convert
them
- on the live wiki.
-
--namespace:n Number or name of namespace to process. The parameter can be
- used multiple times. It works in combination with all other
- parameters, except for the -start parameter. If you e.g.
- want to iterate over all categories starting at M, use
- -start:Category:M.
-
-This SQL query can be used to find pages to work on:
-
- SELECT CONCAT('[[', cur_title, ']]')
- FROM cur
- WHERE (cur_text LIKE '%
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354594 )
Change subject: Handle `$this->data['language_urls'] === false` specially
..
Handle `$this->data['language_urls'] === false` specially
Per 53ab861a2fcba98d876e5a2be5af7bc7186b880c, extensions can set this
to an empty array to have the sidebar section displayed even if it has
no items. Wikidata and UniversalLanguageSelector rely on this.
Change-Id: I7037b4fac973bdcc1e21484c8039ceb7e33f8195
---
M TimelessTemplate.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Isarra: Looks good to me, approved
diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index a4b5c2a..6a45282 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -612,7 +612,7 @@
];
// Goes in the page-primary in mobile, doesn't appear otherwise
- if ( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] !== false ) {
$pileOfTools['languages'] = [
'text' => $this->getMsg( 'timeless-languages'
)->escaped(),
'id' => 'ca-languages',
@@ -821,7 +821,7 @@
} else {
$variants = '';
}
- if ( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] !== false ) {
$html .= $this->getSidebarChunk(
'other-languages',
@@ -829,7 +829,7 @@
$variants .
$this->getPortlet(
'lang',
- $this->data['language_urls'],
+ $this->data['language_urls'] ?: [],
'otherlanguages'
)
);
--
To view, visit https://gerrit.wikimedia.org/r/354594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7037b4fac973bdcc1e21484c8039ceb7e33f8195
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński
Gerrit-Reviewer: Isarra
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354597 )
Change subject: Added license header to NewsletterEditPage.php
..
Added license header to NewsletterEditPage.php
Bug:T159081
Change-Id: I85460bc3dd602a210c1ba55b9d415250576d2dc8
---
M includes/NewsletterEditPage.php
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
01tonythomas: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index c629a17..7a87c8d 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -1,5 +1,10 @@
https://gerrit.wikimedia.org/r/354597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85460bc3dd602a210c1ba55b9d415250576d2dc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Srishakatux
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354454 )
Change subject: flake8: Fix C408 errors
..
flake8: Fix C408 errors
Bug: T165701
Change-Id: Iaa142d4c947a86a7dd158aa3d6ce91265b48b7fb
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/pagegenerators.py
M pywikibot/site.py
M pywikibot/textlib.py
M pywikibot/tools/formatter.py
M pywikibot/userinterfaces/gui.py
M pywikibot/version.py
M scripts/archive/featured.py
M scripts/blockpageschecker.py
M scripts/checkimages.py
M scripts/claimit.py
M scripts/harvest_template.py
M scripts/imagetransfer.py
M scripts/patrol.py
M scripts/standardize_interwiki.py
M scripts/welcome.py
M tests/family_tests.py
M tests/pagegenerators_tests.py
M tests/tools_tests.py
M tests/ui_tests.py
M tests/wikibase_edit_tests.py
22 files changed, 117 insertions(+), 137 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 4f362af..e704023 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -3030,9 +3030,11 @@
# base login request
login_request = self.site._request(
use_get=False,
-parameters=dict(action='login',
-lgname=self.login_name,
-lgpassword=self.password))
+parameters={
+'action': 'login',
+'lgname': self.login_name,
+'lgpassword': self.password,
+})
if self.site.family.ldapDomain:
login_request['lgdomain'] = self.site.family.ldapDomain
@@ -3078,9 +3080,8 @@
'at least MediaWiki version 1.27.')
login_token_request = self.site._request(
use_get=False,
-parameters=dict(action='query',
-meta='tokens',
-type='login'))
+parameters={'action': 'query', 'meta': 'tokens', 'type': 'login'},
+)
login_token_result = login_token_request.submit()
return login_token_result['query']['tokens'].get('logintoken')
diff --git a/pywikibot/page.py b/pywikibot/page.py
index cb4a17a..8e4a40f 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3686,7 +3686,7 @@
self.aliases = {}
if 'aliases' in self._content:
for lang in self._content['aliases']:
-self.aliases[lang] = list()
+self.aliases[lang] = []
for value in self._content['aliases'][lang]:
self.aliases[lang].append(value['value'])
@@ -4267,7 +4267,7 @@
Sites should be a list, with values either
being Site objects, or dbNames.
"""
-data = list()
+data = []
for site in sites:
site = self.getdbName(site)
data.append({'site': site, 'title': ''})
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 5af0619..96f2100 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1287,8 +1287,10 @@
retrieved page will be downloaded.
"""
-kwargs = dict(recurse=recurse, total=total,
- content=content, namespaces=namespaces)
+kwargs = {
+'recurse': recurse, 'total': total,
+'content': content, 'namespaces': namespaces,
+}
if start:
kwargs['sortby'] = 'sortkey'
kwargs['startsort'] = start
@@ -2778,7 +2780,7 @@
if site is None:
site = pywikibot.Site()
repo = site.data_repository()
-dependencies = dict(endpoint=endpoint, entity_url=entity_url)
+dependencies = {'endpoint': endpoint, 'entity_url': entity_url}
if not endpoint or not entity_url:
dependencies['repo'] = repo
query_object = sparql.SparqlQuery(**dependencies)
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 0b15cb9..34a774a 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -226,7 +226,7 @@
self.id = id
if aliases is None:
-self.aliases = list()
+self.aliases = []
else:
self.aliases = aliases
@@ -258,7 +258,7 @@
alias += u' talk'
self.aliases = [alias]
else:
-self.aliases = list()
+self.aliases = []
else:
self.aliases = aliases
@@ -1540,11 +1540,9 @@
request = self._site._request(
expiry=pywikibot.config.API_config_expiry
if expiry is False else expiry,
-parameters=dict(
-action='query',
-meta='siteinfo',
-siprop=props
-)
+parameters={
+'action': 'query', 'meta': 'siteinfo', 'siprop': props,
+
Isarra has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354599 )
Change subject: Refactor example skin to use single echo statement
..
Refactor example skin to use single echo statement
Change-Id: I9d92ddf2011a2904f4c9aaee4a3286e0b21877ad
---
M ExampleTemplate.php
1 file changed, 144 insertions(+), 100 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example
refs/changes/99/354599/1
diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 5cfe714..1574aa7 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -9,117 +9,77 @@
* Outputs the entire contents of the page
*/
public function execute() {
- $this->html( 'headelement' );
- ?>
-
-
- data['sitenotice'] ) {
- echo Html::rawElement(
- 'div',
- array( 'id' => 'siteNotice' ),
- $this->get( 'sitenotice' )
- );
- }
- if ( $this->data['newtalk'] ) {
- echo Html::rawElement(
- 'div',
- array( 'class' => 'usermessage'
),
- $this->get( 'newtalk' )
- );
- }
- echo $this->getIndicators();
- echo Html::rawElement(
- 'h1',
- array(
+ $html = '';
+ $html .= $this->get( 'headelement' );
+
+ $html .= Html::rawElement( 'div', [ 'id' => 'mw-wrapper' ],
+ Html::rawElement( 'div', [ 'class' => 'mw-body', 'role'
=> 'main' ],
+ $this->getSiteNotice() .
+ $this->getNewTalk() .
+ $this->getIndicators() .
+ Html::rawElement( 'h1',
+ [
'class' => 'firstHeading',
'lang' => $this->get(
'pageLanguage' )
- ),
+ ],
$this->get( 'title' )
- );
-
- echo Html::rawElement(
- 'div',
- array( 'id' => 'siteSub' ),
+ ) .
+ Html::rawElement( 'div', [ 'id' => 'siteSub' ],
$this->getMsg( 'tagline' )->parse()
- );
- ?>
-
-
-'contentSub' )
- );
- if ( $this->data['subtitle'] ) {
- echo Html::rawelement (
+ ) .
+ Html::rawElement( 'div', [ 'class' =>
'mw-body-content' ],
+ Html::rawElement( 'div', [ 'id' =>
'contentSub' ],
+ $this->getPageSubtitle() .
+ Html::rawelement (
'p',
[],
- $this->get( 'subtitle' )
- );
- }
- echo Html::rawelement (
- 'p',
- [],
- $this->get( 'undelete' )
- );
- echo Html::closeElement( 'div' );
-
- $this->html( 'bodycontent' );
- echo $this->getClear();
- echo Html::rawElement(
- 'div',
- array( 'class' => 'printfooter'
),
+ $this->get( 'undelete' )
+ )
+
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354589 )
Change subject: jQuery3: size() -> length
..
jQuery3: size() -> length
Change-Id: I8627fced05c27ed3596f3915c9b72c25f13a2ed3
---
M resources/ext.tmh.player.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
TheDJ: Looks good to me, approved
diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js
index 51aa164..8e6f054 100755
--- a/resources/ext.tmh.player.js
+++ b/resources/ext.tmh.player.js
@@ -54,7 +54,7 @@
videoplayer = this,
$videoplayer = $( this );
- if ( $videoplayer.closest( '.video-js' ).size() ) {
+ if ( $videoplayer.closest( '.video-js' ).length ) {
// This player has already been transformed.
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/354589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8627fced05c27ed3596f3915c9b72c25f13a2ed3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ
Gerrit-Reviewer: TheDJ
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Brian Wolff has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354598 )
Change subject: Hack around icu breakage for fa sorting
..
Hack around icu breakage for fa sorting
Bug: T139110
Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1
---
M includes/collation/CollationFa.php
1 file changed, 19 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/98/354598/1
diff --git a/includes/collation/CollationFa.php
b/includes/collation/CollationFa.php
index 9cce087..f8506d7 100644
--- a/includes/collation/CollationFa.php
+++ b/includes/collation/CollationFa.php
@@ -21,30 +21,36 @@
/**
* Temporary workaround for incorrect collation of Persian language ('fa') in
ICU 52 (bug T139110).
*
- * All of the following will be considered separate letters for category
headings in Persian:
+ * Replace with other letters that appear in an okish spot in the alphabet
+ *
* - Characters 'و' 'ا' (often appear at the beginning of words)
* - Characters 'ٲ' 'ٳ' (may appear at the beginning of words in loanwords)
- * - Characters 'ء' 'ئ' (don't appear at the beginning of words, but it's
easier to implement)
*
* @since 1.29
*/
class CollationFa extends IcuCollation {
- private $tertiaryCollator;
+
+ // Really hacky - replace with stuff from other blocks.
+ private $override = [
+ "\xd8\xa7" => "\u{0621}",
+ "\xd9\x88" => "\u{0649}",
+ "\xd9\xb2" => "\xF3\xB3\x80\x81",
+ "\xd9\xb3" => "\xF3\xB3\x80\x82",
+ ];
public function __construct() {
parent::__construct( 'fa' );
- $this->tertiaryCollator = Collator::create( 'fa' );
}
- public function getPrimarySortKey( $string ) {
- $primary = parent::getPrimarySortKey( $string );
- // We have to use a tertiary sortkey for everything with the
primary sortkey of 2627.
- // Otherwise, the "Remove duplicate prefixes" logic in
IcuCollation would remove them.
- // This matches sortkeys for the following characters: ء ئ ا و
ٲ ٳ
- if ( substr( $primary, 0, 2 ) === "\x26\x27" ) {
- wfDebug( "Using tertiary sortkey for '$string'\n" );
- return $this->tertiaryCollator->getSortKey( $string );
+ public function getSortKey( $string ) {
+ $modified = strtr( $string, $this->override );
+ return parent::getSortKey( $modified );
+ }
+
+ public function getFirstLetter( $string ) {
+ if ( isset( $this->override[substr( $string, 0, 2 )] ) ) {
+ return substr( $string, 0, 2 );
}
- return $primary;
+ return parent::getFirstLetter( $string );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Srishakatux has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354597 )
Change subject: Added license header to NewsletterEditPage.php
..
Added license header to NewsletterEditPage.php
Bug:T159081
Change-Id: I85460bc3dd602a210c1ba55b9d415250576d2dc8
---
M includes/NewsletterEditPage.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/97/354597/1
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index c629a17..7a87c8d 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -1,5 +1,10 @@
https://gerrit.wikimedia.org/r/354597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85460bc3dd602a210c1ba55b9d415250576d2dc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Srishakatux
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Reedy has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354596 )
Change subject: Remove wikimedia-periodic-update.sh
..
Remove wikimedia-periodic-update.sh
Change-Id: I9fa798a13ee6a93cc5981e9f23e8860f6b8bacec
mediawiki::maintenance::update_flaggedrev_stats does this
---
D modules/mediawiki/files/maintenance/wikimedia-periodic-update.sh
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/96/354596/1
diff --git a/modules/mediawiki/files/maintenance/wikimedia-periodic-update.sh
b/modules/mediawiki/files/maintenance/wikimedia-periodic-update.sh
deleted file mode 100644
index 9eefb19..000
--- a/modules/mediawiki/files/maintenance/wikimedia-periodic-update.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-. /etc/profile.d/mediawiki.sh
-
-for db in `<"$MEDIAWIKI_DEPLOYMENT_DIR/dblists/flaggedrevs.dblist"`;do
- echo $db
- php $MEDIAWIKI_DEPLOYMENT_DIR/multiversion/MWScript.php
extensions/FlaggedRevs/maintenance/updateStats.php $db
-done
--
To view, visit https://gerrit.wikimedia.org/r/354596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fa798a13ee6a93cc5981e9f23e8860f6b8bacec
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Reedy
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354595 )
Change subject: BaseTemplate: Handle `$this->data['language_urls'] === false`
specially
..
BaseTemplate: Handle `$this->data['language_urls'] === false` specially
Per 53ab861a2fcba98d876e5a2be5af7bc7186b880c, extensions can set this
to an empty array to have the sidebar section displayed even if it has
no items. Wikidata and UniversalLanguageSelector rely on this.
Change-Id: I79cef25d79ed25fa6d96698a121c3105870e890b
---
M includes/skins/BaseTemplate.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/95/354595/1
diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index 5868904..e68969f 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -201,13 +201,13 @@
];
break;
case 'LANGUAGES':
- if ( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] !== false ) {
$msgObj = $this->getMsg(
'otherlanguages' );
$boxes[$boxName] = [
'id' => 'p-lang',
'header' => $msgObj->exists() ?
$msgObj->text() : 'otherlanguages',
'generated' => false,
- 'content' =>
$this->data['language_urls'],
+ 'content' =>
$this->data['language_urls'] ?: [],
];
}
break;
--
To view, visit https://gerrit.wikimedia.org/r/354595
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79cef25d79ed25fa6d96698a121c3105870e890b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354594 )
Change subject: Handle `$this->data['language_urls'] === false` specially
..
Handle `$this->data['language_urls'] === false` specially
Per 53ab861a2fcba98d876e5a2be5af7bc7186b880c, extensions can set this
to an empty array to have the sidebar section displayed even if it has
no items. Wikidata and UniversalLanguageSelector rely on this.
Change-Id: I7037b4fac973bdcc1e21484c8039ceb7e33f8195
---
M TimelessTemplate.php
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless
refs/changes/94/354594/1
diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index a4b5c2a..6a45282 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -612,7 +612,7 @@
];
// Goes in the page-primary in mobile, doesn't appear otherwise
- if ( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] !== false ) {
$pileOfTools['languages'] = [
'text' => $this->getMsg( 'timeless-languages'
)->escaped(),
'id' => 'ca-languages',
@@ -821,7 +821,7 @@
} else {
$variants = '';
}
- if ( $this->data['language_urls'] ) {
+ if ( $this->data['language_urls'] !== false ) {
$html .= $this->getSidebarChunk(
'other-languages',
@@ -829,7 +829,7 @@
$variants .
$this->getPortlet(
'lang',
- $this->data['language_urls'],
+ $this->data['language_urls'] ?: [],
'otherlanguages'
)
);
--
To view, visit https://gerrit.wikimedia.org/r/354594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7037b4fac973bdcc1e21484c8039ceb7e33f8195
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Arlolra has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354593 )
Change subject: Fix crasher introduced in d722f895
..
Fix crasher introduced in d722f895
Change-Id: Ia2035f3eb26f2bb8a24d2bde5fe9f4a1c6c755d6
---
M lib/wt2html/tt/TemplateHandler.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/93/354593/1
diff --git a/lib/wt2html/tt/TemplateHandler.js
b/lib/wt2html/tt/TemplateHandler.js
index 82bcfcf..cbeaecb 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -503,7 +503,7 @@
return {
isPF: true,
- prefix: prefix,
+ prefix: canonicalFunctionName,
magicWordType: magicWordType,
target: 'pf_' + canonicalFunctionName,
pfArg: target.substr(prefix.length + 1),
--
To view, visit https://gerrit.wikimedia.org/r/354593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2035f3eb26f2bb8a24d2bde5fe9f4a1c6c755d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354591 )
Change subject: wikistats: 'user' -> 'owner' parameter for /srv/wikistats
..
wikistats: 'user' -> 'owner' parameter for /srv/wikistats
Change-Id: I1d1d32eb974e609b294e381c58bd6d1cb312386b
---
M modules/wikistats/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Paladox: Looks good to me, but someone else must approve
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index c495169..6963ce2 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -31,7 +31,7 @@
file { '/srv/wikistats':
ensure => 'directory',
-user => 'wikistatsuser',
+owner => 'wikistatsuser',
group => 'wikistatsuser',
}
--
To view, visit https://gerrit.wikimedia.org/r/354591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d1d32eb974e609b294e381c58bd6d1cb312386b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
Gerrit-Reviewer: Paladox
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Hoo man has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354592 )
Change subject: Fix Closure detection in MediaWikiTestCase
..
Fix Closure detection in MediaWikiTestCase
Sometimes the closure are hidden in arrays, catch this.
The $maxDepth check is just for sanity, I don't think it's
actually needed.
Follows-Up: c2c7452577e
Bug: T111641
Change-Id: Id5e036ce4949b8106873fd938f54c2774d3d6a4a
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 23 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/92/354592/1
diff --git a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index 1114f2a..df3d568 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -1,6 +1,5 @@
mwGlobals[$globalKey] = clone
$GLOBALS[$globalKey];
- } elseif ( $GLOBALS[$globalKey] instanceof
Closure ) {
+ } elseif ( $this->containsClosure(
$GLOBALS[$globalKey] ) ) {
// Serializing Closure only gives a
warning on HHVM while
// it throws an Exception on Zend.
// Workaround for
https://github.com/facebook/hhvm/issues/6206
@@ -755,6 +754,28 @@
}
/**
+* @param mixed $var
+* @param int $maxDepth
+*
+* @return bool
+*/
+ private function containsClosure( $var, $maxDepth = 15 ) {
+ if ( $var instanceof Closure ) {
+ return true;
+ }
+ if ( !is_array( $var ) || $maxDepth === 0 ) {
+ return false;
+ }
+
+ foreach ( $var as $value ) {
+ if ( $this->containsClosure( $value, $maxDepth - 1 ) ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* Merges the given values into a MW global array variable.
* Useful for setting some entries in a configuration array, instead of
* setting the entire array.
--
To view, visit https://gerrit.wikimedia.org/r/354592
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5e036ce4949b8106873fd938f54c2774d3d6a4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Multichill has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354590 )
Change subject: Remove WDQ from pywikibot
..
Remove WDQ from pywikibot
Bug: T162585
Change-Id: I8dadf884b7255a1fb4af18c8892df3f8c443ab58
---
D pywikibot/data/wikidataquery.py
M pywikibot/pagegenerators.py
D tests/wikidataquery_tests.py
3 files changed, 0 insertions(+), 963 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/90/354590/1
diff --git a/pywikibot/data/wikidataquery.py b/pywikibot/data/wikidataquery.py
deleted file mode 100644
index f28a376..000
--- a/pywikibot/data/wikidataquery.py
+++ /dev/null
@@ -1,633 +0,0 @@
-# -*- coding: utf-8 -*-
-"""Objects representing WikidataQuery query syntax and API."""
-#
-# (C) Pywikibot team, 2013
-#
-# Distributed under the terms of the MIT license.
-from __future__ import absolute_import, unicode_literals
-
-import hashlib
-import json
-import os
-import pickle
-import sys
-import tempfile
-import time
-
-if sys.version_info[0] > 2:
-from urllib.parse import quote
-basestring = (str, )
-else:
-from urllib2 import quote
-
-import pywikibot
-
-from pywikibot.comms import http
-
-from pywikibot import config
-from pywikibot.page import ItemPage, PropertyPage, Claim
-
-
-def listify(x):
-"""
-If given a non-list, encapsulate in a single-element list.
-
-@rtype: list
-"""
-return x if isinstance(x, list) else [x]
-
-
-class QuerySet(object):
-
-"""
-A QuerySet represents a set of queries or other query sets.
-
-Queries may be joined by operators (AND and OR).
-
-A QuerySet stores this information as a list of Query(Sets) and
-a joiner operator to join them all together
-"""
-
-def __init__(self, q):
-"""
-Initialise a query set from a Query or another QuerySet.
-
-@type q: Query or QuerySet
-"""
-self.qs = [q]
-
-def addJoiner(self, args, joiner):
-"""
-Add to this QuerySet using the given joiner.
-
-If the given joiner is not the same as we used before in
-this QuerySet, nest the current one in parens before joining.
-This makes the implicit grouping of the API explicit.
-
-@return: a new query set representing the joining of this one and
-the arguments
-"""
-if len(self.qs) > 1 and joiner != self.joiner:
-left = QuerySet(self)
-else:
-left = self
-
-left.joiner = joiner
-
-for a in listify(args):
-left.qs.append(a)
-
-return left
-
-def AND(self, args):
-"""
-Add the given args (Queries or QuerySets) to the Query set as a
logical conjuction (AND).
-
-@type args: Query or QuerySet
-"""
-return self.addJoiner(args, "AND")
-
-def OR(self, args):
-"""
-Add the given args (Queries or QuerySets) to the Query set as a
logical disjunction (OR).
-
-@type args: Query or QuerySet
-"""
-return self.addJoiner(args, "OR")
-
-def __str__(self):
-"""
-Output as an API-ready string.
-
-@rtype: str
-"""
-def bracketIfQuerySet(q):
-if isinstance(q, QuerySet) and q.joiner != self.joiner:
-return "(%s)" % q
-else:
-return str(q)
-
-s = bracketIfQuerySet(self.qs[0])
-
-for q in self.qs[1:]:
-s += " %s %s" % (self.joiner, bracketIfQuerySet(q))
-
-return s
-
-def __repr__(self):
-"""Return a string representation."""
-return u"QuerySet(%s)" % self
-
-
-class Query(object):
-
-"""
-A query is a single query for the WikidataQuery API.
-
-For example:
-claim[100:60] or link[enwiki]
-
-Construction of a Query can throw a TypeError if you feed it bad
-parameters. Exactly what these need to be depends on the Query
-"""
-
-def AND(self, ands):
-"""
-Produce a query set ANDing this query and all the given query/sets.
-
-@type ands: Query or list of Query
-"""
-return QuerySet(self).addJoiner(ands, "AND")
-
-def OR(self, ors):
-"""
-Produce a query set ORing this query and all the given query/sets.
-
-@type ors: Query or list of Query
-"""
-return QuerySet(self).addJoiner(ors, "OR")
-
-def formatItem(self, item):
-"""
-Default item formatting is string.
-
-This will work for queries, querysets, ints and strings
-"""
-return str(item)
-
-def formatList(self, l):
-"""
-Format and comma-join a list.
-
-@type l: list
-"""
-return ",".join([self.formatItem(x) for x in l])
-
-@staticmethod
-def isOrContainsOnlyTypes(items, types):
-"""
-Either this item is one of the given types, or it is a
Dzahn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354591 )
Change subject: wikistats: 'user' -> 'owner' parameter for /srv/wikistats
..
wikistats: 'user' -> 'owner' parameter for /srv/wikistats
Change-Id: I1d1d32eb974e609b294e381c58bd6d1cb312386b
---
M modules/wikistats/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/91/354591/1
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index c495169..6963ce2 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -31,7 +31,7 @@
file { '/srv/wikistats':
ensure => 'directory',
-user => 'wikistatsuser',
+owner => 'wikistatsuser',
group => 'wikistatsuser',
}
--
To view, visit https://gerrit.wikimedia.org/r/354591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d1d32eb974e609b294e381c58bd6d1cb312386b
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
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354588 )
Change subject: wikistats: use systemuser for git cloning
..
wikistats: use systemuser for git cloning
Change-Id: I7a4c67af2fec7a26e380be8f43296bab64656df7
---
M modules/wikistats/manifests/init.pp
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index 4aa3215..c495169 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -31,6 +31,8 @@
file { '/srv/wikistats':
ensure => 'directory',
+user => 'wikistatsuser',
+group => 'wikistatsuser',
}
# directory used by deploy-script to store backups
@@ -57,6 +59,8 @@
ensure=> 'latest',
directory => '/srv/wikistats',
branch=> 'master',
+owner => 'wikistatsuser',
+group => 'wikistatsuser',
}
# webserver setup for wikistats
--
To view, visit https://gerrit.wikimedia.org/r/354588
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7a4c67af2fec7a26e380be8f43296bab64656df7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
TheDJ has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354589 )
Change subject: jQuery3: size() -> length
..
jQuery3: size() -> length
Change-Id: I8627fced05c27ed3596f3915c9b72c25f13a2ed3
---
M resources/ext.tmh.player.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler
refs/changes/89/354589/1
diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js
index 51aa164..8e6f054 100755
--- a/resources/ext.tmh.player.js
+++ b/resources/ext.tmh.player.js
@@ -54,7 +54,7 @@
videoplayer = this,
$videoplayer = $( this );
- if ( $videoplayer.closest( '.video-js' ).size() ) {
+ if ( $videoplayer.closest( '.video-js' ).length ) {
// This player has already been transformed.
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/354589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8627fced05c27ed3596f3915c9b72c25f13a2ed3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354587 )
Change subject: Use duplicates of core functions, with notes about when to
delete them and just use core
..
Use duplicates of core functions, with notes about when to delete them and
just use core
Also move getPortlet to the bottom before them, since it's NEXT. (Also fix
that error with that hook using renderafter instead of getafterportlet.)
Change-Id: I6efe32634557046cc904f801461c097656b90681
---
M ExampleTemplate.php
1 file changed, 174 insertions(+), 137 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 9490fee..5cfe714 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -66,7 +66,7 @@
echo Html::closeElement( 'div' );
$this->html( 'bodycontent' );
- echo $this->clear();
+ echo $this->getClear();
echo Html::rawElement(
'div',
array( 'class' => 'printfooter'
),
@@ -112,51 +112,7 @@
?>
-
-'footer-icons',
- 'role' => 'contentinfo'
- )
- );
- foreach ( $this->getFooterIcons( 'icononly' )
as $blockName => $footerIcons ) {
- echo Html::openElement(
- 'li',
- array(
- 'id' => 'footer-' .
Sanitizer::escapeId( $blockName ) . 'ico'
- )
- );
- foreach ( $footerIcons as $icon ) {
- echo
$this->getSkin()->makeFooterIcon( $icon );
- }
- echo Html::closeElement( 'li' );
- }
- echo Html::closeElement( 'ul' );
-
- foreach ( $this->getFooterLinks() as $category
=> $links ) {
- echo Html::openElement(
- 'ul',
- array(
- 'id' => 'footer-' .
Sanitizer::escapeId( $category ),
- 'role' => 'contentinfo'
- )
- );
- foreach ( $links as $key ) {
- echo Html::rawElement(
- 'li',
- array(
- 'id' =>
'footer-' . Sanitizer::escapeId( $category . '-' . $key )
- ),
- $this->get( $key )
- );
- }
- echo Html::closeElement( 'ul' );
- }
- echo $this->clear();
- ?>
-
+ getFooter(); ?>
printTrail() ?>
@@ -164,95 +120,6 @@
exists() ) {
- if ( isset( $msgParams ) && !empty( $msgParams ) ) {
- $msgString = $this->getMsg( $msg, $msgParams
)->parse();
- } else {
- $msgString = $msgObj->parse();
- }
- } else {
- $msgString = htmlspecialchars( $msg );
- }
-
- // HACK: Compatibility with extensions still using
SkinTemplateToolboxEnd
- $hookContents = '';
- if ( $name == 'tb' ) {
- if ( isset( $boxes['TOOLBOX'] ) ) {
- ob_start();
- // We pass an extra 'true' at the end so
extensions using BaseTemplateToolbox
- // can abort and avoid outputting double
toolbox links
-
Dzahn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354588 )
Change subject: wikistats: use systemuser for git cloning
..
wikistats: use systemuser for git cloning
Change-Id: I7a4c67af2fec7a26e380be8f43296bab64656df7
---
M modules/wikistats/manifests/init.pp
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/88/354588/1
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index 4aa3215..c495169 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -31,6 +31,8 @@
file { '/srv/wikistats':
ensure => 'directory',
+user => 'wikistatsuser',
+group => 'wikistatsuser',
}
# directory used by deploy-script to store backups
@@ -57,6 +59,8 @@
ensure=> 'latest',
directory => '/srv/wikistats',
branch=> 'master',
+owner => 'wikistatsuser',
+group => 'wikistatsuser',
}
# webserver setup for wikistats
--
To view, visit https://gerrit.wikimedia.org/r/354588
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a4c67af2fec7a26e380be8f43296bab64656df7
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
Paladox has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354585 )
Change subject: Fix the web updater
..
Fix the web updater
It kept failing with Error: 1064 You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right syntax
to use near 'ESCAPE '`'' at line 1 (localhost)
Bug: T165805
Change-Id: I2671415fc34b1e6226104c88ca21fafc860bb7fb
---
0 files changed, 0 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/85/354585/1
--
To view, visit https://gerrit.wikimedia.org/r/354585
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2671415fc34b1e6226104c88ca21fafc860bb7fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Dereckson has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354586 )
Change subject: Fix hy.wikipedia high resolution logos
..
Fix hy.wikipedia high resolution logos
Logo has been updated few years ago, but when high resolution version
has been generated, it used the legacy version. We switch to the new
version.
Reported at the hackathon by Ashot Janibekyqn.
Bug: T165811
Change-Id: I667d98d75a18803291ed596430f385ec4207fe21
---
M static/images/project-logos/hywiki-1.5x.png
M static/images/project-logos/hywiki-2x.png
2 files changed, 0 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/86/354586/1
diff --git a/static/images/project-logos/hywiki-1.5x.png
b/static/images/project-logos/hywiki-1.5x.png
index 64f9e18..179684f 100644
--- a/static/images/project-logos/hywiki-1.5x.png
+++ b/static/images/project-logos/hywiki-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/hywiki-2x.png
b/static/images/project-logos/hywiki-2x.png
index d3f337d..4eca4cd 100644
--- a/static/images/project-logos/hywiki-2x.png
+++ b/static/images/project-logos/hywiki-2x.png
Binary files differ
--
To view, visit https://gerrit.wikimedia.org/r/354586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I667d98d75a18803291ed596430f385ec4207fe21
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Isarra has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354587 )
Change subject: Use duplicates of core functions, with notes about when to
delete them and just use core
..
Use duplicates of core functions, with notes about when to delete them and
just use core
Also move getPortlet to the bottom before them, since it's NEXT. (Also fix
that error with that hook using renderafter instead of getafterportlet.)
Change-Id: I6efe32634557046cc904f801461c097656b90681
---
M ExampleTemplate.php
1 file changed, 174 insertions(+), 137 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example
refs/changes/87/354587/1
diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 9490fee..5cfe714 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -66,7 +66,7 @@
echo Html::closeElement( 'div' );
$this->html( 'bodycontent' );
- echo $this->clear();
+ echo $this->getClear();
echo Html::rawElement(
'div',
array( 'class' => 'printfooter'
),
@@ -112,51 +112,7 @@
?>
-
-'footer-icons',
- 'role' => 'contentinfo'
- )
- );
- foreach ( $this->getFooterIcons( 'icononly' )
as $blockName => $footerIcons ) {
- echo Html::openElement(
- 'li',
- array(
- 'id' => 'footer-' .
Sanitizer::escapeId( $blockName ) . 'ico'
- )
- );
- foreach ( $footerIcons as $icon ) {
- echo
$this->getSkin()->makeFooterIcon( $icon );
- }
- echo Html::closeElement( 'li' );
- }
- echo Html::closeElement( 'ul' );
-
- foreach ( $this->getFooterLinks() as $category
=> $links ) {
- echo Html::openElement(
- 'ul',
- array(
- 'id' => 'footer-' .
Sanitizer::escapeId( $category ),
- 'role' => 'contentinfo'
- )
- );
- foreach ( $links as $key ) {
- echo Html::rawElement(
- 'li',
- array(
- 'id' =>
'footer-' . Sanitizer::escapeId( $category . '-' . $key )
- ),
- $this->get( $key )
- );
- }
- echo Html::closeElement( 'ul' );
- }
- echo $this->clear();
- ?>
-
+ getFooter(); ?>
printTrail() ?>
@@ -164,95 +120,6 @@
exists() ) {
- if ( isset( $msgParams ) && !empty( $msgParams ) ) {
- $msgString = $this->getMsg( $msg, $msgParams
)->parse();
- } else {
- $msgString = $msgObj->parse();
- }
- } else {
- $msgString = htmlspecialchars( $msg );
- }
-
- // HACK: Compatibility with extensions still using
SkinTemplateToolboxEnd
- $hookContents = '';
- if ( $name == 'tb' ) {
- if ( isset( $boxes['TOOLBOX'] ) ) {
- ob_start();
- // We pass an extra 'true' at the end so
extensions using BaseTemplateToolbox
- // can abort and avoid outputting double
toolbox links
-
Florianschmidtwelzow has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354576 )
Change subject: WIP: Add new settings for wikibase usage in the app apart from
wikidata
..
WIP: Add new settings for wikibase usage in the app apart from wikidata
This change needs to introduce some new dev-settings to make support for
non-wikidata Wikibase installations supported by the app. This includes:
* Wikibase base URL
* MediaWiki content language code (the language code does not need to be
part of the subdomain of the base URL)
* MediaWiki dbname (needed for the Wikibase edit description feature, as
Wikibase requires the site parameter for setting the description, ask
in T165809 why)
Bug: T165786
Change-Id: Ib1abd7d345284e4b1f680765b3ef6d73fb3411d5
---
M app/src/main/java/org/wikipedia/Constants.java
M app/src/main/java/org/wikipedia/dataclient/WikiSite.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
M
app/src/main/java/org/wikipedia/descriptions/DescriptionEditRevertHelpView.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/java/org/wikipedia/wikidata/EntityClient.java
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/xml/developer_preferences.xml
9 files changed, 62 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia
refs/changes/76/354576/1
diff --git a/app/src/main/java/org/wikipedia/Constants.java
b/app/src/main/java/org/wikipedia/Constants.java
index 83785e6..e37cdf4 100644
--- a/app/src/main/java/org/wikipedia/Constants.java
+++ b/app/src/main/java/org/wikipedia/Constants.java
@@ -8,6 +8,7 @@
public static final int USER_OPTION_ROW_FRAGMENT_LOADER_ID = 102;
public static final String WIKIPEDIA_URL = "https://wikipedia.org/;;
+public static final String WIKIDATA_URL = "https://www.wikidata.org;;
public static final String PLAIN_TEXT_MIME_TYPE = "text/plain";
public static final String ACCEPT_HEADER_PREFIX = "accept:
application/json; charset=utf-8; "
diff --git a/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
b/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
index 909d1d5..e9cbc7a 100644
--- a/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
+++ b/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
@@ -234,6 +234,8 @@
}
@NonNull public String dbName() {
+if (Prefs.getWikiDBName() != null)
+return Prefs.getWikiDBName();
return languageCodeToSubdomain(languageCode) + "wiki";
}
@@ -305,6 +307,9 @@
final int minLengthForSubdomain = 3;
if (parts.length < minLengthForSubdomain
|| parts.length == minLengthForSubdomain &&
parts[0].equals("m")) {
+if (Prefs.getWikiLangCode() != null)
+return Prefs.getWikiLangCode();
+
// ""
// wikipedia.org
// m.wikipedia.org
diff --git
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
index a918bf6..3672a32 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
@@ -94,8 +94,12 @@
boolean loggedIn,
@NonNull final Callback cb) {
-Call call =
service.edit(pageTitle.getWikiSite().languageCode(),
-pageTitle.getWikiSite().languageCode(),
pageTitle.getWikiSite().dbName(),
+String languageCode = pageTitle.getWikiSite().languageCode();
+if (languageCode.isEmpty())
+languageCode =
WikipediaApp.getInstance().getAppOrSystemLanguageCode();
+
+Call call = service.edit(languageCode, languageCode,
+pageTitle.getWikiSite().dbName(),
pageTitle.getPrefixedText(), description, editToken,
loggedIn ? "user" : null);
call.enqueue(new retrofit2.Callback() {
diff --git
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index 1c9d9b3..c71624e 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -150,7 +150,7 @@
}
private class EditViewCallback implements DescriptionEditView.Callback {
-private final WikiSite wikiData = new WikiSite("www.wikidata.org", "");
+private final WikiSite wikibase = new
WikiSite(Prefs.getWikibaseBaseUri(), "");
@Override
public void onSaveClick() {
@@ -159,8 +159,7 @@
cancelCalls();
-
Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354575 )
Change subject: Read config for two wb_terms reading modes
..
Read config for two wb_terms reading modes
Bug: T162673
Change-Id: I3885df909ebfc5a89a8f888eb75bf9dc090f8175
---
M client/config/WikibaseClient.default.php
M client/includes/Store/Sql/DirectSqlStore.php
M lib/includes/Store/Sql/SqlEntityInfoBuilderFactory.php
M repo/config/Wikibase.default.php
M repo/includes/Store/Sql/SqlStore.php
5 files changed, 48 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/75/354575/1
diff --git a/client/config/WikibaseClient.default.php
b/client/config/WikibaseClient.default.php
index 52a9ce2..635a672 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -221,5 +221,8 @@
// characters (e.g. space, percent, etc.) should NOT be encoded.
$defaults['tabularDataStorageBaseUrl'] =
'https://commons.wikimedia.org/wiki/';
+ // Enable reading of term_full_entity_id column in wb_terms table.
+ $defaults['readFullEntityIdColumn'] = false;
+
return $defaults;
} );
diff --git a/client/includes/Store/Sql/DirectSqlStore.php
b/client/includes/Store/Sql/DirectSqlStore.php
index 4dcb73d..8d59241 100644
--- a/client/includes/Store/Sql/DirectSqlStore.php
+++ b/client/includes/Store/Sql/DirectSqlStore.php
@@ -166,6 +166,11 @@
private $writeFullEntityIdColumn;
/**
+* @var bool
+*/
+ private $readFullEntityIdColumn;
+
+ /**
* @param EntityChangeFactory $entityChangeFactory
* @param EntityContentDataCodec $contentCodec
* @param EntityIdParser $entityIdParser
@@ -202,6 +207,7 @@
$this->cacheDuration = $settings->getSetting(
'sharedCacheDuration' );
$this->siteId = $settings->getSetting( 'siteGlobalID' );
$this->writeFullEntityIdColumn = $settings->getSetting(
'writeFullEntityIdColumn' );
+ $this->readFullEntityIdColumn = $settings->getSetting(
'readFullEntityIdColumn' );
}
/**
@@ -375,6 +381,7 @@
'',
$this->writeFullEntityIdColumn
);
+ $this->termIndex->setReadFullEntityIdColumn(
$this->readFullEntityIdColumn );
}
return $this->termIndex;
diff --git a/lib/includes/Store/Sql/SqlEntityInfoBuilderFactory.php
b/lib/includes/Store/Sql/SqlEntityInfoBuilderFactory.php
index d2dd280..4b0c761 100644
--- a/lib/includes/Store/Sql/SqlEntityInfoBuilderFactory.php
+++ b/lib/includes/Store/Sql/SqlEntityInfoBuilderFactory.php
@@ -47,6 +47,11 @@
private $repositoryName;
/**
+* @var bool
+*/
+ private $readFullEntityIdColumn = false;
+
+ /**
* @param EntityIdParser $entityIdParser
* @param EntityIdComposer $entityIdComposer
* @param EntityNamespaceLookup $entityNamespaceLookup
@@ -83,7 +88,7 @@
* @return EntityInfoBuilder
*/
public function newEntityInfoBuilder( array $entityIds ) {
- return new SqlEntityInfoBuilder(
+ $sqlEntityInfoBuilder = new SqlEntityInfoBuilder(
$this->entityIdParser,
$this->entityIdComposer,
$this->entityNamespaceLookup,
@@ -91,6 +96,17 @@
$this->wiki,
$this->repositoryName
);
+
+ $sqlEntityInfoBuilder->setReadFullEntityIdColumn(
$this->readFullEntityIdColumn );
+
+ return $sqlEntityInfoBuilder;
+ }
+
+ /**
+* @param bool $readFullEntityIdColumn
+*/
+ public function setReadFullEntityIdColumn( $readFullEntityIdColumn ) {
+ $this->readFullEntityIdColumn = $readFullEntityIdColumn;
}
}
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index f197882..e052174 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -226,4 +226,7 @@
return $settings->hasSetting( 'hasFullEntityIdColumn' ) ?
$settings->getSetting( 'hasFullEntityIdColumn' ) : true;
},
+
+ // Enable reading of term_full_entity_id column in wb_terms table.
+ 'readFullEntityIdColumn' => false,
];
diff --git a/repo/includes/Store/Sql/SqlStore.php
b/repo/includes/Store/Sql/SqlStore.php
index baa4a49..e8f3484 100644
--- a/repo/includes/Store/Sql/SqlStore.php
+++ b/repo/includes/Store/Sql/SqlStore.php
@@ -185,6 +185,11 @@
private $writeFullEntityIdColumn;
/**
+* @var bool
+*/
+ private $readFullEntityIdColumn;
+
+ /**
* @param EntityChangeFactory
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354551 )
Change subject: T115395: Run parsertests with the batch api enabled
..
T115395: Run parsertests with the batch api enabled
Change-Id: I892117d745094b6a5f19695f385de3956f0780f6
---
M bin/parserTests.js
M tests/mockAPI.js
2 files changed, 113 insertions(+), 97 deletions(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/bin/parserTests.js b/bin/parserTests.js
index 15f160a..9d0e331 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -997,6 +997,8 @@
parsoidConfig.loadWMF = false;
parsoidConfig.initMwApiMap();
+ parsoidConfig.useBatchAPI = true;
+
// Needed for bidi-char-scrubbing html2wt tests.
parsoidConfig.scrubBidiChars = true;
diff --git a/tests/mockAPI.js b/tests/mockAPI.js
index 571f479..4ac3fe8 100644
--- a/tests/mockAPI.js
+++ b/tests/mockAPI.js
@@ -273,6 +273,80 @@
}
};
+var imageInfo = function(filename, twidth, theight, useBatchAPI) {
+ var normPagename = pnames[filename] || filename;
+ var normFilename = fnames[filename] || filename;
+ if (!(normFilename in FILE_PROPS)) {
+ return null;
+ }
+ var props = FILE_PROPS[normFilename] || Object.create(null);
+ var md5 = crypto.createHash('md5').update(normFilename).digest('hex');
+ var md5prefix = md5[0] + '/' + md5[0] + md5[1] + '/';
+ var baseurl = IMAGE_BASE_URL + '/' + md5prefix + normFilename;
+ var height = props.hasOwnProperty('height') ? props.height : 220;
+ var width = props.hasOwnProperty('width') ? props.width : 1941;
+ var turl = IMAGE_BASE_URL + '/thumb/' + md5prefix + normFilename;
+ var durl = IMAGE_DESC_URL + '/' + normFilename;
+ var mediatype = props.mediatype ||
+ (props.mime === 'image/svg+xml' ? 'DRAWING' : 'BITMAP');
+ var result = {
+ size: props.size || 12345,
+ height: height,
+ width: width,
+ url: baseurl,
+ descriptionurl: durl,
+ mediatype: mediatype,
+ mime: props.mime,
+ };
+ if (props.hasOwnProperty('duration')) {
+ result.duration = props.duration;
+ }
+ if (twidth || theight) {
+ if (twidth && (theight === undefined || theight === null)) {
+ // File::scaleHeight in PHP
+ theight = Math.round(height * twidth / width);
+ } else if (theight && (twidth === undefined || twidth ===
null)) {
+ // MediaHandler::fitBoxWidth in PHP
+ // This is crazy!
+ var idealWidth = width * theight / height;
+ var roundedUp = Math.ceil(idealWidth);
+ if (Math.round(roundedUp * height / width) > theight) {
+ twidth = Math.floor(idealWidth);
+ } else {
+ twidth = roundedUp;
+ }
+ } else {
+ if (Math.round(height * twidth / width) > theight) {
+ twidth = Math.ceil(width * theight / height);
+ } else {
+ theight = Math.round(height * twidth / width);
+ }
+ }
+ var urlWidth = twidth;
+ if (twidth >= width || theight >= height) {
+ // The PHP api won't enlarge an image ... but the batch
api will.
+ if (!useBatchAPI) {
+ twidth = width;
+ theight = height;
+ }
+ urlWidth = width; // That right?
+ }
+ turl += '/' + urlWidth + 'px-' + normFilename;
+ result.thumbwidth = twidth;
+ result.thumbheight = theight;
+ result.thumburl = turl;
+ }
+ return {
+ result: result,
+ normPagename: normPagename,
+ };
+};
+
+var querySiteinfo = function(body, cb) {
+ // TODO: Read which language should we use from somewhere.
+ cb(null, require('../lib/config/baseconfig/enwiki.json'));
+};
+
var availableActions = {
parse: function(body, cb) {
var resultText;
@@ -306,16 +380,10 @@
cb(null, { parse: { text: { '*': resultText } } });
},
- querySiteinfo: function(body, cb) {
- // TODO: Read which language should we use from somewhere.
- cb(null, require('../lib/config/baseconfig/enwiki.json'));
- },
-
query: function(body, cb) {
if (body.meta ===
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354568 )
Change subject: wikistats: fix typo in db.pp "requires" -> "require"
..
wikistats: fix typo in db.pp "requires" -> "require"
Change-Id: I470f93a12a9d6f2e2ce8770f571b7021b13e4519
---
M modules/wikistats/manifests/db.pp
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/wikistats/manifests/db.pp
b/modules/wikistats/manifests/db.pp
index c0f910f..2ca4f59 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -76,12 +76,12 @@
}
exec { 'bootstrap-mysql-grants':
-command => '/usr/bin/mysql -u root -Bs <
/usr/lib/wikistats/grants.sql',
-user => 'root',
-timeout => '30',
-unless => '/usr/bin/test -f /usr/lib/wikistats/db_grants_done',
-before => File['/usr/lib/wikistats/db_grants_done'],
-requires => File['/usr/lib/wikistats/grants.sql'],
+command => '/usr/bin/mysql -u root -Bs <
/usr/lib/wikistats/grants.sql',
+user=> 'root',
+timeout => '30',
+unless => '/usr/bin/test -f /usr/lib/wikistats/db_grants_done',
+before => File['/usr/lib/wikistats/db_grants_done'],
+require => File['/usr/lib/wikistats/grants.sql'],
}
file { '/usr/lib/wikistats/db_grants_done':
--
To view, visit https://gerrit.wikimedia.org/r/354568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I470f93a12a9d6f2e2ce8770f571b7021b13e4519
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354553 )
Change subject: Use newsletter-unsubscribe-text instead of
newsletter-subscribe-text
..
Use newsletter-unsubscribe-text instead of newsletter-subscribe-text
Bug: T159081
Change-Id: Ib87003326e475cda25f55255f29caf4fd4359326
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
01tonythomas: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialNewsletter.php
b/includes/specials/SpecialNewsletter.php
index a92a5f6..1225aa5 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -198,7 +198,7 @@
if ( $this->newsletter->isSubscribed( $this->getUser() ) ) {
// User is subscribed so show the unsubscribe form
- $txt = $this->msg( 'newsletter-subscribe-text' )
+ $txt = $this->msg( 'newsletter-unsubscribe-text' )
->rawParams( $this->getEscapedName() )->parse();
$button = [
'unsubscribe' => [
--
To view, visit https://gerrit.wikimedia.org/r/354553
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib87003326e475cda25f55255f29caf4fd4359326
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: MtDu
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Dzahn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354568 )
Change subject: wikistats: fix typo in db.pp "requires" -> "require"
..
wikistats: fix typo in db.pp "requires" -> "require"
Change-Id: I470f93a12a9d6f2e2ce8770f571b7021b13e4519
---
M modules/wikistats/manifests/db.pp
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/68/354568/1
diff --git a/modules/wikistats/manifests/db.pp
b/modules/wikistats/manifests/db.pp
index c0f910f..2ca4f59 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -76,12 +76,12 @@
}
exec { 'bootstrap-mysql-grants':
-command => '/usr/bin/mysql -u root -Bs <
/usr/lib/wikistats/grants.sql',
-user => 'root',
-timeout => '30',
-unless => '/usr/bin/test -f /usr/lib/wikistats/db_grants_done',
-before => File['/usr/lib/wikistats/db_grants_done'],
-requires => File['/usr/lib/wikistats/grants.sql'],
+command => '/usr/bin/mysql -u root -Bs <
/usr/lib/wikistats/grants.sql',
+user=> 'root',
+timeout => '30',
+unless => '/usr/bin/test -f /usr/lib/wikistats/db_grants_done',
+before => File['/usr/lib/wikistats/db_grants_done'],
+require => File['/usr/lib/wikistats/grants.sql'],
}
file { '/usr/lib/wikistats/db_grants_done':
--
To view, visit https://gerrit.wikimedia.org/r/354568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I470f93a12a9d6f2e2ce8770f571b7021b13e4519
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
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354567 )
Change subject: wikistats: add missing .erb file extension to grants.sql
..
wikistats: add missing .erb file extension to grants.sql
Change-Id: I0b3699b40a651ae5689b64f0456e3a170ff04ae5
---
R modules/wikistats/templates/db/grants.sql.erb
1 file changed, 0 insertions(+), 0 deletions(-)
Approvals:
Dzahn: Verified; Looks good to me, approved
diff --git a/modules/wikistats/templates/db/grants.sql
b/modules/wikistats/templates/db/grants.sql.erb
similarity index 100%
rename from modules/wikistats/templates/db/grants.sql
rename to modules/wikistats/templates/db/grants.sql.erb
--
To view, visit https://gerrit.wikimedia.org/r/354567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0b3699b40a651ae5689b64f0456e3a170ff04ae5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Dzahn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354567 )
Change subject: wikistats: add missing .erb file extension to grants.sql
..
wikistats: add missing .erb file extension to grants.sql
Change-Id: I0b3699b40a651ae5689b64f0456e3a170ff04ae5
---
R modules/wikistats/templates/db/grants.sql.erb
1 file changed, 0 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/67/354567/1
diff --git a/modules/wikistats/templates/db/grants.sql
b/modules/wikistats/templates/db/grants.sql.erb
similarity index 100%
rename from modules/wikistats/templates/db/grants.sql
rename to modules/wikistats/templates/db/grants.sql.erb
--
To view, visit https://gerrit.wikimedia.org/r/354567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b3699b40a651ae5689b64f0456e3a170ff04ae5
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
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354564 )
Change subject: Ensure parsercache consistency
..
Ensure parsercache consistency
- Make sure that anonymous pages only depend on the system default
- Make sure we can roll back and forth videojs and kaltura player
without poisoning the parser cache
- Get rid of an older private property on parseroutput.
Bug: T100106
Change-Id: I2bf500ffcb2331e0920bc23aeeeaa3577f53f9c7
---
M TimedMediaHandler.hooks.php
M TimedMediaHandler_body.php
2 files changed, 29 insertions(+), 24 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 69010dd..6406a1f 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -789,19 +789,17 @@
* @return bool
*/
public static function rejectParserCacheValue( $parserOutput,
$wikiPage, $parserOptions ) {
- if (
- $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' )
- || isset( $parserOutput->hasTimedMediaTransform )
- ) {
- /* page has old style TMH elements */
- if (
- self::activePlayerMode() === 'mwembed' &&
+ if ( $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' ) && (
+ (
+ self::defaultPlayerMode() === 'mwembed' &&
!in_array( 'mw.MediaWikiPlayer.loader',
$parserOutput->getModules() )
- ) {
- wfDebug( 'Bad TMH parsercache value, throw this
out.' );
- $wikiPage->getTitle()->purgeSquid();
- return false;
- }
+ ) || (
+ self::defaultPlayerMode() === 'videojs' &&
+ !in_array( 'ext.tmh.video-js',
$parserOutput->getModules() )
+ )
+ ) ) {
+ $wikiPage->getTitle()->purgeSquid();
+ return false;
}
return true;
}
@@ -851,17 +849,29 @@
}
/**
+* Return the configured player mode for this user
* @return string
*/
public static function activePlayerMode() {
- global $wgTmhWebPlayer, $wgTmhUseBetaFeatures, $wgUser;
+ global $wgTmhUseBetaFeatures, $wgUser;
$context = new RequestContext();
if ( $wgTmhUseBetaFeatures && class_exists( 'BetaFeatures' ) &&
$wgUser->isSafeToLoad() &&
BetaFeatures::isFeatureEnabled( $context->getUser(), 'tmh-videojs' )
) {
return 'videojs';
} else {
- return $wgTmhWebPlayer;
+ return self::defaultPlayerMode();
}
}
+
+ /**
+* Return the default configured player mode
+* This mode is used for anonymous users
+* @since 1.30
+* @return string
+*/
+ public static function defaultPlayerMode() {
+ global $wgTmhWebPlayer;
+ return $wgTmhWebPlayer;
+ }
}
diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php
index 3ae07c8..110378b 100644
--- a/TimedMediaHandler_body.php
+++ b/TimedMediaHandler_body.php
@@ -198,28 +198,23 @@
*/
function parserTransformHook( $parser, $file ) {
$parserOutput = $parser->getOutput();
- if ( isset( $parserOutput->hasTimedMediaTransform ) ) {
+ if ( $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' ) ) {
return;
}
- $parserOutput->hasTimedMediaTransform = true;
- if ( TimedMediaHandlerHooks::activePlayerMode() === 'mwembed' )
{
+ $activePlayerMode = TimedMediaHandlerHooks::activePlayerMode();
+ if ( $activePlayerMode === 'mwembed' ) {
$parserOutput->addModuleStyles(
'ext.tmh.thumbnail.styles' );
$parserOutput->addModules( [
'mw.MediaWikiPlayer.loader',
'mw.PopUpMediaTransform',
'mw.TMHGalleryHook.js',
] );
- }
-
- if ( TimedMediaHandlerHooks::activePlayerMode() === 'videojs' )
{
+ } elseif ( $activePlayerMode === 'videojs' ) {
$parserOutput->addModuleStyles( 'ext.tmh.player.styles'
);
$parserOutput->addModules( 'ext.tmh.player' );
Dzahn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354548 )
Change subject: wikistats: make db_pass a parameter, use fqdn_rand_string
..
wikistats: make db_pass a parameter, use fqdn_rand_string
Make db_pass a parameter so we can use it in 2 places, a file
that the deployment-script can read it from and the template
for the MySQL GRANTS.
Use fqdn_rand_string with a random seed to generate a string
(there is nothing secret in the db anyways, btw), forget about
that exec() with openssl intead.
Puppetize giving out the GRANTs on (first) run, add missing template
file to fix puppet run.
Change-Id: I026de7ecbd90b0c7ec06d7dffa59152b81a5dd2d
---
M modules/wikistats/manifests/db.pp
M modules/wikistats/manifests/init.pp
A modules/wikistats/templates/db/grants.sql
3 files changed, 13 insertions(+), 10 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
diff --git a/modules/wikistats/manifests/db.pp
b/modules/wikistats/manifests/db.pp
index a0768f9..c0f910f 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -1,5 +1,5 @@
# the database server setup for the wikistats site
-class wikistats::db {
+class wikistats::db($db_pass) {
if os_version('debian >= stretch') {
require_package('php7.0-mysql')
@@ -29,14 +29,14 @@
minute => '23',
}
-# stash random db password in the wikistats-user home dir,
-# so that deploy-script can bootstrap a new system
-exec { 'generate-wikistats-db-pass':
-command => '/usr/bin/openssl rand -base64 12 >
/usr/lib/wikistats/wikistats-db-pass',
-creates => '/usr/lib/wikistats/wikistats-db-pass',
-user=> 'root',
-timeout => '10',
-unless => '/usr/bin/test -f /usr/lib/wikistats/wikistats-db-pass',
+# (random) db pass is stored here to that deployment-script can
+# get it and replace it in the config file after deploying
+file { '/usr/lib/wikistats/wikistats-db-pass':
+ensure => 'present',
+owner => 'wikistatsuser',
+group => 'wikistatsuser',
+mode=> '0400',
+content => $db_pass,
}
# database schema
diff --git a/modules/wikistats/manifests/init.pp
b/modules/wikistats/manifests/init.pp
index 063a176..4aa3215 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -68,6 +68,8 @@
class { 'wikistats::updates': }
# install a db on localhost
-class { 'wikistats::db': }
+class { 'wikistats::db':
+db_pass => fqdn_rand_string(23, 'Random9Fn0rd8Seed'),
+}
}
diff --git a/modules/wikistats/templates/db/grants.sql
b/modules/wikistats/templates/db/grants.sql
new file mode 100644
index 000..fd87215
--- /dev/null
+++ b/modules/wikistats/templates/db/grants.sql
@@ -0,0 +1 @@
+GRANT all privileges on wikistats.* to 'wikistatsuser'@'localhost' identified
by '<%= @db_pass %>';
--
To view, visit https://gerrit.wikimedia.org/r/354548
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I026de7ecbd90b0c7ec06d7dffa59152b81a5dd2d
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn
Gerrit-Reviewer: Dzahn
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354565 )
Change subject: Add type hint to ThumbnailRenderJob::hitThumbUrl
..
Add type hint to ThumbnailRenderJob::hitThumbUrl
Change-Id: Ifab9d74ae9147349b0a3417f35088b96ee47b6fa
---
M includes/jobqueue/jobs/ThumbnailRenderJob.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php
b/includes/jobqueue/jobs/ThumbnailRenderJob.php
index 081e114..cf3155d 100644
--- a/includes/jobqueue/jobs/ThumbnailRenderJob.php
+++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php
@@ -77,7 +77,7 @@
}
}
- protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) {
+ protected function hitThumbUrl( LocalFile $file, $transformParams,
&$thumbUrl ) {
global $wgUploadThumbnailRenderHttpCustomHost,
$wgUploadThumbnailRenderHttpCustomDomain;
$thumbName = $file->thumbName( $transformParams );
--
To view, visit https://gerrit.wikimedia.org/r/354565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifab9d74ae9147349b0a3417f35088b96ee47b6fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354557 )
Change subject: Add workaround for HHVM issue 6206
..
Add workaround for HHVM issue 6206
Just use the actual global on HHVM, like we do on
Zend, but avoid hitting the warning.
This is a workaround for https://github.com/facebook/hhvm/issues/6206
Bug: T111641
Change-Id: I15ef0e90827c94a8b2609484b0dddcb78f04284c
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index bc9f97c..1114f2a 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -1,5 +1,6 @@
mwGlobals[$globalKey] = clone
$GLOBALS[$globalKey];
+ } elseif ( $GLOBALS[$globalKey] instanceof
Closure ) {
+ // Serializing Closure only gives a
warning on HHVM while
+ // it throws an Exception on Zend.
+ // Workaround for
https://github.com/facebook/hhvm/issues/6206
+ $this->mwGlobals[$globalKey] =
$GLOBALS[$globalKey];
} else {
try {
$this->mwGlobals[$globalKey] =
unserialize( serialize( $GLOBALS[$globalKey] ) );
--
To view, visit https://gerrit.wikimedia.org/r/354557
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I15ef0e90827c94a8b2609484b0dddcb78f04284c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man
Gerrit-Reviewer: Addshore
Gerrit-Reviewer: Aude
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: Reedy
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354562 )
Change subject: Add missing doUpdates() call to refreshLinks.php
..
Add missing doUpdates() call to refreshLinks.php
Follows-up b8b01aa589ce which accidentally removed this call.
Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index a6cd548..9f3552a 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -278,6 +278,7 @@
$page->getTitle(), /* $old = */ null, /* $recursive =
*/ false );
foreach ( $updates as $update ) {
DeferredUpdates::addUpdate( $update );
+ DeferredUpdates::doUpdates();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354562
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_29
Gerrit-Owner: Krinkle
Gerrit-Reviewer: Aaron Schulz
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354563 )
Change subject: Add missing doUpdates() call to refreshLinks.php
..
Add missing doUpdates() call to refreshLinks.php
Follows-up b8b01aa589ce which accidentally removed this call.
Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index e7a4d06..a8d9445 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -263,6 +263,7 @@
foreach ( $content->getSecondaryDataUpdates( $page->getTitle()
) as $update ) {
DeferredUpdates::addUpdate( $update );
+ DeferredUpdates::doUpdates();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Krinkle
Gerrit-Reviewer: Aaron Schulz
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354140 )
Change subject: Add missing doUpdates() call to refreshLinks.php
..
Add missing doUpdates() call to refreshLinks.php
Follows-up b8b01aa589ce which accidentally removed this call.
Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index a6cd548..9f3552a 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -278,6 +278,7 @@
$page->getTitle(), /* $old = */ null, /* $recursive =
*/ false );
foreach ( $updates as $update ) {
DeferredUpdates::addUpdate( $update );
+ DeferredUpdates::doUpdates();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354140
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354376 )
Change subject: Avoid postgres PrefixSearchTest failures due to collation
differences
..
Avoid postgres PrefixSearchTest failures due to collation differences
Bug: T75174
Change-Id: I6b1df27ca6ae5c2da46134be3dbd7aed404d9601
---
M tests/phpunit/includes/PrefixSearchTest.php
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/includes/PrefixSearchTest.php
b/tests/phpunit/includes/PrefixSearchTest.php
index 31ee75b..a6cf14a 100644
--- a/tests/phpunit/includes/PrefixSearchTest.php
+++ b/tests/phpunit/includes/PrefixSearchTest.php
@@ -210,6 +210,11 @@
$namespaces = isset( $case['namespaces'] ) ?
$case['namespaces'] : [];
+ if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
+ // Postgres will sort lexicographically on utf8 code
units (" " before "/")
+ sort( $case['results'], SORT_STRING );
+ }
+
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces );
$this->assertEquals(
@@ -232,6 +237,11 @@
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces, 1
);
+ if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
+ // Postgres will sort lexicographically on utf8 code
units (" " before "/")
+ sort( $case['results'], SORT_STRING );
+ }
+
// We don't expect the first result when offsetting
array_shift( $case['results'] );
// And sometimes we expect a different last result
--
To view, visit https://gerrit.wikimedia.org/r/354376
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6b1df27ca6ae5c2da46134be3dbd7aed404d9601
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354566 )
Change subject: Update SmashPig, use SourceFields logic
..
Update SmashPig, use SourceFields logic
Also gets rid of buildHeaders, since we no longer have message headers.
This is a transitional patch, testing whether the SmashPig functions
give us the same values as the existing logic. Next steps are to
do away with DonationQueue entirely.
Bug: T95647
Change-Id: I7889c205a0dd2ef918e74e1632adc126b4e8d1c3
---
M DonationInterface.class.php
M composer.lock
M gateway_common/DonationQueue.php
M gateway_common/gateway.adapter.php
4 files changed, 77 insertions(+), 69 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/66/354566/1
diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index f3f3988..8baa45c 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -89,10 +89,15 @@
* @return Configuration
*/
public static function initializeSmashPig( $view ) {
+ global $IP;
$spConfig = Configuration::createForView( $view );
// FIXME: should set a logger prefix here, but we've got a
chicken
// and egg problem with the Gateway constructor
Context::initWithLogger( $spConfig );
+ $context = Context::get();
+ $context->setSourceName( 'DonationInterface' );
+ $context->setSourceType( 'payments' );
+ $context->setVersionFromFile( "$IP/.version-stamp");
return $spConfig;
}
}
diff --git a/composer.lock b/composer.lock
index 563fb2e..ace867d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,6 @@
"Read more about it at
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
"This file is @generated automatically"
],
-"hash": "286013b033c04aeb560c6d29c9d2462d",
"content-hash": "c77aa55a881981c2f2170a5894371bc0",
"packages": [
{
@@ -50,7 +49,7 @@
"cache",
"mediawiki"
],
-"time": "2017-02-16 14:33:59"
+"time": "2017-02-16T14:33:59+00:00"
},
{
"name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -89,7 +88,7 @@
"payment",
"payments"
],
-"time": "2016-02-17 00:53:20"
+"time": "2016-02-17T00:53:20+00:00"
},
{
"name": "clio/clio",
@@ -130,7 +129,7 @@
"console",
"daemon"
],
-"time": "2014-06-22 14:49:41"
+"time": "2014-06-22T14:49:41+00:00"
},
{
"name": "coderkungfu/php-queue",
@@ -202,6 +201,51 @@
"time": "2017-04-17 14:11:55"
},
{
+"name": "corneltek/getoptionkit",
+"version": "2.5.4",
+"source": {
+"type": "git",
+"url": "https://github.com/c9s/GetOptionKit.git;,
+"reference": "9eae6f4fa009655f9d0d0ccd04cdd9c0d39cbe80"
+},
+"dist": {
+"type": "zip",
+"url":
"https://api.github.com/repos/c9s/GetOptionKit/zipball/9eae6f4fa009655f9d0d0ccd04cdd9c0d39cbe80;,
+"reference": "9eae6f4fa009655f9d0d0ccd04cdd9c0d39cbe80",
+"shasum": ""
+},
+"require": {
+"php": ">=5.3.0"
+},
+"require-dev": {
+"satooshi/php-coveralls": "^1"
+},
+"type": "library",
+"extra": {
+"branch-alias": {
+"dev-master": "2.5.x-dev"
+}
+},
+"autoload": {
+"psr-4": {
+"GetOptionKit\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"MIT"
+],
+"authors": [
+{
+"name": "Yo-An Lin",
+"email": "cornelius.h...@gmail.com"
+}
+],
+"description": "Powerful command-line option toolkit",
+"homepage": "http://github.com/c9s/GetOptionKit;,
+"time": "2017-04-30T09:31:04+00:00"
+},
+{
"name": "ircmaxell/password-compat",
"version": "v1.0.4",
"source": {
@@ -241,7 +285,7 @@
"hashing",
"password"
],
-"time": "2014-11-20 16:49:30"
+"time": "2014-11-20T16:49:30+00:00"
},
{
"name": "minfraud/http",
@@ -281,7 +325,7 @@
"maxmind",
Aaron Schulz has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354565 )
Change subject: Add type hint to ThumbnailRenderJob::hitThumbUrl
..
Add type hint to ThumbnailRenderJob::hitThumbUrl
Change-Id: Ifab9d74ae9147349b0a3417f35088b96ee47b6fa
---
M includes/jobqueue/jobs/ThumbnailRenderJob.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/65/354565/1
diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php
b/includes/jobqueue/jobs/ThumbnailRenderJob.php
index 081e114..cf3155d 100644
--- a/includes/jobqueue/jobs/ThumbnailRenderJob.php
+++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php
@@ -77,7 +77,7 @@
}
}
- protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) {
+ protected function hitThumbUrl( LocalFile $file, $transformParams,
&$thumbUrl ) {
global $wgUploadThumbnailRenderHttpCustomHost,
$wgUploadThumbnailRenderHttpCustomDomain;
$thumbName = $file->thumbName( $transformParams );
--
To view, visit https://gerrit.wikimedia.org/r/354565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifab9d74ae9147349b0a3417f35088b96ee47b6fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
TheDJ has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354564 )
Change subject: Ensure parsercache consistency
..
Ensure parsercache consistency
- Make sure that anonymous pages only depend on the system default
- Make sure we can roll back and forth videojs and kaltura player
without poisoning the parser cache
- Get rid of an older private property on parseroutput.
Bug: T100106
Change-Id: I2bf500ffcb2331e0920bc23aeeeaa3577f53f9c7
---
M TimedMediaHandler.hooks.php
M TimedMediaHandler_body.php
2 files changed, 27 insertions(+), 20 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler
refs/changes/64/354564/1
diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 69010dd..0b0ed5d 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -789,19 +789,18 @@
* @return bool
*/
public static function rejectParserCacheValue( $parserOutput,
$wikiPage, $parserOptions ) {
- if (
- $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' )
- || isset( $parserOutput->hasTimedMediaTransform )
- ) {
- /* page has old style TMH elements */
- if (
- self::activePlayerMode() === 'mwembed' &&
+ global $wgTmhWebPlayer;
+ if ( $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' ) && (
+ (
+ $wgTmhWebPlayer === 'mwembed' &&
!in_array( 'mw.MediaWikiPlayer.loader',
$parserOutput->getModules() )
- ) {
- wfDebug( 'Bad TMH parsercache value, throw this
out.' );
- $wikiPage->getTitle()->purgeSquid();
- return false;
- }
+ ) || (
+ $wgTmhWebPlayer === 'videojs' &&
+ !in_array( 'ext.tmh.video-js',
$parserOutput->getModules() )
+ )
+ ) ) {
+ $wikiPage->getTitle()->purgeSquid();
+ return false;
}
return true;
}
@@ -851,6 +850,7 @@
}
/**
+* Return the configured player mode for this user
* @return string
*/
public static function activePlayerMode() {
@@ -864,4 +864,14 @@
return $wgTmhWebPlayer;
}
}
+
+ /**
+* Return the default configured player mode
+* This mode is used for anonymous users
+* @return string
+*/
+ public static function defaultPlayerMode() {
+ global $wgTmhWebPlayer;
+ return $wgTmhWebPlayer;
+ }
}
diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php
index 3ae07c8..7f2dd6b 100644
--- a/TimedMediaHandler_body.php
+++ b/TimedMediaHandler_body.php
@@ -198,11 +198,11 @@
*/
function parserTransformHook( $parser, $file ) {
$parserOutput = $parser->getOutput();
- if ( isset( $parserOutput->hasTimedMediaTransform ) ) {
+ if ( $parserOutput->getExtensionData(
'mw_ext_TMH_hasTimedMediaTransform' ) ) {
return;
}
- $parserOutput->hasTimedMediaTransform = true;
- if ( TimedMediaHandlerHooks::activePlayerMode() === 'mwembed' )
{
+ $activePlayerMode = TimedMediaHandlerHooks::activePlayerMode();
+ if ( $activePlayerMode === 'mwembed' ) {
$parserOutput->addModuleStyles(
'ext.tmh.thumbnail.styles' );
$parserOutput->addModules( [
'mw.MediaWikiPlayer.loader',
@@ -211,15 +211,12 @@
] );
}
- if ( TimedMediaHandlerHooks::activePlayerMode() === 'videojs' )
{
+ if ( $activePlayerMode === 'videojs' ) {
$parserOutput->addModuleStyles( 'ext.tmh.player.styles'
);
$parserOutput->addModules( 'ext.tmh.player' );
}
- if ( $parserOutput ) {
- // Not present when run from outputpage hooks, like
File/Category etc...
- $parserOutput->setExtensionData(
'mw_ext_TMH_hasTimedMediaTransform', true );
- }
+ $parserOutput->setExtensionData(
'mw_ext_TMH_hasTimedMediaTransform', $activePlayerMode );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/354564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id:
Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354563 )
Change subject: Add missing doUpdates() call to refreshLinks.php
..
Add missing doUpdates() call to refreshLinks.php
Follows-up b8b01aa589ce which accidentally removed this call.
Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/63/354563/1
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index e7a4d06..a8d9445 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -263,6 +263,7 @@
foreach ( $content->getSecondaryDataUpdates( $page->getTitle()
) as $update ) {
DeferredUpdates::addUpdate( $update );
+ DeferredUpdates::doUpdates();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Krinkle
Gerrit-Reviewer: Aaron Schulz
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354562 )
Change subject: Add missing doUpdates() call to refreshLinks.php
..
Add missing doUpdates() call to refreshLinks.php
Follows-up b8b01aa589ce which accidentally removed this call.
Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
---
M maintenance/refreshLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/62/354562/1
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index a6cd548..9f3552a 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -278,6 +278,7 @@
$page->getTitle(), /* $old = */ null, /* $recursive =
*/ false );
foreach ( $updates as $update ) {
DeferredUpdates::addUpdate( $update );
+ DeferredUpdates::doUpdates();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354562
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_29
Gerrit-Owner: Krinkle
Gerrit-Reviewer: Aaron Schulz
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354561 )
Change subject: Fix positioning of the language change popup when sidebar is on
the right
..
Fix positioning of the language change popup when sidebar is on the right
This fixes the same issue as 1d395d49660e340df6ecd120b91bbb55947c4419,
but for the little language change popup (shown after you change the
language) instead of the main interface.
Also fixed a minor bug for the main interface - we were measuring the
wrong $window, which happened to work right most of the time but
wasn't correct.
Change-Id: I28d3e8baeebf4619f4f810869c8a2a3fb60496d9
---
M resources/js/ext.uls.interface.js
1 file changed, 5 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector
refs/changes/61/354561/1
diff --git a/resources/js/ext.uls.interface.js
b/resources/js/ext.uls.interface.js
index 0dfe1ec..9084dae 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -248,7 +248,9 @@
classes: [ 'uls-tipsy' ],
// Automatically positioned relative to the trigger
$floatableContainer: $ulsTrigger,
- position: ( ulsPosition === 'interlanguage' ) ? 'after'
: 'below',
+ position: ( ulsPosition === 'interlanguage' ) ?
+ ( ( $ulsTrigger.offset().left > $( window
).width() / 2 ) ? 'force-left' : 'force-right' ) :
+ 'below',
$content: ( function () {
var link = $( '' ).text( previousAutonym )
.attr( {
@@ -351,8 +353,8 @@
caretRadius = parseInt(
$caretBefore.css( 'border-top-width' ), 10 );
- if (
ulsTriggerOffset.left > ( this.$window.width() - caretRadius ) / 2 ) {
- this.left =
ulsTriggerOffset.left - this.$window.width() - caretRadius;
+ if (
ulsTriggerOffset.left > $( window ).width() / 2 ) {
+ this.left =
ulsTriggerOffset.left - $( window ).width() - caretRadius;
$caretWrapper.addClass( 'caret-right' );
caretPosition =
$caretBefore.position();
--
To view, visit https://gerrit.wikimedia.org/r/354561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I28d3e8baeebf4619f4f810869c8a2a3fb60496d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
MaxSem has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354560 )
Change subject: Ignore bogus coordinates from EXIF
..
Ignore bogus coordinates from EXIF
Bug: T165800
Change-Id: Ifb8fbf0c4be5caa1b03034a0a4deb5e1f135
---
M includes/Hooks.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData
refs/changes/60/354560/1
diff --git a/includes/Hooks.php b/includes/Hooks.php
index f7ca72a..299d469 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -144,7 +144,10 @@
$lat = $metadata['GPSLatitude'];
$lon = $metadata['GPSLongitude'];
$globe = new Globe( 'earth' );
- if ( $globe->coordinatesAreValid( $lat, $lon ) ) {
+ if ( $globe->coordinatesAreValid( $lat, $lon )
+ // https://phabricator.wikimedia.org/T165800
+ && ( $lat != 0 || $lon != 0 )
+ ) {
$coord = new Coord( $lat, $lon );
$coord->primary = true;
return $coord;
--
To view, visit https://gerrit.wikimedia.org/r/354560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb8fbf0c4be5caa1b03034a0a4deb5e1f135
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354559 )
Change subject: Rename 'complete' queue to 'donations'
..
Rename 'complete' queue to 'donations'
Make it consistent with the rest of the pipeline. Next step is to
replace DonationQueue with the SmashPig queue wrapper.
DEPLOYMENT NOTE: needs a LocalSettings.php change if deployed before
tearing out DonationQueue
Bug: T95647
Change-Id: Ie5d562e9437609e2e462854936e159d9ba17e1f2
---
M README.txt
M extension.json
M gateway_common/gateway.adapter.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
5 files changed, 19 insertions(+), 19 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/59/354559/1
diff --git a/README.txt b/README.txt
index 3f5cae2..a6d2af3 100644
--- a/README.txt
+++ b/README.txt
@@ -137,7 +137,7 @@
$wgDonationInterfaceCurlVerboseLog = false
-As donations are sent to the "completed" queue, also log the json blob.
+As donations are sent to the "donations" queue, also log the json blob.
$wgDonationInterfaceLogCompleted = false
@@ -336,7 +336,7 @@
*/
$wgDonationInterfaceQueues = array(
// Incoming donations that we think have been paid for.
- 'completed' => array(),
+ 'donations' => array(),
// Transactions still needing action before they are settled.
'pending' => array(),
diff --git a/extension.json b/extension.json
index 5f44a47..aba1c45 100644
--- a/extension.json
+++ b/extension.json
@@ -377,7 +377,7 @@
"_merge_strategy": "array_plus"
},
"DonationInterfaceQueues": {
- "completed": [],
+ "donations": [],
"pending": [],
"payments-antifraud": [],
"payments-init": [],
diff --git a/gateway_common/gateway.adapter.php
b/gateway_common/gateway.adapter.php
index f3d6f7d..e7a62ed 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1743,7 +1743,7 @@
// This transaction completed successfully.
Send to the CRM
// for filing.
$this->logCompletedPayment();
- $this->pushMessage( 'complete' );
+ $this->pushMessage( 'donations' );
break;
case FinalStatus::PENDING:
diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
index ad2bb84..4c33e9f 100644
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ b/tests/phpunit/Adapter/Amazon/AmazonTest.php
@@ -150,8 +150,8 @@
$this->assertEquals( $oid,
$setOrderReferenceDetailsArgs['seller_order_id'], 'Did not set order id on
order reference' );
$this->assertEquals( $init['amount'],
$setOrderReferenceDetailsArgs['amount'], 'Did not set amount on order
reference' );
$this->assertEquals( $init['currency_code'],
$setOrderReferenceDetailsArgs['currency_code'], 'Did not set currency code on
order reference' );
- $message = DonationQueue::instance()->pop( 'complete' );
- $this->assertNotNull( $message, 'Not sending a message to the
complete queue' );
+ $message = DonationQueue::instance()->pop( 'donations' );
+ $this->assertNotNull( $message, 'Not sending a message to the
donations queue' );
$this->assertEquals( 'S01-0391295-0674065-C095112',
$message['gateway_txn_id'], 'Queue message has wrong txn ID' );
}
@@ -282,8 +282,8 @@
$authorizeOnBillingAgreementDetailsArgs =
$mockClient->calls['authorizeOnBillingAgreement'][0];
$this->assertEquals( $init['amount'],
$authorizeOnBillingAgreementDetailsArgs['authorization_amount'], 'Did not
authorize correct amount' );
$this->assertEquals( $init['currency_code'],
$authorizeOnBillingAgreementDetailsArgs['currency_code'], 'Did not authorize
correct currency code' );
- $message = DonationQueue::instance()->pop( 'complete' );
- $this->assertNotNull( $message, 'Not sending a message to the
complete queue' );
+ $message = DonationQueue::instance()->pop( 'donations' );
+ $this->assertNotNull( $message, 'Not sending a message to the
donations queue' );
$this->assertEquals( 'S01-5318994-6362993-C004044',
$message['gateway_txn_id'], 'Queue message has wrong txn ID' );
$this->assertEquals( $init['subscr_id'], $message['subscr_id'],
'Queue message has wrong subscription ID' );
}
diff --git a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/353644 )
Change subject: Revert "process payment before popping out of iframe"
..
Revert "process payment before popping out of iframe"
Turns out this broke failure message display
This reverts commit cf52a1d94f2cee4ba533c7e726f99224266731ea.
Change-Id: Idb2ab099936115ea6d9700255f1879c7cf7bd90a
---
M gateway_common/GatewayPage.php
M modules/iframe.liberator.js
2 files changed, 25 insertions(+), 24 deletions(-)
Approvals:
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 33c0bd6..220c1da 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -73,7 +73,9 @@
if( $wgContributionTrackingFundraiserMaintenance
|| $wgContributionTrackingFundraiserMaintenanceUnsched
){
- $this->redirect(
Title::newFromText('Special:FundraiserMaintenance')->getFullURL(), '302' );
+ $this->getOutput()->redirect(
+
Title::newFromText('Special:FundraiserMaintenance')->getFullURL(), '302'
+ );
return;
}
@@ -179,7 +181,7 @@
protected function displayThankYouPage( $logReason ) {
$thankYouPage = ResultPages::getThankYouPage( $this->adapter );
$this->logger->info( "Displaying thank you page $thankYouPage
for status $logReason." );
- $this->redirect( $thankYouPage );
+ $this->getOutput()->redirect( $thankYouPage );
}
/**
@@ -213,24 +215,6 @@
$log_message = "Redirecting to [{$page}]";
$this->logger->info( $log_message );
$output->redirect( $page );
- }
-
- public function redirect( $url, $responsecode = '302' ) {
- // Do we need to pop out of an iframe?
- if ( $this->isReturnFramed() ) {
- $this->logger->info(
- "Resultswitcher: Popping out of iframe for
Order ID " .
- $this->adapter->getData_Unstaged_Escaped(
'order_id' )
- );
- $this->getOutput()->allowClickjacking();
- $this->getOutput()->addModules( 'iframe.liberator' );
- $this->getOutput()->addJsConfigVars(
- 'wgDonationInterfaceLiberationDestination', $url
- );
- return;
- }
- // No, normal redirect.
- $this->getOutput()->redirect( $url, $responsecode );
}
/**
@@ -395,12 +379,27 @@
$request = $this->getRequest();
$referrer = $request->getHeader( 'referer' );
+ $liberated = false;
+ if ( $this->adapter->session_getData( 'order_status', $oid )
=== 'liberated' ) {
+ $liberated = true;
+ }
+
+ // XXX need to know whether we were in an iframe or not.
+ global $wgServer;
+ if ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer
) === false ) && !$liberated ) {
+ $sessionOrderStatus = $request->getSessionData(
'order_status' );
+ $sessionOrderStatus[$oid] = 'liberated';
+ $request->setSessionData( 'order_status',
$sessionOrderStatus );
+ $this->logger->info( "Resultswitcher: Popping out of
iframe for Order ID " . $oid );
+ $this->getOutput()->allowClickjacking();
+ $this->getOutput()->addModules( 'iframe.liberator' );
+ return;
+ }
$this->setHeaders();
if ( $deadSession ){
if ( $this->adapter->isReturnProcessingRequired() ) {
- // FIXME: this may display inside an iframe
wfHttpError( 403, 'Forbidden', wfMessage(
'donate_interface-error-http-403' )->text() );
throw new RuntimeException(
'Resultswitcher: Request forbidden. No
active donation in the session. ' .
@@ -454,7 +453,7 @@
$this->displayFailPage();
} elseif ( $url = $result->getRedirect() ) {
$this->adapter->logPending();
- $this->redirect( $url );
+ $this->getOutput()->redirect( $url );
} elseif ( $url = $result->getIframe() ) {
// Show a form containing an iframe.
@@ -466,6 +465,7 @@
$this->renderIframe( $url );
DLynch has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354558 )
Change subject: dm.MWTransclusionNode: remove TableCellableNode mixin
..
dm.MWTransclusionNode: remove TableCellableNode mixin
Change-Id: Ic08c7ba03ad2bee35a96a750377450475d0efeed
---
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
1 file changed, 0 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/58/354558/1
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
index 05efec3..cde269c 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
@@ -41,8 +41,6 @@
OO.mixinClass( ve.dm.MWTransclusionNode, ve.dm.FocusableNode );
-OO.mixinClass( ve.dm.MWTransclusionNode, ve.dm.TableCellableNode );
-
/* Static members */
ve.dm.MWTransclusionNode.static.name = 'mwTransclusion';
--
To view, visit https://gerrit.wikimedia.org/r/354558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic08c7ba03ad2bee35a96a750377450475d0efeed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354556 )
Change subject: Revert "rebaser: Make serializations shorter"
..
Revert "rebaser: Make serializations shorter"
Triggers a bug where selecting text and typing corrupts the model.
This reverts commit 30ebe4ed620efdbc1419ddba15017e1a0de649ae.
Change-Id: I46520ca1d2ad7b7cdbb518e4fb7e316b4bdcfb0a
---
M rebaser/logToTestCase.js
M src/dm/ve.dm.Change.js
M src/dm/ve.dm.IndexValueStore.js
M src/dm/ve.dm.Selection.js
M src/dm/ve.dm.Transaction.js
M src/dm/ve.dm.TransactionProcessor.js
M tests/dm/ve.dm.Change.test.js
7 files changed, 74 insertions(+), 134 deletions(-)
Approvals:
jenkins-bot: Verified
Jforrester: Looks good to me, approved
diff --git a/rebaser/logToTestCase.js b/rebaser/logToTestCase.js
index 82b27ae..24d4b4b 100644
--- a/rebaser/logToTestCase.js
+++ b/rebaser/logToTestCase.js
@@ -85,3 +85,9 @@
testCase = toTestCase( parsed );
process.stdout.write( JSON.stringify( testCase ) );
} );
+
+// acceptChange
+// submitChange
+// applyChange
+// newClient
+// disconnect
diff --git a/src/dm/ve.dm.Change.js b/src/dm/ve.dm.Change.js
index 63b1e8f..34c4c5e 100644
--- a/src/dm/ve.dm.Change.js
+++ b/src/dm/ve.dm.Change.js
@@ -714,7 +714,7 @@
* already, i.e. the Change object was created by #deserialize without
deserializing store values).
*
* @param {boolean} [preserveStoreValues] If true, keep store values verbatim
instead of serializing
- * @return {Object} Serialized change
+ * @return {ve.dm.Change} Deserialized change
*/
ve.dm.Change.prototype.serialize = function ( preserveStoreValues ) {
var author, serializeStoreValues, serializeStore,
diff --git a/src/dm/ve.dm.IndexValueStore.js b/src/dm/ve.dm.IndexValueStore.js
index d4933fb..08bf153 100644
--- a/src/dm/ve.dm.IndexValueStore.js
+++ b/src/dm/ve.dm.IndexValueStore.js
@@ -44,19 +44,18 @@
/**
* Deserialize a store from a JSONable object
*
- * The serialization format is experimental and subject to change
- *
* @param {Function} deserializeValue Deserializer for arbitrary store values
- * @param {Array} data Store serialized as a JSONable object
+ * @param {Object} data Store serialized as a JSONable object
* @return {ve.dm.IndexValueStore} Deserialized store
*/
ve.dm.IndexValueStore.static.deserialize = function ( deserializeValue, data )
{
- var i,
+ var hash,
store = new ve.dm.IndexValueStore();
- for ( i = 0; i < data.length; i++ ) {
- store.hashes.push( data[ i ][ 0 ] );
- store.hashStore[ data[ i ][ 0 ] ] = deserializeValue( data[ i
][ 1 ] );
+ store.hashes = data.hashes.slice();
+ store.hashStore = {};
+ for ( hash in data.hashStore ) {
+ store.hashStore[ hash ] = deserializeValue( data.hashStore[
hash ] );
}
return store;
};
@@ -65,8 +64,6 @@
/**
* Serialize the store into a JSONable object
- *
- * The serialization format is experimental and subject to change
*
* @param {Function} serializeValue Serializer for arbitrary store values
* @return {Object} Serialized store
@@ -78,9 +75,10 @@
for ( hash in this.hashStore ) {
serialized[ hash ] = serializeValue( this.hashStore[ hash ] );
}
- return this.hashes.map( function ( hash ) {
- return [ hash, serialized[ hash ] ];
- } );
+ return {
+ hashes: this.hashes.slice(),
+ hashStore: serialized
+ };
};
/**
diff --git a/src/dm/ve.dm.Selection.js b/src/dm/ve.dm.Selection.js
index 2de415f..c069e31 100644
--- a/src/dm/ve.dm.Selection.js
+++ b/src/dm/ve.dm.Selection.js
@@ -37,7 +37,7 @@
constructor = ve.dm.selectionFactory.lookup( hash.type );
if ( !constructor ) {
- throw new Error( 'Unknown selection type ' + hash.type );
+ throw new Error( 'Unknown selection type ' + hash.name );
}
return constructor.static.newFromHash( doc, hash );
diff --git a/src/dm/ve.dm.Transaction.js b/src/dm/ve.dm.Transaction.js
index 6f95498..604db67 100644
--- a/src/dm/ve.dm.Transaction.js
+++ b/src/dm/ve.dm.Transaction.js
@@ -69,61 +69,13 @@
/**
* Deserialize a transaction from a JSONable object
*
- * The serialization format is experimental and subject to change
- *
* @param {Object} data Transaction serialized as a JSONable object
* @return {ve.dm.Transaction} Deserialized transaction
*/
ve.dm.Transaction.static.deserialize = function ( data ) {
- function deserializeOp( op ) {
- var insert = [], remove = [];
- if ( typeof op === 'number' ) {
- return {
- type: 'retain',
- length: op
- };
- }
- if ( !Array.isArray( op ) ) {
-
Hoo man has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354557 )
Change subject: Add workaround for HHVM issue 6206
..
Add workaround for HHVM issue 6206
Just use the actual global on HHVM, like we do on
Zend, but avoid hitting the warning.
This is a workaround for https://github.com/facebook/hhvm/issues/6206
Bug: T111641
Change-Id: I15ef0e90827c94a8b2609484b0dddcb78f04284c
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/57/354557/1
diff --git a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index bc9f97c..3d30f96 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -1,5 +1,6 @@
mwGlobals[$globalKey] = clone
$GLOBALS[$globalKey];
} else {
+ if ( $GLOBALS[$globalKey] instanceof
Closure ) {
+ // Serializing Closure only
gives a warning on HHVM while
+ // it throws an Exception on
Zend.
+ // Workaround for
https://github.com/facebook/hhvm/issues/6206
+ $this->mwGlobals[$globalKey] =
$GLOBALS[$globalKey];
+ continue;
+ }
try {
$this->mwGlobals[$globalKey] =
unserialize( serialize( $GLOBALS[$globalKey] ) );
} catch ( Exception $e ) {
--
To view, visit https://gerrit.wikimedia.org/r/354557
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I15ef0e90827c94a8b2609484b0dddcb78f04284c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Hello Catrope, Divec, jenkins-bot, Jforrester,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/354556
to review the following change.
Change subject: Revert "rebaser: Make serializations shorter"
..
Revert "rebaser: Make serializations shorter"
Triggers a bug where selecting text and typing corrupts the model.
This reverts commit 30ebe4ed620efdbc1419ddba15017e1a0de649ae.
Change-Id: I46520ca1d2ad7b7cdbb518e4fb7e316b4bdcfb0a
---
M rebaser/logToTestCase.js
M src/dm/ve.dm.Change.js
M src/dm/ve.dm.IndexValueStore.js
M src/dm/ve.dm.Selection.js
M src/dm/ve.dm.Transaction.js
M src/dm/ve.dm.TransactionProcessor.js
M tests/dm/ve.dm.Change.test.js
7 files changed, 74 insertions(+), 134 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/56/354556/1
diff --git a/rebaser/logToTestCase.js b/rebaser/logToTestCase.js
index 82b27ae..24d4b4b 100644
--- a/rebaser/logToTestCase.js
+++ b/rebaser/logToTestCase.js
@@ -85,3 +85,9 @@
testCase = toTestCase( parsed );
process.stdout.write( JSON.stringify( testCase ) );
} );
+
+// acceptChange
+// submitChange
+// applyChange
+// newClient
+// disconnect
diff --git a/src/dm/ve.dm.Change.js b/src/dm/ve.dm.Change.js
index 63b1e8f..34c4c5e 100644
--- a/src/dm/ve.dm.Change.js
+++ b/src/dm/ve.dm.Change.js
@@ -714,7 +714,7 @@
* already, i.e. the Change object was created by #deserialize without
deserializing store values).
*
* @param {boolean} [preserveStoreValues] If true, keep store values verbatim
instead of serializing
- * @return {Object} Serialized change
+ * @return {ve.dm.Change} Deserialized change
*/
ve.dm.Change.prototype.serialize = function ( preserveStoreValues ) {
var author, serializeStoreValues, serializeStore,
diff --git a/src/dm/ve.dm.IndexValueStore.js b/src/dm/ve.dm.IndexValueStore.js
index d4933fb..08bf153 100644
--- a/src/dm/ve.dm.IndexValueStore.js
+++ b/src/dm/ve.dm.IndexValueStore.js
@@ -44,19 +44,18 @@
/**
* Deserialize a store from a JSONable object
*
- * The serialization format is experimental and subject to change
- *
* @param {Function} deserializeValue Deserializer for arbitrary store values
- * @param {Array} data Store serialized as a JSONable object
+ * @param {Object} data Store serialized as a JSONable object
* @return {ve.dm.IndexValueStore} Deserialized store
*/
ve.dm.IndexValueStore.static.deserialize = function ( deserializeValue, data )
{
- var i,
+ var hash,
store = new ve.dm.IndexValueStore();
- for ( i = 0; i < data.length; i++ ) {
- store.hashes.push( data[ i ][ 0 ] );
- store.hashStore[ data[ i ][ 0 ] ] = deserializeValue( data[ i
][ 1 ] );
+ store.hashes = data.hashes.slice();
+ store.hashStore = {};
+ for ( hash in data.hashStore ) {
+ store.hashStore[ hash ] = deserializeValue( data.hashStore[
hash ] );
}
return store;
};
@@ -65,8 +64,6 @@
/**
* Serialize the store into a JSONable object
- *
- * The serialization format is experimental and subject to change
*
* @param {Function} serializeValue Serializer for arbitrary store values
* @return {Object} Serialized store
@@ -78,9 +75,10 @@
for ( hash in this.hashStore ) {
serialized[ hash ] = serializeValue( this.hashStore[ hash ] );
}
- return this.hashes.map( function ( hash ) {
- return [ hash, serialized[ hash ] ];
- } );
+ return {
+ hashes: this.hashes.slice(),
+ hashStore: serialized
+ };
};
/**
diff --git a/src/dm/ve.dm.Selection.js b/src/dm/ve.dm.Selection.js
index 2de415f..c069e31 100644
--- a/src/dm/ve.dm.Selection.js
+++ b/src/dm/ve.dm.Selection.js
@@ -37,7 +37,7 @@
constructor = ve.dm.selectionFactory.lookup( hash.type );
if ( !constructor ) {
- throw new Error( 'Unknown selection type ' + hash.type );
+ throw new Error( 'Unknown selection type ' + hash.name );
}
return constructor.static.newFromHash( doc, hash );
diff --git a/src/dm/ve.dm.Transaction.js b/src/dm/ve.dm.Transaction.js
index 6f95498..604db67 100644
--- a/src/dm/ve.dm.Transaction.js
+++ b/src/dm/ve.dm.Transaction.js
@@ -69,61 +69,13 @@
/**
* Deserialize a transaction from a JSONable object
*
- * The serialization format is experimental and subject to change
- *
* @param {Object} data Transaction serialized as a JSONable object
* @return {ve.dm.Transaction} Deserialized transaction
*/
ve.dm.Transaction.static.deserialize = function ( data ) {
- function deserializeOp( op ) {
- var insert = [], remove = [];
- if ( typeof op === 'number' ) {
- return {
- type: 'retain',
- length: op
-
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354555 )
Change subject: Remove bogus comments
..
Remove bogus comments
Change-Id: Ia07b567c667effd6c972ca07fb8e75d63424fbf4
---
M Newsletter.hooks.php
M includes/content/NewsletterContent.php
2 files changed, 1 insertion(+), 1 deletion(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index a1abc6d..54a64b1 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -312,6 +312,7 @@
* @param User $user the User object representing the user whois
performing the edit.
* @param $minoredit bool whether the edit was marked as minor by the
user.
* @return bool
+* @throws ThrottledError
*/
public static function onEditFilterMergedContent( IContextSource
$context, Content $content,
Status $status,
$summary, User $user, $minoredit ) {
diff --git a/includes/content/NewsletterContent.php
b/includes/content/NewsletterContent.php
index 1188af3..4039492 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -447,7 +447,6 @@
* updates (relevant mostly for LinksUpdate).
* @param ParserOutput $parserOutput ParserOutput representing the
rendered version of the page after the edit.
* @return DataUpdate[]
-* @throws ThrottledError
*
* @see Content::getSecondaryDataUpdates()
*/
--
To view, visit https://gerrit.wikimedia.org/r/354555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia07b567c667effd6c972ca07fb8e75d63424fbf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/353345 )
Change subject: Use upstream PHP-Queue
..
Use upstream PHP-Queue
No longer maintaining our own fork.
Adds a no-op composer test command 'cause CI needs it. Will be filled with
the linter in a following patch.
Change-Id: Id3f11945265647f5b42a8e0ca8a0742fdc6cc0c7
---
M composer.json
M composer.lock
M vendor/autoload.php
D vendor/coderkungfu/php-queue/.gitreview
M vendor/coderkungfu/php-queue/README.md
M vendor/coderkungfu/php-queue/composer.json
M vendor/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
M vendor/coderkungfu/php-queue/demo/runners/README.md
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/Beanstalkd.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/IronMQ.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/Memcache.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/MongoDB.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
M vendor/coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
A vendor/coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
D vendor/coderkungfu/php-queue/src/PHPQueue/Interfaces/IndexedFifoQueueStore.php
D vendor/coderkungfu/php-queue/src/PHPQueue/Interfaces/KeyValueStore.php
A vendor/coderkungfu/php-queue/src/PHPQueue/Json.php
M vendor/coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
D vendor/coderkungfu/php-queue/test/PHPQueue/Backend/PredisZsetTest.php
M vendor/composer/ClassLoader.php
M vendor/composer/LICENSE
M vendor/composer/autoload_real.php
A vendor/composer/autoload_static.php
M vendor/composer/installed.json
26 files changed, 324 insertions(+), 544 deletions(-)
Approvals:
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/composer.json b/composer.json
index f975cc7..cbfb33f 100644
--- a/composer.json
+++ b/composer.json
@@ -10,10 +10,7 @@
"predis/predis": "^1.1",
"twig/twig": "^1.24"
},
- "repositories": [
- {
- "type": "vcs",
- "url":
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;
- }
- ]
+ "scripts": {
+ "test": []
+ }
}
diff --git a/composer.lock b/composer.lock
index dd9cb48..7adb902 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,7 @@
"Read more about it at
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
"This file is @generated automatically"
],
-"hash": "8cdabc8ebe4372d8741ce78469836c0a",
-"content-hash": "3adc65bd0805604d01cb5fddeea2f5f3",
+"content-hash": "1c0373bbf4c873b02a35dcb9b211010c",
"packages": [
{
"name": "clio/clio",
@@ -46,15 +45,21 @@
"console",
"daemon"
],
-"time": "2014-06-22 14:49:41"
+"time": "2014-06-22T14:49:41+00:00"
},
{
"name": "coderkungfu/php-queue",
"version": "dev-master",
"source": {
"type": "git",
-"url":
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
+"url": "https://github.com/CoderKungfu/php-queue.git;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99"
+},
+"dist": {
+"type": "zip",
+"url":
"https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99",
+"shasum": ""
},
"require": {
"clio/clio": "0.1.*",
@@ -62,15 +67,19 @@
"php": ">=5.3.0"
},
"require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"ext-memcache": "*",
+"iron-io/iron_mq": "dev-master",
+"microsoft/windowsazure": "dev-master",
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"predis/predis": "1.*"
},
"suggest": {
"Respect/Rest": "For a REST server to post job data",
"amazonwebservices/aws-sdk-for-php": "For AWS SQS backend
support (legacy version)",
"aws/aws-sdk-php": "For AWS SQS backend support",
"clio/clio": "Support for daemonizing PHP CLI runner",
-"ext-memcache": "*",
"fusesource/stomp-php": "For the STOMP backend",
01tonythomas has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354555 )
Change subject: Remove bogus comments
..
Remove bogus comments
Change-Id: Ia07b567c667effd6c972ca07fb8e75d63424fbf4
---
M Newsletter.hooks.php
M includes/content/NewsletterContent.php
2 files changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/55/354555/1
diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index a1abc6d..54a64b1 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -312,6 +312,7 @@
* @param User $user the User object representing the user whois
performing the edit.
* @param $minoredit bool whether the edit was marked as minor by the
user.
* @return bool
+* @throws ThrottledError
*/
public static function onEditFilterMergedContent( IContextSource
$context, Content $content,
Status $status,
$summary, User $user, $minoredit ) {
diff --git a/includes/content/NewsletterContent.php
b/includes/content/NewsletterContent.php
index 1188af3..4039492 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -447,7 +447,6 @@
* updates (relevant mostly for LinksUpdate).
* @param ParserOutput $parserOutput ParserOutput representing the
rendered version of the page after the edit.
* @return DataUpdate[]
-* @throws ThrottledError
*
* @see Content::getSecondaryDataUpdates()
*/
--
To view, visit https://gerrit.wikimedia.org/r/354555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia07b567c667effd6c972ca07fb8e75d63424fbf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/352068 )
Change subject: Retrofit GalleryCollectionFetchTask
..
Retrofit GalleryCollectionFetchTask
Adds a Retrofit client that supports query continuation in order to
retrive complete information for a gallery collection.
Bug: T152403
Change-Id: If8b2d0d96069f98949dd05120cba6c9eeb687095
---
M app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java
A app/src/main/java/org/wikipedia/gallery/FilePagesWithImageInfo.java
M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/gallery/GalleryCollection.java
A app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java
D app/src/main/java/org/wikipedia/gallery/GalleryCollectionFetchTask.java
M app/src/main/java/org/wikipedia/gallery/GalleryItem.java
M app/src/main/java/org/wikipedia/gallery/ImageLicenseFetchClient.java
M app/src/main/java/org/wikipedia/page/Page.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/test/java/org/wikipedia/gallery/ImageLicenseFetchClientTest.java
11 files changed, 282 insertions(+), 169 deletions(-)
Approvals:
Niedzielski: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java
b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java
index d3d5bfe..dd21fe2 100644
--- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java
+++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java
@@ -6,16 +6,22 @@
import com.google.gson.annotations.SerializedName;
import java.util.List;
+import java.util.Map;
public class MwQueryResponse extends MwResponse {
-@SuppressWarnings("unused") @SerializedName("batchcomplete")
-private boolean batchComplete;
+@SuppressWarnings("unused") @SerializedName("batchcomplete") private
boolean batchComplete;
+
+@SuppressWarnings("unused") @SerializedName("continue") @Nullable private
Map continuation;
@Nullable private T query;
public boolean batchComplete() {
return batchComplete;
+}
+
+@Nullable public Map getContinuation() {
+return continuation;
}
@Nullable public T query() {
@@ -26,13 +32,12 @@
return super.success() && query != null;
}
-@VisibleForTesting
-protected void setQuery(@Nullable T query) {
+@VisibleForTesting protected void setQuery(@Nullable T query) {
this.query = query;
}
public static class Pages {
-private List pages;
+@SuppressWarnings("unused") private List pages;
public List pages() {
return pages;
diff --git
a/app/src/main/java/org/wikipedia/gallery/FilePagesWithImageInfo.java
b/app/src/main/java/org/wikipedia/gallery/FilePagesWithImageInfo.java
new file mode 100644
index 000..d0a0975
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/gallery/FilePagesWithImageInfo.java
@@ -0,0 +1,24 @@
+package org.wikipedia.gallery;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import org.wikipedia.dataclient.mwapi.MwQueryPage;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class FilePagesWithImageInfo {
+@SuppressWarnings("unused") @Nullable private List pages;
+
+@NonNull Map images() {
+Map result = new HashMap<>();
+for (MwQueryPage page : pages) {
+if (page.imageInfo() != null) {
+result.put(page.title(), page.imageInfo());
+}
+}
+return result;
+}
+}
diff --git a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
index 8ecb458..c48a494 100644
--- a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
+++ b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
@@ -32,6 +32,7 @@
import org.wikipedia.WikipediaApp;
import org.wikipedia.activity.ThemedActionBarActivity;
import org.wikipedia.analytics.GalleryFunnel;
+import org.wikipedia.concurrency.CallbackTask;
import org.wikipedia.dataclient.WikiSite;
import org.wikipedia.feed.image.FeaturedImage;
import org.wikipedia.history.HistoryEntry;
@@ -77,6 +78,7 @@
@NonNull private ExclusiveBottomSheetPresenter bottomSheetPresenter = new
ExclusiveBottomSheetPresenter();
@Nullable private PageTitle pageTitle;
@Nullable private WikiSite wiki;
+@NonNull private GalleryCollectionClient client = new
GalleryCollectionClient();
private ViewGroup toolbarContainer;
private ViewGroup infoContainer;
@@ -466,25 +468,39 @@
return;
}
updateProgressBar(true, true, 0);
-new
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354552 )
Change subject: Throttle check should happen before hitting doUpdate()
..
Throttle check should happen before hitting doUpdate()
Change-Id: I32aed8bfa233c4894cd2755f80f8eefe57834ac4
---
M Newsletter.hooks.php
M includes/content/NewsletterContent.php
M includes/content/NewsletterDataUpdate.php
3 files changed, 10 insertions(+), 7 deletions(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 8427b51..a1abc6d 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -315,6 +315,7 @@
*/
public static function onEditFilterMergedContent( IContextSource
$context, Content $content,
Status $status,
$summary, User $user, $minoredit ) {
+ global $wgUser;
if ( !$context->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
return;
}
@@ -322,6 +323,11 @@
( !$content instanceof NewsletterContent ) ) {
return;
}
+ if ( $wgUser->pingLimiter( 'newsletter' ) ) {
+ // Default user access level for creating a newsletter
is quite low
+ // so add a throttle here to prevent abuse (eg. mass
vandalism spree)
+ throw new ThrottledError;
+ }
$newsletter = Newsletter::newFromName(
$context->getTitle()->getText() );
// Validate API Edit parameters
diff --git a/includes/content/NewsletterContent.php
b/includes/content/NewsletterContent.php
index 4039492..1188af3 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -447,6 +447,7 @@
* updates (relevant mostly for LinksUpdate).
* @param ParserOutput $parserOutput ParserOutput representing the
rendered version of the page after the edit.
* @return DataUpdate[]
+* @throws ThrottledError
*
* @see Content::getSecondaryDataUpdates()
*/
diff --git a/includes/content/NewsletterDataUpdate.php
b/includes/content/NewsletterDataUpdate.php
index 1d157d7..5dfb0de 100644
--- a/includes/content/NewsletterDataUpdate.php
+++ b/includes/content/NewsletterDataUpdate.php
@@ -63,11 +63,6 @@
return;
}
}
- if ( $this->user->pingLimiter( 'newsletter' ) ) {
- // Default user access level for creating a
newsletter is quite low
- // so add a throttle here to prevent abuse (eg.
mass vandalism spree)
- throw new ThrottledError;
- }
$title = Title::makeTitleSafe( NS_NEWSLETTER,
$this->name );
$newsletter = new Newsletter( 0,
$title->getText(),
@@ -78,10 +73,11 @@
if ( $newsletterCreated ) {
$newsletter->subscribe( $this->user );
$store->addPublisher( $newsletter, $this->user
);
- return Status::newGood();
+ return;
} else {
// Couldn't insert to the DB..
- return Status::newFatal(
'newsletter-create-error' );
+ $logger->warning( 'newsletter-create-error' );
+ return;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354552
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32aed8bfa233c4894cd2755f80f8eefe57834ac4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354526 )
Change subject: Add ValueView to Wikidata.localisation.php entry point
..
Add ValueView to Wikidata.localisation.php entry point
Change-Id: I053527e95a3015239f3ea879da42b8d14faedada
---
M Wikidata.localisation.php
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php
index 3b16336..0132552 100644
--- a/Wikidata.localisation.php
+++ b/Wikidata.localisation.php
@@ -23,5 +23,6 @@
require_once "$wgWikidataBaseDir/extensions/Quality/WikibaseQuality.php";
require_once
"$wgWikidataBaseDir/extensions/Constraints/WikibaseQualityConstraints.php";
require_once
"$wgWikidataBaseDir/extensions/ArticlePlaceholder/ArticlePlaceholder.php";
+require_once "$wgWikidataBaseDir/extensions/ValueView/ValueView.php";
require_once "$wgWikidataBaseDir/Wikidata.credits.php";
--
To view, visit https://gerrit.wikimedia.org/r/354526
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I053527e95a3015239f3ea879da42b8d14faedada
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/build-resources
Gerrit-Branch: master
Gerrit-Owner: Aude
Gerrit-Reviewer: Hoo man
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354525 )
Change subject: Add (empty) composer test script
..
Add (empty) composer test script
jenkins expects composer test script to be there
@todo make it actually test something
Change-Id: I46a90b1d05de0b864641e2b99828e74049ddeea1
---
M composer.json
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/composer.json b/composer.json
index 61ca3e8..e465826 100644
--- a/composer.json
+++ b/composer.json
@@ -50,7 +50,8 @@
},
"scripts": {
"post-install-cmd":
"Wikidata\\SettingsFileGenerator::generateDefaultSettings",
-"post-update-cmd":
"Wikidata\\SettingsFileGenerator::generateDefaultSettings"
+"post-update-cmd":
"Wikidata\\SettingsFileGenerator::generateDefaultSettings",
+"test": []
},
"config": {
"autoloader-suffix": "_mediawiki_extension_wikidata",
--
To view, visit https://gerrit.wikimedia.org/r/354525
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I46a90b1d05de0b864641e2b99828e74049ddeea1
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/build-resources
Gerrit-Branch: master
Gerrit-Owner: Aude
Gerrit-Reviewer: Addshore
Gerrit-Reviewer: Hoo man
Gerrit-Reviewer: Umherirrender
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Matěj Suchánek has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354554 )
Change subject: Update cfr templates for cswiki
..
Update cfr templates for cswiki
This was submitted as pull request on
https://github.com/wikimedia/pywikibot-core/pull/14
by Dvorapa.
Change-Id: I63842a2cc434ae1e421ec0d53694901e8283f6a7
---
M scripts/category.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/54/354554/1
diff --git a/scripts/category.py b/scripts/category.py
index 978d77a..1bef740 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -148,13 +148,14 @@
cfd_templates = {
'wikipedia': {
+'cs': ['přesunout', 'přejmenovat', 'přejmenovat kategorii',
+ 'přesunout kategorii', 'přejmenování kategorie'],
'en': [u'cfd', u'cfr', u'cfru', u'cfr-speedy', u'cfm', u'cfdu'],
'fi': [u'roskaa', u'poistettava', u'korjattava/nimi',
u'yhdistettäväLuokka'],
'fr': ['renommage de catégorie demandé'],
'he': [u'הצבעת מחיקה', u'למחוק'],
'nl': [u'categorieweg', u'catweg', u'wegcat', u'weg2'],
-'cs': ['přejmenovat kategorii', 'přesunout kategorii', 'přejmenování
kategorie'],
# For testing purposes
'test': [u'delete']
},
--
To view, visit https://gerrit.wikimedia.org/r/354554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63842a2cc434ae1e421ec0d53694901e8283f6a7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354524 )
Change subject: Remove github-oauth config
..
Remove github-oauth config
no longer needed/used
Change-Id: I4421a396ad0c05c3e40555dab068ddd1b47f29c0
---
M build/tasks/updatecomposer.js
M composer.json
2 files changed, 0 insertions(+), 4 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/build/tasks/updatecomposer.js b/build/tasks/updatecomposer.js
index 61fc87c..80d05cc 100644
--- a/build/tasks/updatecomposer.js
+++ b/build/tasks/updatecomposer.js
@@ -21,7 +21,6 @@
delete composer.require["wikibase/external-validation"];
delete composer.require["wikibase/media-info"];
- delete composer.config["github-oauth"];
composer.config["autoloader-suffix"] = autoloadSuffix( branch );
grunt.file.write( composerPath, JSON.stringify( composer, null,
'' ) );
diff --git a/composer.json b/composer.json
index a7b6f49..61ca3e8 100644
--- a/composer.json
+++ b/composer.json
@@ -53,9 +53,6 @@
"post-update-cmd":
"Wikidata\\SettingsFileGenerator::generateDefaultSettings"
},
"config": {
-"github-oauth":{
-"github.com":"845d568f46a682fbf7fc5f92ed9397fc4ebdc072"
-},
"autoloader-suffix": "_mediawiki_extension_wikidata",
"prepend-autoloader": false,
"optimize-autoloader": true,
--
To view, visit https://gerrit.wikimedia.org/r/354524
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4421a396ad0c05c3e40555dab068ddd1b47f29c0
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/build-resources
Gerrit-Branch: master
Gerrit-Owner: Aude
Gerrit-Reviewer: Addshore
Gerrit-Reviewer: Hoo man
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
MtDu has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354553 )
Change subject: Use newsletter-unsubscribe-text instead of
newsletter-subscribe-text
..
Use newsletter-unsubscribe-text instead of newsletter-subscribe-text
Bug: T159081
Change-Id: Ib87003326e475cda25f55255f29caf4fd4359326
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/53/354553/1
diff --git a/includes/specials/SpecialNewsletter.php
b/includes/specials/SpecialNewsletter.php
index a92a5f6..1225aa5 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -198,7 +198,7 @@
if ( $this->newsletter->isSubscribed( $this->getUser() ) ) {
// User is subscribed so show the unsubscribe form
- $txt = $this->msg( 'newsletter-subscribe-text' )
+ $txt = $this->msg( 'newsletter-unsubscribe-text' )
->rawParams( $this->getEscapedName() )->parse();
$button = [
'unsubscribe' => [
--
To view, visit https://gerrit.wikimedia.org/r/354553
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib87003326e475cda25f55255f29caf4fd4359326
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: MtDu
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354371 )
Change subject: Store order id in invoice_id column
..
Store order id in invoice_id column
Perfect place for an id we generate ourselves
Bug: T165696
Change-Id: I64cd822b17b61fe1d0553bb113e45ec8af077a13
---
M sites/all/modules/queue2civicrm/tests/phpunit/DonationQueueTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 7 insertions(+), 0 deletions(-)
Approvals:
Mepps: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/sites/all/modules/queue2civicrm/tests/phpunit/DonationQueueTest.php
b/sites/all/modules/queue2civicrm/tests/phpunit/DonationQueueTest.php
index c221efd..6028af3 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/DonationQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/DonationQueueTest.php
@@ -61,6 +61,7 @@
'financial_type' => 'Cash',
'contribution_status' => 'Completed',
'payment_instrument' => 'Credit Card: Visa',
+ 'invoice_id' => $message->get('order_id'),
$campaignField => '',
);
$returnFields = array_keys( $expected );
@@ -100,6 +101,7 @@
'financial_type' => 'Cash',
'contribution_status' => 'Completed',
'payment_instrument' => 'Credit Card: Visa',
+ 'invoice_id' => $message2->get('order_id'),
$campaignField => 'Benefactor Gift',
);
$this->assertArraySubset( $expected, $contribution2 );
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index f4754b6..3e3c91c 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -352,6 +352,11 @@
$contribution[ 'thankyou_date' ] = wmf_common_date_unix_to_civicrm(
$msg['thankyou_date'] );
}
+// Store the identifier we generated on payments
+if ( !empty( $msg['order_id'] ) ) {
+$contribution['invoice_id'] = $msg['order_id'];
+}
+
/**
* Hopefully the Civi API will eventually handle custom fields in the
* above "Create" call.
--
To view, visit https://gerrit.wikimedia.org/r/354371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I64cd822b17b61fe1d0553bb113e45ec8af077a13
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg
Gerrit-Reviewer: AndyRussG
Gerrit-Reviewer: Awight
Gerrit-Reviewer: Cdentinger
Gerrit-Reviewer: Eileen
Gerrit-Reviewer: Ejegg
Gerrit-Reviewer: Katie Horn
Gerrit-Reviewer: Mepps
Gerrit-Reviewer: XenoRyet
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354374 )
Change subject: Quit stuffing order_id with other fields
..
Quit stuffing order_id with other fields
Turns out we're no longer using it for a log identifier, and it's
valuable to know whether the message actually came in with one.
Bug: T165696
Change-Id: Ifdfac6e4b0eae267aaebcf140a55d6d3de44213c
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 0 insertions(+), 24 deletions(-)
Approvals:
Mepps: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 6aeeab7..f4754b6 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1772,30 +1772,6 @@
}
}
-// Order ID is used as a message identifier in a bunch of places.
-// If it's missing, fill it with something unique-ish.
-if ( !isset( $msg[ 'order_id' ] ) ) {
-watchdog(
-'wmf_civicrm',
-'Message is missing order_id, looking for a substitute
identifier.',
-array(),
-WATCHDOG_INFO
-);
-$keys = array( 'contribution_tracking_id', 'gateway_txn_id' );
-foreach ( $keys as $key ) {
-if ( isset( $msg[$key] ) ) {
-watchdog(
-'wmf_civicrm',
-"Filling order_id with {$msg[$key]} from key $key.",
-array(),
-WATCHDOG_INFO
-);
-$msg['order_id'] = $msg[$key];
-break;
-}
-}
-}
-
if ( $msg['recurring'] and !isset( $msg['start_date'] ) ) {
$msg['start_date'] = $msg['date'];
$msg['create_date'] = $msg['date'];
--
To view, visit https://gerrit.wikimedia.org/r/354374
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdfac6e4b0eae267aaebcf140a55d6d3de44213c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg
Gerrit-Reviewer: AndyRussG
Gerrit-Reviewer: Awight
Gerrit-Reviewer: Cdentinger
Gerrit-Reviewer: Eileen
Gerrit-Reviewer: Ejegg
Gerrit-Reviewer: Katie Horn
Gerrit-Reviewer: Mepps
Gerrit-Reviewer: XenoRyet
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
01tonythomas has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354552 )
Change subject: Throttle check should happen before hitting doUpdate()
..
Throttle check should happen before hitting doUpdate()
Change-Id: I32aed8bfa233c4894cd2755f80f8eefe57834ac4
---
M includes/content/NewsletterContent.php
M includes/content/NewsletterDataUpdate.php
2 files changed, 8 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/52/354552/1
diff --git a/includes/content/NewsletterContent.php
b/includes/content/NewsletterContent.php
index 4039492..e165b9b 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -447,6 +447,7 @@
* updates (relevant mostly for LinksUpdate).
* @param ParserOutput $parserOutput ParserOutput representing the
rendered version of the page after the edit.
* @return DataUpdate[]
+* @throws ThrottledError
*
* @see Content::getSecondaryDataUpdates()
*/
@@ -454,6 +455,11 @@
ParserOutput $parserOutput =
null
) {
global $wgUser;
+ if ( $wgUser->pingLimiter( 'newsletter' ) ) {
+ // Default user access level for creating a newsletter
is quite low
+ // so add a throttle here to prevent abuse (eg. mass
vandalism spree)
+ throw new ThrottledError;
+ }
// @todo This user object might not be the right one in some
cases.
// but that should be pretty rare in the context of newsletters.
$mwUpdate = new NewsletterDataUpdate( $this, $title, $wgUser );
diff --git a/includes/content/NewsletterDataUpdate.php
b/includes/content/NewsletterDataUpdate.php
index 1d157d7..6831b9f 100644
--- a/includes/content/NewsletterDataUpdate.php
+++ b/includes/content/NewsletterDataUpdate.php
@@ -63,11 +63,6 @@
return;
}
}
- if ( $this->user->pingLimiter( 'newsletter' ) ) {
- // Default user access level for creating a
newsletter is quite low
- // so add a throttle here to prevent abuse (eg.
mass vandalism spree)
- throw new ThrottledError;
- }
$title = Title::makeTitleSafe( NS_NEWSLETTER,
$this->name );
$newsletter = new Newsletter( 0,
$title->getText(),
@@ -78,10 +73,10 @@
if ( $newsletterCreated ) {
$newsletter->subscribe( $this->user );
$store->addPublisher( $newsletter, $this->user
);
- return Status::newGood();
+ return;
} else {
// Couldn't insert to the DB..
- return Status::newFatal(
'newsletter-create-error' );
+ $logger->warning( 'newsletter-create-error' );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/354552
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I32aed8bfa233c4894cd2755f80f8eefe57834ac4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354370 )
Change subject: Add gateway_session_id to queue messages
..
Add gateway_session_id to queue messages
Just for PayPal EC so far. Eventually we we want this for Ingenico
hosted checkout id as well.
Bug: T165687
Change-Id: I1ee4b8646a4d2c18c25bbb1ea68ee04c2e436656
---
M gateway_common/DonationData.php
M gateway_common/DonationQueue.php
M paypal_gateway/express_checkout/config/var_map.yaml
M paypal_gateway/express_checkout/paypal_express.adapter.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
A tests/phpunit/includes/Responses/paypal_ec/SetExpressCheckout_OK.testresponse
6 files changed, 60 insertions(+), 2 deletions(-)
Approvals:
Mepps: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 72aac42..bfd3178 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -935,6 +935,7 @@
'amount',
'user_ip',
'date',
+ 'gateway_session_id',
);
}
diff --git a/gateway_common/DonationQueue.php b/gateway_common/DonationQueue.php
index 97f4816..918ffd5 100644
--- a/gateway_common/DonationQueue.php
+++ b/gateway_common/DonationQueue.php
@@ -213,6 +213,7 @@
'email' => 'email',
'first_name' => 'fname',
'gross' => 'amount',
+ 'gateway_session_id' => 'gateway_session_id',
'last_name' => 'lname',
'optout' => 'optout',
'recurring' => 'recurring',
diff --git a/paypal_gateway/express_checkout/config/var_map.yaml
b/paypal_gateway/express_checkout/config/var_map.yaml
index 9bac3f2..fec9188 100644
--- a/paypal_gateway/express_checkout/config/var_map.yaml
+++ b/paypal_gateway/express_checkout/config/var_map.yaml
@@ -27,4 +27,4 @@
# TODO: discuss whether to capture
#PHONENUM: phone
RETURNURL: returnto
-TOKEN: ec_token
+TOKEN: gateway_session_id
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 481d94b..0e62ecb 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -415,6 +415,7 @@
case 'SetExpressCheckout':
case 'SetExpressCheckout_recurring':
$this->checkResponseAck( $response );
+ $this->addResponseData( $this->unstageKeys(
$response ) );
$this->transaction_response->setRedirect(
$this->account_config['RedirectURL'] .
$response['TOKEN'] );
break;
@@ -517,7 +518,7 @@
public function processDonorReturn( $requestValues ) {
$this->addRequestData( array(
- 'ec_token' => $requestValues['token'],
+ 'gateway_session_id' => $requestValues['token'],
'payer_id' => $requestValues['PayerID'],
) );
$resultData = $this->do_transaction(
'GetExpressCheckoutDetails' );
diff --git a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
index ac4dba3..9c3170c 100644
--- a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
+++ b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
@@ -36,6 +36,58 @@
}
}
+ function testPaymentSetup() {
+ $init = array(
+ 'amount' => 1.55,
+ 'currency_code' => 'USD',
+ 'payment_method' => 'paypal',
+ 'utm_source' => 'CD1234_FR',
+ 'utm_medium' => 'sitenotice',
+ 'country' => 'US',
+ 'contribution_tracking_id' => strval( mt_rand() ),
+ 'language' => 'fr',
+ );
+ $gateway = $this->getFreshGatewayObject( $init );
+ $gateway->setDummyGatewayResponseCode( 'OK' );
+ $result = $gateway->doPayment();
+ $gateway->logPending(); // GatewayPage calls this for redirects
+ $this->assertEquals(
+
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout=EC-8US12345X1234567U',
+ $result->getRedirect(),
+ 'Wrong redirect for PayPal EC payment setup'
+ );
+ $message = DonationQueue::instance()->pop( 'pending' );
+ $this->assertNotEmpty( $message, 'Missing pending message' );
+
Arlolra has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354551 )
Change subject: T115395: Run parsertests with the batch api enabled
..
T115395: Run parsertests with the batch api enabled
Change-Id: I892117d745094b6a5f19695f385de3956f0780f6
---
M bin/parserTests.js
M tests/mockAPI.js
2 files changed, 113 insertions(+), 97 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/51/354551/1
diff --git a/bin/parserTests.js b/bin/parserTests.js
index 15f160a..9d0e331 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -997,6 +997,8 @@
parsoidConfig.loadWMF = false;
parsoidConfig.initMwApiMap();
+ parsoidConfig.useBatchAPI = true;
+
// Needed for bidi-char-scrubbing html2wt tests.
parsoidConfig.scrubBidiChars = true;
diff --git a/tests/mockAPI.js b/tests/mockAPI.js
index 571f479..4ac3fe8 100644
--- a/tests/mockAPI.js
+++ b/tests/mockAPI.js
@@ -273,6 +273,80 @@
}
};
+var imageInfo = function(filename, twidth, theight, useBatchAPI) {
+ var normPagename = pnames[filename] || filename;
+ var normFilename = fnames[filename] || filename;
+ if (!(normFilename in FILE_PROPS)) {
+ return null;
+ }
+ var props = FILE_PROPS[normFilename] || Object.create(null);
+ var md5 = crypto.createHash('md5').update(normFilename).digest('hex');
+ var md5prefix = md5[0] + '/' + md5[0] + md5[1] + '/';
+ var baseurl = IMAGE_BASE_URL + '/' + md5prefix + normFilename;
+ var height = props.hasOwnProperty('height') ? props.height : 220;
+ var width = props.hasOwnProperty('width') ? props.width : 1941;
+ var turl = IMAGE_BASE_URL + '/thumb/' + md5prefix + normFilename;
+ var durl = IMAGE_DESC_URL + '/' + normFilename;
+ var mediatype = props.mediatype ||
+ (props.mime === 'image/svg+xml' ? 'DRAWING' : 'BITMAP');
+ var result = {
+ size: props.size || 12345,
+ height: height,
+ width: width,
+ url: baseurl,
+ descriptionurl: durl,
+ mediatype: mediatype,
+ mime: props.mime,
+ };
+ if (props.hasOwnProperty('duration')) {
+ result.duration = props.duration;
+ }
+ if (twidth || theight) {
+ if (twidth && (theight === undefined || theight === null)) {
+ // File::scaleHeight in PHP
+ theight = Math.round(height * twidth / width);
+ } else if (theight && (twidth === undefined || twidth ===
null)) {
+ // MediaHandler::fitBoxWidth in PHP
+ // This is crazy!
+ var idealWidth = width * theight / height;
+ var roundedUp = Math.ceil(idealWidth);
+ if (Math.round(roundedUp * height / width) > theight) {
+ twidth = Math.floor(idealWidth);
+ } else {
+ twidth = roundedUp;
+ }
+ } else {
+ if (Math.round(height * twidth / width) > theight) {
+ twidth = Math.ceil(width * theight / height);
+ } else {
+ theight = Math.round(height * twidth / width);
+ }
+ }
+ var urlWidth = twidth;
+ if (twidth >= width || theight >= height) {
+ // The PHP api won't enlarge an image ... but the batch
api will.
+ if (!useBatchAPI) {
+ twidth = width;
+ theight = height;
+ }
+ urlWidth = width; // That right?
+ }
+ turl += '/' + urlWidth + 'px-' + normFilename;
+ result.thumbwidth = twidth;
+ result.thumbheight = theight;
+ result.thumburl = turl;
+ }
+ return {
+ result: result,
+ normPagename: normPagename,
+ };
+};
+
+var querySiteinfo = function(body, cb) {
+ // TODO: Read which language should we use from somewhere.
+ cb(null, require('../lib/config/baseconfig/enwiki.json'));
+};
+
var availableActions = {
parse: function(body, cb) {
var resultText;
@@ -306,16 +380,10 @@
cb(null, { parse: { text: { '*': resultText } } });
},
- querySiteinfo: function(body, cb) {
- // TODO: Read which language should we use from somewhere.
- cb(null, require('../lib/config/baseconfig/enwiki.json'));
- },
-
query: function(body, cb) {
if (body.meta ===
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354461 )
Change subject: Remove unused functions from NewsletterStore
..
Remove unused functions from NewsletterStore
* NewsletterStore::getNewslettersUserIsPublisherOf()
* NewsletterStore::getNewsletterForPageId()
* NewsletterStore::newsletterExistsWithName()
Bug: T159081
Change-Id: I97e950e493ecd3dfdeed7944a2ccd37fea224bd0
---
M includes/NewsletterDb.php
M includes/NewsletterStore.php
2 files changed, 0 insertions(+), 93 deletions(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/NewsletterDb.php b/includes/NewsletterDb.php
index 9cf1494..1c0d795 100644
--- a/includes/NewsletterDb.php
+++ b/includes/NewsletterDb.php
@@ -351,70 +351,6 @@
}
/**
-* @param int $id
-*
-* @return Newsletter
-*/
- public function getNewsletterForPageId( $id ) {
- Assert::parameterType( 'integer', $id, '$id' );
-
- $dbr = $this->lb->getConnection( DB_SLAVE );
-
- $res = $dbr->select(
- 'nl_newsletters',
- [ 'nl_id', 'nl_name', 'nl_desc', 'nl_main_page_id' ],
- [ 'nl_main_page_id' => $id, 'nl_active' => 1 ],
- __METHOD__
- );
- $this->lb->reuseConnection( $dbr );
-
- return $this->getNewsletterFromRow( $res->current() );
- }
-
- /**
-* @param User $user
-*
-* @return Newsletter[]
-*/
- public function getNewslettersUserIsPublisherOf( User $user ) {
- $dbr = $this->lb->getConnection( DB_SLAVE );
-
- $res = $dbr->select(
- [ 'nl_publishers', 'nl_newsletters' ],
- [ 'nl_id', 'nl_name', 'nl_desc', 'nl_main_page_id' ],
- [ 'nlp_publisher_id' => $user->getId(), 'nl_active' =>
1 ],
- __METHOD__,
- [],
- [ 'nl_newsletters' => [ 'LEFT JOIN',
'nl_id=nlp_newsletter_id' ] ]
- );
- $this->lb->reuseConnection( $dbr );
-
- return $this->getNewslettersFromResult( $res );
- }
-
- /**
-* Fetch all newsletter names
-*
-* @param string $name
-* @return bool|ResultWrapper
-* @throws DBUnexpectedError
-* @throws MWException
-*/
- public function newsletterExistsWithName( $name ) {
- Assert::parameterType( 'string', $name, '$name' );
- $dbr = $this->lb->getConnection( DB_SLAVE );
-
- $res = $dbr->select(
- 'nl_newsletters',
- [ 'nl_name' ],
- [ 'nl_name' => $name ]
- );
-
- $this->lb->reuseConnection( $dbr );
- return $res;
- }
-
- /**
* Fetch all newsletter Main Pages
*
* @param int $mainPageId
diff --git a/includes/NewsletterStore.php b/includes/NewsletterStore.php
index 456afdb..913518d 100644
--- a/includes/NewsletterStore.php
+++ b/includes/NewsletterStore.php
@@ -199,35 +199,6 @@
}
/**
-* @param int $id
-*
-* @return Newsletter
-*/
- public function getNewsletterForPageId( $id ) {
- return $this->db->getNewsletterForPageId( $id );
- }
-
- /**
-* @param User $user
-*
-* @return Newsletter[]
-*/
- public function getNewslettersUserIsPublisherOf( User $user ) {
- return $this->db->getNewslettersUserIsPublisherOf( $user );
- }
-
- /**
-* Fetch all newsletter names
-*
-* @param string $name
-* @return bool|ResultWrapper
-* @throws MWException
-*/
- public function newsletterExistsWithName( $name ) {
- return $this->db->newsletterExistsWithName( $name );
- }
-
- /**
* Fetch all newsletter Main Pages
*
* @param int $mainPageId
--
To view, visit https://gerrit.wikimedia.org/r/354461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I97e950e493ecd3dfdeed7944a2ccd37fea224bd0
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: MtDu
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Brian Wolff
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
Hoo man has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354550 )
Change subject: Prevent saving duplicate Terms in TermSqlIndex::insertTerms
..
Prevent saving duplicate Terms in TermSqlIndex::insertTerms
And debug log these cases.
Bug: T163551
Change-Id: I75579a6176c0fffc93852803f5b644cb499d1f1e
---
M lib/includes/Store/Sql/TermSqlIndex.php
M lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
2 files changed, 61 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/50/354550/1
diff --git a/lib/includes/Store/Sql/TermSqlIndex.php
b/lib/includes/Store/Sql/TermSqlIndex.php
index 3b9df4e..8004451 100644
--- a/lib/includes/Store/Sql/TermSqlIndex.php
+++ b/lib/includes/Store/Sql/TermSqlIndex.php
@@ -208,12 +208,31 @@
$success = true;
foreach ( $terms as $term ) {
+ $fields = array_merge(
+ $this->getTermFields( $term ),
+ $entityIdentifiers
+ );
+
+ $hasRow = $dbw->selectField(
+ $this->tableName,
+ '1',
+ // Don't try to compare term_weight as it is a
float
+ array_diff_key( $fields, [ 'term_weight' => 1 ]
),
+ __METHOD__
+ );
+
+ if ( $hasRow ) {
+ wfDebugLog(
+ 'TermSqlIndex-duplicate',
+ 'Attempted to insert duplicate Term
into ' . $this->tableName .
+ ' for ' .
$entityId->getSerialization() . ': ' . implode( ', ', $fields )
+ );
+ continue;
+ }
+
$success = $dbw->insert(
$this->tableName,
- array_merge(
- $this->getTermFields( $term ),
- $entityIdentifiers
- ),
+ $fields,
__METHOD__,
array( 'IGNORE' )
);
diff --git a/lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
b/lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
index c33d458..4169f55 100644
--- a/lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
+++ b/lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
@@ -21,6 +21,7 @@
use Wikibase\TermSqlIndex;
use Wikibase\WikibaseSettings;
use Wikimedia\Assert\ParameterAssertionException;
+use Wikimedia\TestingAccessWrapper;
/**
* @covers Wikibase\TermSqlIndex
@@ -634,4 +635,41 @@
$this->assertSame( 'Q1112362', $row->term_full_entity_id );
}
+ public function testInsertTerms_duplicate() {
+ $item = new Item( new ItemId( 'Q1112362' ) );
+ $termEs = new TermIndexEntry( [
+ 'entityId' => $item->getId(),
+ 'termText' => 'Spanish',
+ 'termLanguage' => 'es',
+ 'termType' => 'description'
+ ] );
+ $termDe = new TermIndexEntry( [
+ 'entityId' => $item->getId(),
+ 'termText' => 'German',
+ 'termLanguage' => 'de',
+ 'termType' => 'description'
+ ] );
+
+ $termIndex = $this->getTermIndex();
+ $termIndex->setReadFullEntityIdColumn( true );
+ $termIndex = TestingAccessWrapper::newFromObject( $termIndex );
+
+ $this->assertTrue(
+ $termIndex->insertTerms(
+ $item,
+ [ $termEs, $termDe, $termEs ],
+ $termIndex->getConnection( DB_MASTER )
+ )
+ );
+
+ $rowCount = $this->db->selectRowCount(
+ 'wb_terms',
+ null,
+ [ 'term_entity_id' => '1112362', 'term_entity_type' =>
'item' ],
+ __METHOD__
+ );
+
+ $this->assertSame( 2, $rowCount );
+ }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/354550
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I75579a6176c0fffc93852803f5b644cb499d1f1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man
___
MediaWiki-commits mailing list
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354484 )
Change subject: Do not assume that all lead image thumb URLs are without scheme
..
Do not assume that all lead image thumb URLs are without scheme
Until now, the app expects to get a thumb image URL returned from the API,
which does not contain a scheme. This isn't true, at least not for all
third-parties, where probably a https URL is returned through the API. The
app now handles these URLs by parsing the returned URL to an URI object
and sets the scheme from the WikiSite only, if there's no scheme in the
URL already.
Until now, the current implemented handling would result in stupid things
like:
httpshttps://uploads.wikipedia.org...
Bug: T165495
Change-Id: I96d624a3bdfe0c76890a1993dc31eb3af600a1bc
---
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
1 file changed, 25 insertions(+), 13 deletions(-)
Approvals:
Niedzielski: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
index d935c98..931673b 100755
--- a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
@@ -3,6 +3,7 @@
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.PointF;
+import android.net.Uri;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -205,26 +206,37 @@
loadLeadImage(getLeadImageUrl());
}
-/**
- * @param url Nullable URL with no scheme. For example, foo.bar.com/
instead of
- *http://foo.bar.com/.
- */
private void loadLeadImage(@Nullable String url) {
if (!isMainPage() && !TextUtils.isEmpty(url) && isLeadImageEnabled()) {
-String fullUrl = getTitle().getWikiSite().scheme() + ":" + url;
-pageHeaderView.loadImage(fullUrl);
+pageHeaderView.loadImage(url);
} else {
pageHeaderView.loadImage(null);
}
}
-/**
- * @return Nullable URL with no scheme. For example, foo.bar.com/ instead
of
- * http://foo.bar.com/.
- */
-@Nullable
-private String getLeadImageUrl() {
-return getPage() == null ? null :
getPage().getPageProperties().getLeadImageUrl();
+@Nullable private String getLeadImageUrl() {
+String url = getPage() == null ? null :
getPage().getPageProperties().getLeadImageUrl();
+if (url == null) {
+return null;
+}
+
+// Conditionally add the PageTitle's URL scheme and authority if these
are missing from the
+// PageProperties' URL.
+Uri fullUri = Uri.parse(url);
+String scheme = getTitle().getWikiSite().scheme();
+String authority = getTitle().getWikiSite().authority();
+
+if (fullUri.getScheme() != null) {
+scheme = fullUri.getScheme();
+}
+if (fullUri.getAuthority() != null) {
+authority = fullUri.getAuthority();
+}
+return new Uri.Builder()
+.scheme(scheme)
+.authority(authority)
+.path(fullUri.getPath())
+.toString();
}
private void startKenBurnsAnimation() {
--
To view, visit https://gerrit.wikimedia.org/r/354484
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I96d624a3bdfe0c76890a1993dc31eb3af600a1bc
Gerrit-PatchSet: 5
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow
Gerrit-Reviewer: BearND
Gerrit-Reviewer: Dbrant
Gerrit-Reviewer: Florianschmidtwelzow
Gerrit-Reviewer: Mholloway
Gerrit-Reviewer: Niedzielski
Gerrit-Reviewer: Sniedzielski
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/354545 )
Change subject: Hygiene: Move ImageLicense, -FetchClient[Test] to
org.wikipedia.gallery
..
Hygiene: Move ImageLicense, -FetchClient[Test] to org.wikipedia.gallery
Change-Id: I8b4e829438fa4464324378be335a0ebdd0d8a1d0
---
M app/src/main/java/org/wikipedia/gallery/FeaturedImageGalleryItem.java
M app/src/main/java/org/wikipedia/gallery/GalleryItem.java
R app/src/main/java/org/wikipedia/gallery/ImageLicense.java
R app/src/main/java/org/wikipedia/gallery/ImageLicenseFetchClient.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
R app/src/test/java/org/wikipedia/gallery/ImageLicenseFetchClientTest.java
7 files changed, 8 insertions(+), 9 deletions(-)
Approvals:
Niedzielski: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/app/src/main/java/org/wikipedia/gallery/FeaturedImageGalleryItem.java
b/app/src/main/java/org/wikipedia/gallery/FeaturedImageGalleryItem.java
index 22a1b72..fb8f157 100644
--- a/app/src/main/java/org/wikipedia/gallery/FeaturedImageGalleryItem.java
+++ b/app/src/main/java/org/wikipedia/gallery/FeaturedImageGalleryItem.java
@@ -3,7 +3,6 @@
import android.support.annotation.NonNull;
import org.wikipedia.feed.image.FeaturedImage;
-import org.wikipedia.page.ImageLicense;
class FeaturedImageGalleryItem extends GalleryItem {
diff --git a/app/src/main/java/org/wikipedia/gallery/GalleryItem.java
b/app/src/main/java/org/wikipedia/gallery/GalleryItem.java
index f5841ca..f5a427a 100644
--- a/app/src/main/java/org/wikipedia/gallery/GalleryItem.java
+++ b/app/src/main/java/org/wikipedia/gallery/GalleryItem.java
@@ -6,7 +6,6 @@
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import org.wikipedia.page.ImageLicense;
import java.util.HashMap;
import java.util.Iterator;
diff --git a/app/src/main/java/org/wikipedia/page/ImageLicense.java
b/app/src/main/java/org/wikipedia/gallery/ImageLicense.java
similarity index 96%
rename from app/src/main/java/org/wikipedia/page/ImageLicense.java
rename to app/src/main/java/org/wikipedia/gallery/ImageLicense.java
index 68a34ed..055bd45 100644
--- a/app/src/main/java/org/wikipedia/page/ImageLicense.java
+++ b/app/src/main/java/org/wikipedia/gallery/ImageLicense.java
@@ -1,10 +1,9 @@
-package org.wikipedia.page;
+package org.wikipedia.gallery;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import org.wikipedia.R;
-import org.wikipedia.gallery.ExtMetadata;
import static org.apache.commons.lang3.StringUtils.defaultString;
diff --git a/app/src/main/java/org/wikipedia/page/ImageLicenseFetchClient.java
b/app/src/main/java/org/wikipedia/gallery/ImageLicenseFetchClient.java
similarity index 97%
rename from app/src/main/java/org/wikipedia/page/ImageLicenseFetchClient.java
rename to app/src/main/java/org/wikipedia/gallery/ImageLicenseFetchClient.java
index d2dedf3..d8bbeb0 100644
--- a/app/src/main/java/org/wikipedia/page/ImageLicenseFetchClient.java
+++ b/app/src/main/java/org/wikipedia/gallery/ImageLicenseFetchClient.java
@@ -1,4 +1,4 @@
-package org.wikipedia.page;
+package org.wikipedia.gallery;
import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
@@ -8,6 +8,7 @@
import org.wikipedia.dataclient.mwapi.MwQueryPage;
import org.wikipedia.dataclient.mwapi.MwQueryResponse;
import org.wikipedia.dataclient.retrofit.MwCachedService;
+import org.wikipedia.page.PageTitle;
import java.io.IOException;
diff --git a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
index bfc2990..6d17a1f 100755
--- a/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
+++ b/app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
@@ -26,8 +26,8 @@
import org.wikipedia.analytics.ShareAFactFunnel;
import org.wikipedia.bridge.CommunicationBridge;
import org.wikipedia.dataclient.mwapi.MwQueryResponse;
-import org.wikipedia.page.ImageLicense;
-import org.wikipedia.page.ImageLicenseFetchClient;
+import org.wikipedia.gallery.ImageLicense;
+import org.wikipedia.gallery.ImageLicenseFetchClient;
import org.wikipedia.page.Namespace;
import org.wikipedia.page.NoDimBottomSheetDialog;
import org.wikipedia.page.Page;
diff --git a/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
b/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
index 90a38da..53d34b5 100644
--- a/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
+++ b/app/src/main/java/org/wikipedia/page/snippet/SnippetImage.java
@@ -22,7 +22,7 @@
import android.text.TextUtils;
import org.wikipedia.R;
-import org.wikipedia.page.ImageLicense;
+import org.wikipedia.gallery.ImageLicense;
import
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/350262 )
Change subject: Remove Verisign secure seal
..
Remove Verisign secure seal
Bug: T163807
Change-Id: I36ad575169cd4812ab41135de3e27606a61b4e34
---
M gateway_common/i18n/interface/af.json
M gateway_common/i18n/interface/ar.json
M gateway_common/i18n/interface/ast.json
M gateway_common/i18n/interface/ba.json
M gateway_common/i18n/interface/be-tarask.json
M gateway_common/i18n/interface/bg.json
M gateway_common/i18n/interface/bn.json
M gateway_common/i18n/interface/br.json
M gateway_common/i18n/interface/ca.json
M gateway_common/i18n/interface/cs.json
M gateway_common/i18n/interface/cy.json
M gateway_common/i18n/interface/da.json
M gateway_common/i18n/interface/de.json
M gateway_common/i18n/interface/dsb.json
M gateway_common/i18n/interface/el.json
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/eo.json
M gateway_common/i18n/interface/es.json
M gateway_common/i18n/interface/et.json
M gateway_common/i18n/interface/fa.json
M gateway_common/i18n/interface/fi.json
M gateway_common/i18n/interface/fr.json
M gateway_common/i18n/interface/frp.json
M gateway_common/i18n/interface/gl.json
M gateway_common/i18n/interface/gsw.json
M gateway_common/i18n/interface/he.json
M gateway_common/i18n/interface/hi.json
M gateway_common/i18n/interface/hr.json
M gateway_common/i18n/interface/hsb.json
M gateway_common/i18n/interface/hu.json
M gateway_common/i18n/interface/ia.json
M gateway_common/i18n/interface/id.json
M gateway_common/i18n/interface/it.json
M gateway_common/i18n/interface/ja.json
M gateway_common/i18n/interface/jv.json
M gateway_common/i18n/interface/ka.json
M gateway_common/i18n/interface/ko.json
M gateway_common/i18n/interface/ksh.json
M gateway_common/i18n/interface/lb.json
M gateway_common/i18n/interface/lij.json
M gateway_common/i18n/interface/lt.json
M gateway_common/i18n/interface/lv.json
M gateway_common/i18n/interface/map-bms.json
M gateway_common/i18n/interface/mk.json
M gateway_common/i18n/interface/ml.json
M gateway_common/i18n/interface/ms.json
M gateway_common/i18n/interface/mt.json
M gateway_common/i18n/interface/nb.json
M gateway_common/i18n/interface/nl.json
M gateway_common/i18n/interface/or.json
M gateway_common/i18n/interface/pl.json
M gateway_common/i18n/interface/pms.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/pt.json
M gateway_common/i18n/interface/qqq.json
M gateway_common/i18n/interface/qu.json
M gateway_common/i18n/interface/ro.json
M gateway_common/i18n/interface/roa-tara.json
M gateway_common/i18n/interface/ru.json
M gateway_common/i18n/interface/sh.json
M gateway_common/i18n/interface/si.json
M gateway_common/i18n/interface/sl.json
M gateway_common/i18n/interface/sq.json
M gateway_common/i18n/interface/sr-ec.json
M gateway_common/i18n/interface/sr-el.json
M gateway_common/i18n/interface/sv.json
M gateway_common/i18n/interface/sw.json
M gateway_common/i18n/interface/ta.json
M gateway_common/i18n/interface/te.json
M gateway_common/i18n/interface/tl.json
M gateway_common/i18n/interface/tr.json
M gateway_common/i18n/interface/uk.json
M gateway_common/i18n/interface/vi.json
M gateway_common/i18n/interface/vro.json
M gateway_common/i18n/interface/zh-hans.json
M gateway_common/i18n/interface/zh-hant.json
M gateway_forms/Form.php
M gateway_forms/Mustache.php
M gateway_forms/mustache/index.html.mustache
79 files changed, 4 insertions(+), 157 deletions(-)
Approvals:
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/i18n/interface/af.json
b/gateway_common/i18n/interface/af.json
index c0ee63d..37f9a09 100644
--- a/gateway_common/i18n/interface/af.json
+++ b/gateway_common/i18n/interface/af.json
@@ -264,7 +264,6 @@
"donate_interface-onetime": "Maak 'n eenmalige donasie",
"donate_interface-monthly-short": "Maandeliks",
"donate_interface-onetime-short": "Eenmalig",
- "donate_interface-secureLogo-text": "Oor SSL-sertifikasie",
"donate_interface-error-http-403": "Jy hoef nie toestemming om hierdie
bladsy te bekom.",
"donate_interface-statement": "Wikimedia $1",
"apihelp-donate-param-fname": "Voornaam.",
diff --git a/gateway_common/i18n/interface/ar.json
b/gateway_common/i18n/interface/ar.json
index 6f3c097..e0dd939 100644
--- a/gateway_common/i18n/interface/ar.json
+++ b/gateway_common/i18n/interface/ar.json
@@ -361,7 +361,5 @@
"donate_interface-monthly-cancel": "سيتم خصم المدفوعات الشهرية من قبل
مؤسسة ويكيميديا حتى ذلك الوقت الذي تبلغنا به بالتوقف عن ذلك.",
"donate_interface-monthly-short": "شهريا",
"donate_interface-onetime-short": "مرة واحدة",
- "donate_interface-securelogo-title": "انقر للتحقق من الصحة - اختار هذا
الموقع VeriSign SSL لتأمين اتصالات التجارة الإلكترونية والرسائل السرية.",
- "donate_interface-secureLogo-text": "حول شهادات
Dereckson has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354549 )
Change subject: Always show latest revision even if not reviewed on hu.wikipedia
..
Always show latest revision even if not reviewed on hu.wikipedia
The hu.wikipedia community wants a six months test to show the latest
edited version, even if not reviewed in Flagged Revisions.
Bug: T121995
Change-Id: Iebc251576d962c26f6c0a0c0c535c7402a89afdf
---
M wmf-config/flaggedrevs.php
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/49/354549/1
diff --git a/wmf-config/flaggedrevs.php b/wmf-config/flaggedrevs.php
index 9982e90..839e8ab 100644
--- a/wmf-config/flaggedrevs.php
+++ b/wmf-config/flaggedrevs.php
@@ -484,6 +484,9 @@
}
elseif ( $wgDBname == 'huwiki' ) {
+ // Test from to May to November - T121995
+ $wgFlaggedRevsOverride = false;
+
// # UI
$wgFlaggedRevsLowProfile = false;
--
To view, visit https://gerrit.wikimedia.org/r/354549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebc251576d962c26f6c0a0c0c535c7402a89afdf
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/350907 )
Change subject: Lint .module, .install, .inc PHP files too
..
Lint .module, .install, .inc PHP files too
Change-Id: I81749d9f50e69f0c1f6d1ead47ea57c8c7fb2c58
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Hashar: Looks good to me, but someone else must approve
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/composer.json b/composer.json
index 1ad856e..cabc736 100644
--- a/composer.json
+++ b/composer.json
@@ -39,7 +39,7 @@
},
"scripts": {
"test": [
- "parallel-lint --exclude vendor ."
+ "parallel-lint -e php,module,install,inc --exclude
vendor ."
]
}
}
--
To view, visit https://gerrit.wikimedia.org/r/350907
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I81749d9f50e69f0c1f6d1ead47ea57c8c7fb2c58
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg
Gerrit-Reviewer: Hashar
Gerrit-Reviewer: XenoRyet
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/346055 )
Change subject: Sync DB tables manually on a newsletter edit over API
..
Sync DB tables manually on a newsletter edit over API
Checked the following on API edit:
1) API edit to create a new newsletter with valid new name, mainpage -
the page gets created and the data gets added to the db as well.
2) API edit to edit an existing newsletter (in db) with valid name,
mainpage - the page gets created, and teh edit gets added to the db as well.
3) API edit to create a new newsletter with existing main_page -
currently this action gets aborted from the hook, and the API edit fails.
* Shifted truncating of description text to DatabaseUpdate
On a normal edit - every case works normal as before
Bug: T160854
Change-Id: I2f631e336b0219958c917242078d88ec94a95ae5
---
M Newsletter.hooks.php
M extension.json
M includes/NewsletterDb.php
M includes/NewsletterEditPage.php
M includes/content/NewsletterContent.php
A includes/content/NewsletterDataUpdate.php
M includes/content/NewsletterDiffEngine.php
M includes/specials/SpecialNewsletterCreate.php
8 files changed, 277 insertions(+), 65 deletions(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 7790b2a..8427b51 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -187,7 +187,6 @@
if ( !$article->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
return true;
}
-
$newsletter = Newsletter::newFromName(
$article->getTitle()->getText() );
if ( $newsletter ) {
// A newsletter exists in that title, lets redirect to
manage page
@@ -304,4 +303,51 @@
}
return true;
}
+
+ /**
+* @param RequestContext $context object implementing the
IContextSource interface.
+* @param Content $content content of the edit box, as a Content object.
+* @param Status $status Status object to represent errors, etc.
+* @param $summary string Edit summary for page
+* @param User $user the User object representing the user whois
performing the edit.
+* @param $minoredit bool whether the edit was marked as minor by the
user.
+* @return bool
+*/
+ public static function onEditFilterMergedContent( IContextSource
$context, Content $content,
+ Status $status,
$summary, User $user, $minoredit ) {
+ if ( !$context->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
+ return;
+ }
+ if ( !$context->getTitle()->hasContentModel(
'NewsletterContent' ) ||
+( !$content instanceof NewsletterContent ) ) {
+ return;
+ }
+ $newsletter = Newsletter::newFromName(
$context->getTitle()->getText() );
+
+ // Validate API Edit parameters
+ $formData = array(
+ 'Name' => $context->getTitle()->getText(),
+ 'Description' => $content->getDescription(),
+ 'MainPage' => $content->getMainPage(),
+ );
+ $validator = new NewsletterValidator( $formData );
+ $validation = $validator->validate( !$newsletter );
+ if ( !$validation->isGood() ) {
+ // Invalid input was entered
+ return false;
+ }
+ $mainPageId = $content->getMainPage()->getArticleID();
+ $store = NewsletterStore::getDefaultInstance();
+ if ( !$newsletter || ( $newsletter && $newsletter->getPageId()
!== $mainPageId ) ) {
+ $rows = $store->newsletterExistsForMainPage(
$mainPageId );
+ foreach ( $rows as $row ) {
+ if ( (int)$row->nl_main_page_id === $mainPageId
&& (int)$row->nl_active === 1 ) {
+ $status->newFatal(
'newsletter-mainpage-in-use' );
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
}
diff --git a/extension.json b/extension.json
index 0ee39e9..34de892 100644
--- a/extension.json
+++ b/extension.json
@@ -82,6 +82,7 @@
"ApiNewsletterSubscribe":
"includes/api/ApiNewsletterSubscribe.php",
"NewsletterContent": "includes/content/NewsletterContent.php",
"NewsletterContentHandler":
"includes/content/NewsletterContentHandler.php",
+ "NewsletterDataUpdate":
"includes/content/NewsletterDataUpdate.php",
"NewsletterDiffEngine":
jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/350506 )
Change subject: Use consistent width constraints
..
Use consistent width constraints
Fixes potential field errors expanding the box, and gives the bottom
paragraph a little more room to spread out without blowing up.
Change-Id: I3546b2cb74aab1cbaedcec1ed478608eab958990
---
M gateway_forms/mustache/forms.css
M modules/css/gateway.css
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 1f9882f..81fa1e5 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -233,7 +233,10 @@
vertical-align: top;
}
-#topError {
+#topError,
+ p#informationsharing,
+ p#monthlycancel,
+ .errorMsg {
max-width: 481px;
}
diff --git a/modules/css/gateway.css b/modules/css/gateway.css
index 54eb349..4888c9f 100644
--- a/modules/css/gateway.css
+++ b/modules/css/gateway.css
@@ -45,7 +45,6 @@
}
p#informationsharing,
p#monthlycancel {
- width: 318px;
padding: 0 15px;
line-height: 14px;
font-size: 11px;
--
To view, visit https://gerrit.wikimedia.org/r/350506
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3546b2cb74aab1cbaedcec1ed478608eab958990
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg
Gerrit-Reviewer: XenoRyet
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
1 - 100 of 397 matches
Mail list logo