[MediaWiki-commits] [Gerrit] mediawiki/core[master]: New HTMLForm size filter field; add size filter to Special:N...
jenkins-bot has submitted this change and it was merged. Change subject: New HTMLForm size filter field; add size filter to Special:Newpages .. New HTMLForm size filter field; add size filter to Special:Newpages The conversion of SpecialNewpages to HTMLForm seems to be half-finished. It's not using HTMLForm to read in the request query, which means we have to roll our own logic. Kind of defeats the purpose of using HTMLForm in the first place. When ProtectedPages is converted to HTMLForm (T117722), it can use this new field type. Bug: T12817 Change-Id: I069609fbb37b18c3df25156779ad7ac7cd5d6813 --- M autoload.php M includes/htmlform/HTMLForm.php A includes/htmlform/fields/HTMLSizeFilterField.php M includes/specials/SpecialNewpages.php M includes/specials/pagers/NewPagesPager.php 5 files changed, 93 insertions(+), 0 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 3a2d06f..8b1e9c5 100644 --- a/autoload.php +++ b/autoload.php @@ -556,6 +556,7 @@ 'HTMLSelectNamespace' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespace.php', 'HTMLSelectNamespaceWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespaceWithButton.php', 'HTMLSelectOrOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectOrOtherField.php', + 'HTMLSizeFilterField' => __DIR__ . '/includes/htmlform/fields/HTMLSizeFilterField.php', 'HTMLSubmitField' => __DIR__ . '/includes/htmlform/fields/HTMLSubmitField.php', 'HTMLTagFilter' => __DIR__ . '/includes/htmlform/fields/HTMLTagFilter.php', 'HTMLTextAreaField' => __DIR__ . '/includes/htmlform/fields/HTMLTextAreaField.php', diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 1f4d99e..cadb502 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -147,6 +147,7 @@ 'namespaceselect' => 'HTMLSelectNamespace', 'namespaceselectwithbutton' => 'HTMLSelectNamespaceWithButton', 'tagfilter' => 'HTMLTagFilter', + 'sizefilter' => 'HTMLSizeFilterField', 'submit' => 'HTMLSubmitField', 'hidden' => 'HTMLHiddenField', 'edittools' => 'HTMLEditTools', diff --git a/includes/htmlform/fields/HTMLSizeFilterField.php b/includes/htmlform/fields/HTMLSizeFilterField.php new file mode 100644 index 000..c767d8f --- /dev/null +++ b/includes/htmlform/fields/HTMLSizeFilterField.php @@ -0,0 +1,72 @@ +mParams['size'] ) ? $this->mParams['size'] : 9; + } + + function getInputHTML( $value ) { + $attribs = []; + if ( !empty( $this->mParams['disabled'] ) ) { + $attribs['disabled'] = 'disabled'; + } + + $html = Xml::radioLabel( + $this->msg( 'minimum-size' )->text(), + $this->mName . '-mode', + 'min', + $this->mID . '-mode-min', + $value >= 0, + $attribs + ); + $html .= '' . Xml::radioLabel( + $this->msg( 'maximum-size' )->text(), + $this->mName . '-mode', + 'max', + $this->mID . '-mode-max', + $value < 0, + $attribs + ); + $html .= '' . parent::getInputHTML( $value ? abs( $value ) : '' ); + $html .= '' . $this->msg( 'pagesize' )->parse(); + + return $html; + } + + // No OOUI yet + function getInputOOUI( $value ) { + return false; + } + + /** +* @param WebRequest $request +* +* @return string +*/ + function loadDataFromRequest( $request ) { + $size = $request->getInt( $this->mName ); + if ( !$size ) { + return $this->getDefault(); + } + $size = abs( $size ); + + // negative numbers represent "max", positive numbers represent "min" + if ( $request->getVal( $this->mName . '-mode' ) === 'max' ) { + return -$size; + } else { + return $size; + } + } + + protected function needsLabel() { + return false; + } +} diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index d719e53..be8ad8f 100755 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -54,6 +54,8 @@ $opts->add( 'feed', '' ); $opts->add( 'tagfilter', '' ); $opts->add( 'invert', false ); + $opts->add( 'size-mode',
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Change Polestar integration text and icon. Added embed integ...
jenkins-bot has submitted this change and it was merged. Change subject: Change Polestar integration text and icon. Added embed integration .. Change Polestar integration text and icon. Added embed integration Change-Id: Ife56278219cc1f1bc728c75c89ae9347b459a14d --- M wikibase/queryService/ui/App.js M wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js 2 files changed, 3 insertions(+), 4 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index 9ef2e47..20cf33a 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -106,8 +106,8 @@ $element: null }, Polestar: { - icon: 'glyphicon-stats', - label: 'Graph it!', + icon: 'fa-certificate', + label: 'Graph builder', class: 'PolestarResultBrowser', object: null, $element: null diff --git a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js index d0e6d17..b8a72a1 100644 --- a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js +++ b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js @@ -37,10 +37,9 @@ var $container = $( '' ).attr( { 'src': POLESTAR + '#' + JSON.stringify( polestarData ), 'class': 'graph-iframe' - } ).height( '100vh' ); + } ).height( '98vh' ); $element.append( $container ); - $container.scrollIntoView(); }; /** -- To view, visit https://gerrit.wikimedia.org/r/317836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife56278219cc1f1bc728c75c89ae9347b459a14d Gerrit-PatchSet: 5 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make LBFactoryTest.php pass for sqlite
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/318255 Change subject: Make LBFactoryTest.php pass for sqlite .. Make LBFactoryTest.php pass for sqlite Change-Id: I4fe929e82218231f6c8afa64da8c0ccb42d2c362 --- M includes/libs/rdbms/database/DatabaseSqlite.php M tests/phpunit/includes/db/LBFactoryTest.php 2 files changed, 87 insertions(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/318255/1 diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index 46f7a5b..8236abf 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -196,6 +196,10 @@ return false; } + public function selectDB( $db ) { + return false; // doesn't make sense + } + /** * @return string SQLite DB file path * @since 1.25 diff --git a/tests/phpunit/includes/db/LBFactoryTest.php b/tests/phpunit/includes/db/LBFactoryTest.php index aed2d83..9a4c3b1 100644 --- a/tests/phpunit/includes/db/LBFactoryTest.php +++ b/tests/phpunit/includes/db/LBFactoryTest.php @@ -58,17 +58,18 @@ } public function testLBFactorySimpleServer() { - global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype; + global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir; $servers = [ [ - 'host' => $wgDBserver, - 'dbname'=> $wgDBname, - 'user' => $wgDBuser, - 'password' => $wgDBpassword, - 'type' => $wgDBtype, - 'load' => 0, - 'flags' => DBO_TRX // REPEATABLE-READ for consistency + 'host'=> $wgDBserver, + 'dbname' => $wgDBname, + 'user'=> $wgDBuser, + 'password'=> $wgDBpassword, + 'type'=> $wgDBtype, + 'dbDirectory' => $wgSQLiteDataDir, + 'load'=> 0, + 'flags' => DBO_TRX // REPEATABLE-READ for consistency ], ]; @@ -86,26 +87,28 @@ } public function testLBFactorySimpleServers() { - global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype; + global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir; $servers = [ [ // master - 'host' => $wgDBserver, - 'dbname' => $wgDBname, - 'user' => $wgDBuser, - 'password' => $wgDBpassword, - 'type' => $wgDBtype, - 'load' => 0, - 'flags'=> DBO_TRX // REPEATABLE-READ for consistency + 'host'=> $wgDBserver, + 'dbname' => $wgDBname, + 'user'=> $wgDBuser, + 'password'=> $wgDBpassword, + 'type'=> $wgDBtype, + 'dbDirectory' => $wgSQLiteDataDir, + 'load'=> 0, + 'flags' => DBO_TRX // REPEATABLE-READ for consistency ], [ // emulated slave - 'host' => $wgDBserver, - 'dbname' => $wgDBname, - 'user' => $wgDBuser, - 'password' => $wgDBpassword, - 'type' => $wgDBtype, - 'load' => 100, - 'flags'=> DBO_TRX // REPEATABLE-READ for consistency + 'host'=> $wgDBserver, + 'dbname' => $wgDBname, + 'user'=> $wgDBuser, + 'password'=> $wgDBpassword, + 'type'=> $wgDBtype, + 'dbDirectory' => $wgSQLiteDataDir, + 'load'=> 100, + 'flags' => DBO_TRX // REPEATABLE-READ for consistency ] ]; @@ -118,19 +121,23
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add short-circuit to DatabasePostgres::schemaExists()
jenkins-bot has submitted this change and it was merged. Change subject: Add short-circuit to DatabasePostgres::schemaExists() .. Add short-circuit to DatabasePostgres::schemaExists() Change-Id: I5221f7d937be1e87689df5a21fd64e244dbd4c2a --- M includes/libs/rdbms/database/DatabasePostgres.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index 7acd8dc..b72557a 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -1175,8 +1175,12 @@ * @return bool */ function schemaExists( $schema ) { - $exists = $this->selectField( '"pg_catalog"."pg_namespace"', 1, - [ 'nspname' => $schema ], __METHOD__ ); + if ( !strlen( $schema ) ) { + return false; // short-circuit + } + + $exists = $this->selectField( + '"pg_catalog"."pg_namespace"', 1, [ 'nspname' => $schema ], __METHOD__ ); return (bool)$exists; } -- To view, visit https://gerrit.wikimedia.org/r/318220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5221f7d937be1e87689df5a21fd64e244dbd4c2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Fix border colour of PopupToolGroup
jenkins-bot has submitted this change and it was merged. Change subject: Fix border colour of PopupToolGroup .. Fix border colour of PopupToolGroup Bug: T147700 Change-Id: I846f19b7ea035175bd831c942a134a71731b912c --- M src/themes/mediawiki/tools.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: VolkerE: Looks good to me, approved jenkins-bot: Verified diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less index 8ce76e0..8b0e709 100644 --- a/src/themes/mediawiki/tools.less +++ b/src/themes/mediawiki/tools.less @@ -244,7 +244,7 @@ .oo-ui-toolGroup-tools { top: 3.125em; margin: 0 -1px; - border: @border-default; + border: @border-toolbar; background-color: @background-color-toolbar; box-shadow: 0 2px 3px rgba( 0, 0, 0, 0.2 ); min-width: 16em; -- To view, visit https://gerrit.wikimedia.org/r/318154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I846f19b7ea035175bd831c942a134a71731b912c Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Loosen ambulance clause on global collect recurring.
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/318254 Change subject: Loosen ambulance clause on global collect recurring. .. Loosen ambulance clause on global collect recurring. Bug: T144557 Change-Id: I75df5911f7710a9bf7c9c0ee921283310e020376 --- M sites/all/modules/recurring_globalcollect/recurring_globalcollect.module 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/54/318254/1 diff --git a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module index 9a0b843..40fe919 100644 --- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module +++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module @@ -442,6 +442,9 @@ * The next date, for monthly contributions, should be one month after * the last payment, give or take a couple of days for month length weirdness. * + * We also accept it if it is more than 28 days ahead - this could happen + * if we are waiting for the audit file to fill in the gaps. + * * If there are we might not want to run the charges until we have checked them out. * * Only check 2016+ transactions (since those are currently clean) and @@ -465,7 +468,7 @@ AND frequency_unit = 'month' AND frequency_interval = 1 GROUP BY cr.id DESC ) as inn - WHERE date_diff NOT BETWEEN -3 AND 3 + WHERE date_diff NOT BETWEEN -3 AND 3 AND date_diff > -28 "; $count = CRM_Core_DAO::singleValueQuery($query); -- To view, visit https://gerrit.wikimedia.org/r/318254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75df5911f7710a9bf7c9c0ee921283310e020376 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group1 wikis to 1.28.0-wmf.23
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/318174 Change subject: group1 wikis to 1.28.0-wmf.23 .. group1 wikis to 1.28.0-wmf.23 Change-Id: I6d7f6a0d4bc34042e15b9c5451dce026759629b1 --- M php M wikiversions.json 2 files changed, 595 insertions(+), 595 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/74/318174/1 diff --git a/php b/php index 8f27fe7..16b3e20 12 --- a/php +++ b/php @@ -1 +1 @@ -php-1.28.0-wmf.22 \ No newline at end of file +php-1.28.0-wmf.23 \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index e9d7438..908fcd8 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1,750 +1,750 @@ { "aawiki": "php-1.28.0-wmf.22", -"aawikibooks": "php-1.28.0-wmf.22", -"aawiktionary": "php-1.28.0-wmf.22", +"aawikibooks": "php-1.28.0-wmf.23", +"aawiktionary": "php-1.28.0-wmf.23", "abwiki": "php-1.28.0-wmf.22", -"abwiktionary": "php-1.28.0-wmf.22", +"abwiktionary": "php-1.28.0-wmf.23", "acewiki": "php-1.28.0-wmf.22", -"advisorywiki": "php-1.28.0-wmf.22", +"advisorywiki": "php-1.28.0-wmf.23", "adywiki": "php-1.28.0-wmf.22", "afwiki": "php-1.28.0-wmf.22", -"afwikibooks": "php-1.28.0-wmf.22", -"afwikiquote": "php-1.28.0-wmf.22", -"afwiktionary": "php-1.28.0-wmf.22", +"afwikibooks": "php-1.28.0-wmf.23", +"afwikiquote": "php-1.28.0-wmf.23", +"afwiktionary": "php-1.28.0-wmf.23", "akwiki": "php-1.28.0-wmf.22", -"akwikibooks": "php-1.28.0-wmf.22", -"akwiktionary": "php-1.28.0-wmf.22", +"akwikibooks": "php-1.28.0-wmf.23", +"akwiktionary": "php-1.28.0-wmf.23", "alswiki": "php-1.28.0-wmf.22", -"alswikibooks": "php-1.28.0-wmf.22", -"alswikiquote": "php-1.28.0-wmf.22", -"alswiktionary": "php-1.28.0-wmf.22", +"alswikibooks": "php-1.28.0-wmf.23", +"alswikiquote": "php-1.28.0-wmf.23", +"alswiktionary": "php-1.28.0-wmf.23", "amwiki": "php-1.28.0-wmf.22", -"amwikiquote": "php-1.28.0-wmf.22", -"amwiktionary": "php-1.28.0-wmf.22", +"amwikiquote": "php-1.28.0-wmf.23", +"amwiktionary": "php-1.28.0-wmf.23", "angwiki": "php-1.28.0-wmf.22", -"angwikibooks": "php-1.28.0-wmf.22", -"angwikiquote": "php-1.28.0-wmf.22", -"angwikisource": "php-1.28.0-wmf.22", -"angwiktionary": "php-1.28.0-wmf.22", +"angwikibooks": "php-1.28.0-wmf.23", +"angwikiquote": "php-1.28.0-wmf.23", +"angwikisource": "php-1.28.0-wmf.23", +"angwiktionary": "php-1.28.0-wmf.23", "anwiki": "php-1.28.0-wmf.22", -"anwiktionary": "php-1.28.0-wmf.22", +"anwiktionary": "php-1.28.0-wmf.23", "arbcom_dewiki": "php-1.28.0-wmf.22", "arbcom_enwiki": "php-1.28.0-wmf.22", "arbcom_fiwiki": "php-1.28.0-wmf.22", "arbcom_nlwiki": "php-1.28.0-wmf.22", "arcwiki": "php-1.28.0-wmf.22", "arwiki": "php-1.28.0-wmf.22", -"arwikibooks": "php-1.28.0-wmf.22", -"arwikimedia": "php-1.28.0-wmf.22", -"arwikinews": "php-1.28.0-wmf.22", -"arwikiquote": "php-1.28.0-wmf.22", -"arwikisource": "php-1.28.0-wmf.22", -"arwikiversity": "php-1.28.0-wmf.22", -"arwiktionary": "php-1.28.0-wmf.22", +"arwikibooks": "php-1.28.0-wmf.23", +"arwikimedia": "php-1.28.0-wmf.23", +"arwikinews": "php-1.28.0-wmf.23", +"arwikiquote": "php-1.28.0-wmf.23", +"arwikisource": "php-1.28.0-wmf.23", +"arwikiversity": "php-1.28.0-wmf.23", +"arwiktionary": "php-1.28.0-wmf.23", "arzwiki": "php-1.28.0-wmf.22", "astwiki": "php-1.28.0-wmf.22", -"astwikibooks": "php-1.28.0-wmf.22", -"astwikiquote": "php-1.28.0-wmf.22", -"astwiktionary": "php-1.28.0-wmf.22", +"astwikibooks": "php-1.28.0-wmf.23", +"astwikiquote": "php-1.28.0-wmf.23", +"astwiktionary": "php-1.28.0-wmf.23", "aswiki": "php-1.28.0-wmf.22", -"aswikibooks": "php-1.28.0-wmf.22", -"aswikisource": "php-1.28.0-wmf.22", -"aswiktionary": "php-1.28.0-wmf.22", -"auditcomwiki": "php-1.28.0-wmf.22", +"aswikibooks": "php-1.28.0-wmf.23", +"aswikisource": "php-1.28.0-wmf.23", +"aswiktionary": "php-1.28.0-wmf.23", +"auditcomwiki": "php-1.28.0-wmf.23", "avwiki": "php-1.28.0-wmf.22", -"avwiktionary": "php-1.28.0-wmf.22", +"avwiktionary": "php-1.28.0-wmf.23", "aywiki": "php-1.28.0-wmf.22", -"aywikibooks": "php-1.28.0-wmf.22", -"aywiktionary": "php-1.28.0-wmf.22", +"aywikibooks": "php-1.28.0-wmf.23", +"aywiktionary": "php-1.28.0-wmf.23", "azbwiki": "php-1.28.0-wmf.22", "azwiki": "php-1.28.0-wmf.22", -"azwikibooks": "php-1.28.0-wmf.22", -"azwikiquote": "php-1.28.0-wmf.22", -"azwikisource": "php-1.28.0-wmf.22", -"azwiktionary": "php-1.28.0-wmf.22", +"azwikibooks": "php-1.28.0-wmf.23", +"azwikiquote": "php-1.28.0-wmf.23", +"azwikisource": "php-1.28.0-wmf.23", +"azwiktionary":
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a grant for viewing restricted log entries
jenkins-bot has submitted this change and it was merged. Change subject: Add a grant for viewing restricted log entries .. Add a grant for viewing restricted log entries In core this holds the 'suppressionlog' right. SpamBlacklist and TitleBlacklist would add their permissions here as well. Bug: T149235 Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 --- M includes/DefaultSettings.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 5 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 98dd2b7..0b0016c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5747,6 +5747,8 @@ $wgGrantPermissions['viewdeleted']['deletedhistory'] = true; $wgGrantPermissions['viewdeleted']['deletedtext'] = true; +$wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true; + $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] + $wgGrantPermissions['viewdeleted']; $wgGrantPermissions['delete']['delete'] = true; @@ -5797,6 +5799,7 @@ 'blockusers' => 'administration', 'delete' => 'administration', 'viewdeleted' => 'administration', + 'viewrestrictedlogs' => 'administration', 'protect' => 'administration', 'createaccount' => 'administration', diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 3d272a3..c759984 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1285,6 +1285,7 @@ "grant-basic": "Basic rights", "grant-viewdeleted": "View deleted files and pages", "grant-viewmywatchlist": "View your watchlist", + "grant-viewrestrictedlogs": "View restricted log entries", "newuserlogpage": "User creation log", "newuserlogpagetext": "This is a log of user creations.", "rightslog": "User rights log", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index cde2575..04048d4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1469,6 +1469,7 @@ "grant-basic": "Name for grant \"basic\".\n{{Related|Grant}}", "grant-viewdeleted": "Name for grant \"viewdeleted\".\n{{Related|Grant}}", "grant-viewmywatchlist": "Name for grant \"viewmywatchlist\".\n{{Related|Grant}}\n{{Identical|View your watchlist}}", + "grant-viewrestrictedlogs": "Name for grant \"viewrestrictedlogs\".\n{{Related|Grant}}", "newuserlogpage": "{{doc-logpage}}\n\nPart of the \"Newuserlog\" extension. It is both the title of [[Special:Log/newusers]] and the link you can see in [[Special:RecentChanges]].", "newuserlogpagetext": "Part of the \"Newuserlog\" extension. It is the description you can see on [[Special:Log/newusers]].", "rightslog": "{{doc-logpage}}\n\nIn [[Special:Log]]", -- To view, visit https://gerrit.wikimedia.org/r/318151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a grant for viewing restricted log entries
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/318151 Change subject: Add a grant for viewing restricted log entries .. Add a grant for viewing restricted log entries In core this holds the 'suppressionlog' right. SpamBlacklist and TitleBlacklist would add their permissions here as well. Bug: T149235 Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 --- M includes/DefaultSettings.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/318151/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 98dd2b7..0b0016c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5747,6 +5747,8 @@ $wgGrantPermissions['viewdeleted']['deletedhistory'] = true; $wgGrantPermissions['viewdeleted']['deletedtext'] = true; +$wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true; + $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] + $wgGrantPermissions['viewdeleted']; $wgGrantPermissions['delete']['delete'] = true; @@ -5797,6 +5799,7 @@ 'blockusers' => 'administration', 'delete' => 'administration', 'viewdeleted' => 'administration', + 'viewrestrictedlogs' => 'administration', 'protect' => 'administration', 'createaccount' => 'administration', diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 3d272a3..c759984 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1285,6 +1285,7 @@ "grant-basic": "Basic rights", "grant-viewdeleted": "View deleted files and pages", "grant-viewmywatchlist": "View your watchlist", + "grant-viewrestrictedlogs": "View restricted log entries", "newuserlogpage": "User creation log", "newuserlogpagetext": "This is a log of user creations.", "rightslog": "User rights log", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index cde2575..04048d4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1469,6 +1469,7 @@ "grant-basic": "Name for grant \"basic\".\n{{Related|Grant}}", "grant-viewdeleted": "Name for grant \"viewdeleted\".\n{{Related|Grant}}", "grant-viewmywatchlist": "Name for grant \"viewmywatchlist\".\n{{Related|Grant}}\n{{Identical|View your watchlist}}", + "grant-viewrestrictedlogs": "Name for grant \"viewrestrictedlogs\".\n{{Related|Grant}}", "newuserlogpage": "{{doc-logpage}}\n\nPart of the \"Newuserlog\" extension. It is both the title of [[Special:Log/newusers]] and the link you can see in [[Special:RecentChanges]].", "newuserlogpagetext": "Part of the \"Newuserlog\" extension. It is the description you can see on [[Special:Log/newusers]].", "rightslog": "{{doc-logpage}}\n\nIn [[Special:Log]]", -- To view, visit https://gerrit.wikimedia.org/r/318151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Don't explode on pendingDb delete call missing oid
jenkins-bot has submitted this change and it was merged. Change subject: Don't explode on pendingDb delete call missing oid .. Don't explode on pendingDb delete call missing oid This isn't fatal, but it merits a warning. Bug: T149123 Change-Id: I0570f5701c6cf0c9e7be62e783834867f88f7987 --- M Core/DataStores/PendingDatabase.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/DataStores/PendingDatabase.php b/Core/DataStores/PendingDatabase.php index 5dedce3..4d9bcfc 100644 --- a/Core/DataStores/PendingDatabase.php +++ b/Core/DataStores/PendingDatabase.php @@ -3,6 +3,7 @@ use PDO; use RuntimeException; +use SmashPig\Core\Logging\Logger; use SmashPig\Core\SmashPigException; use SmashPig\Core\UtcDate; @@ -140,7 +141,9 @@ */ public function deleteMessage( $message ) { if ( !isset( $message['order_id'] ) ) { - throw new RuntimeException( 'Message doesn\'t have an order_id!' ); + $json = json_encode( $message ); + Logger::warning( "Trying to delete pending message with no order id: $json" ); + return; } $sql = ' -- To view, visit https://gerrit.wikimedia.org/r/318146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0570f5701c6cf0c9e7be62e783834867f88f7987 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Populate local and global ids in localuser table
jenkins-bot has submitted this change and it was merged. Change subject: Populate local and global ids in localuser table .. Populate local and global ids in localuser table Bug: T142503 Change-Id: I3b556476ae7210ae244c400ddd057e461ac869fa --- A maintenance/populateLocalAndGlobalIds.php 1 file changed, 62 insertions(+), 0 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/populateLocalAndGlobalIds.php b/maintenance/populateLocalAndGlobalIds.php new file mode 100644 index 000..af2b77f --- /dev/null +++ b/maintenance/populateLocalAndGlobalIds.php @@ -0,0 +1,62 @@ +addDescription( "Populate the localuser.lu_local_id and localuser.lu_global_id fields" ); + $this->setBatchSize( 100 ); + } + + public function execute() { + global $wgLocalDatabases; + $dbr = CentralAuthUtils::getCentralSlaveDB(); + $dbw = CentralAuthUtils::getCentralDB(); + foreach( $wgLocalDatabases as $wiki ) { + $globalId = -1; + $lb = wfGetLB( $wiki ); + $ldbr = $lb->getConnection( DB_SLAVE, [], $wiki ); + do { + $rows = $dbr->select( + [ 'localuser', 'globaluser' ], + [ 'lu_name', 'gu_id' ], + [ + 'gu_id >= ' . $globalId, // Start from where we left off in last batch + 'lu_wiki' => $wiki, + 'lu_local_id' => null, // Only pick records not already populated + 'gu_name = lu_name' + ], + __METHOD__, + [ 'LIMIT' => $this->mBatchSize, 'ORDER BY' => 'gu_id ASC' ] + ); + foreach ( $rows as $row ) { + $globalId = $row->gu_id; // Save this so we know where to fetch our next batch from + $localId = $ldbr->selectField( 'user', 'user_id', [ 'user_name' => $row->lu_name ] ); + $result = $dbw->update( + 'localuser', + [ 'lu_local_id' => $localId, 'lu_global_id' => $row->gu_id ], + [ 'lu_name' => $row->lu_name, 'lu_wiki' => $wiki ] + ); + if ( !$result ) { + $this->output( "Update failed for global user $globalId for wiki $wiki \n" ); + } + } + $numRows = $rows->numRows(); + $this->output( "Updated $numRows records. Last user: $globalId; Wiki: $wiki \n" ); + wfWaitForSlaves(); + } while ( $numRows >= $this->mBatchSize ); + $lb->reuseConnection( $ldbr ); + } + $this->output( "Done.\n" ); + } + +} + +$maintClass = 'PopulateLocalAndGlobalIds'; +require_once RUN_MAINTENANCE_IF_MAIN; + -- To view, visit https://gerrit.wikimedia.org/r/316375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b556476ae7210ae244c400ddd057e461ac869fa Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Niharika29Gerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Niharika29 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dashboard[master]: Deploy fixed Maps dash
Bearloga has uploaded a new change for review. https://gerrit.wikimedia.org/r/318164 Change subject: Deploy fixed Maps dash .. Deploy fixed Maps dash Change-Id: I8fca379e0b0e9e4e4aaecaaa8aabee4b768f9db4 --- M shiny-server/maps 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/dashboard refs/changes/64/318164/1 diff --git a/shiny-server/maps b/shiny-server/maps index d04dd5b..b2e9e21 16 --- a/shiny-server/maps +++ b/shiny-server/maps @@ -1 +1 @@ -Subproject commit d04dd5b6343816660a87ee9e24d9ee70bd79ffcd +Subproject commit b2e9e216a8c911931672037cd012e93f9e0df411 -- To view, visit https://gerrit.wikimedia.org/r/318164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fca379e0b0e9e4e4aaecaaa8aabee4b768f9db4 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/dashboard Gerrit-Branch: master Gerrit-Owner: Bearloga___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update SmashPig lib
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/318155 Change subject: Update SmashPig lib .. Update SmashPig lib Fix damaged message links and stop throwing exceptions on pending db messages missing order id. Change-Id: I6a0a404a6c5453354916f1604add9a2585baaefb --- M composer.lock 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/55/318155/1 diff --git a/composer.lock b/composer.lock index d736192..eb81bf1 100644 --- a/composer.lock +++ b/composer.lock @@ -249,6 +249,7 @@ "messaging", "stomp" ], +"abandoned": "stomp-php/stomp-php", "time": "2013-02-23 17:34:44" }, { @@ -1139,7 +1140,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;, -"reference": "345dc21e9cb0b4ef0a1a1e25286f21a91d099171" +"reference": "648351fbc2f9f158fcff53823fefa27639e3b827" }, "require": { "amzn/login-and-pay-with-amazon-sdk-php": "dev-master", @@ -1190,7 +1191,7 @@ "donations", "payments" ], -"time": "2016-10-24 21:30:18" +"time": "2016-10-26 18:59:19" }, { "name": "zordius/lightncandy", @@ -1351,16 +1352,16 @@ }, { "name": "phpdocumentor/reflection-docblock", -"version": "3.1.0", +"version": "3.1.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git;, -"reference": "9270140b940ff02e58ec577c237274e92cd40cdd" +"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd;, -"reference": "9270140b940ff02e58ec577c237274e92cd40cdd", +"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e;, +"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", "shasum": "" }, "require": { @@ -1392,7 +1393,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", -"time": "2016-06-10 09:48:41" +"time": "2016-09-30 07:12:33" }, { "name": "phpdocumentor/type-resolver", -- To view, visit https://gerrit.wikimedia.org/r/318155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a0a404a6c5453354916f1604add9a2585baaefb Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: Fix border colour of PopupToolGroup
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318154 Change subject: Fix border colour of PopupToolGroup .. Fix border colour of PopupToolGroup Bug: T147700 Change-Id: I846f19b7ea035175bd831c942a134a71731b912c --- M src/themes/mediawiki/tools.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/54/318154/1 diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less index 8ce76e0..8b0e709 100644 --- a/src/themes/mediawiki/tools.less +++ b/src/themes/mediawiki/tools.less @@ -244,7 +244,7 @@ .oo-ui-toolGroup-tools { top: 3.125em; margin: 0 -1px; - border: @border-default; + border: @border-toolbar; background-color: @background-color-toolbar; box-shadow: 0 2px 3px rgba( 0, 0, 0, 0.2 ); min-width: 16em; -- To view, visit https://gerrit.wikimedia.org/r/318154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I846f19b7ea035175bd831c942a134a71731b912c Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Apply inserted annotations above background annotation stack
jenkins-bot has submitted this change and it was merged. Change subject: Apply inserted annotations above background annotation stack .. Apply inserted annotations above background annotation stack Also apply content and annotations in a single transaction; hitherto the annotations were applied in a follow-up transaction. Bug: T142245 Change-Id: I52b0b3de6cf835c16fdee441e48b85a7c920c54e --- M src/dm/ve.dm.SurfaceFragment.js M tests/ce/ve.ce.Surface.test.js 2 files changed, 63 insertions(+), 45 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js index c7456b5..06c95e4 100644 --- a/src/dm/ve.dm.SurfaceFragment.js +++ b/src/dm/ve.dm.SurfaceFragment.js @@ -803,7 +803,7 @@ if ( annotate && !annotations ) { // TODO T126021: Don't reach into properties of document // FIXME T126022: the logic we actually need for annotating inserted content - // correctly is MUCH more complicated + // correctly is much more complicated annotations = doc.data .getAnnotationsFromOffset( offset === 0 ? 0 : offset - 1 ); } @@ -851,7 +851,7 @@ * @chainable */ ve.dm.SurfaceFragment.prototype.insertDocument = function ( newDoc, newDocRange, annotate ) { - var tx, newRange, annotations, offset, + var tx, newRange, annotations, offset, i, iLen, item, annotatedData, annotatedDoc, range = this.getSelection().getCoveringRange(), doc = this.getDocument(); @@ -871,23 +871,45 @@ offset = range.start; if ( annotate && !annotations ) { // TODO T126021: Don't reach into properties of document - // FIXME T126022: the logic we actually need for annotating inserted content - // correctly is MUCH more complicated annotations = doc.data .getAnnotationsFromOffset( offset === 0 ? 0 : offset - 1 ); } - tx = ve.dm.Transaction.newFromDocumentInsertion( doc, offset, newDoc, newDocRange ); + if ( !annotations || annotations.getLength() === 0 ) { + annotatedDoc = newDoc; + } else { + // Build shallow-cloned annotatedData array, copying on write as we go + annotatedData = newDoc.data.slice(); + for ( i = 0, iLen = newDoc.data.getLength(); i < iLen; i++ ) { + item = annotatedData[ i ]; + // Insert surrounding annotations below newDoc annotations + // FIXME T126022: the logic we actually need for annotating inserted + // content correctly is MUCH more complicated + if ( ve.dm.LinearData.static.isOpenElementData( item ) ) { + item = annotatedData[ i ] = ve.copy( item ); + item.annotations = annotations.storeIndexes.concat( item.annotations ); + } else if ( ve.dm.LinearData.static.isCloseElementData( item ) ) { + annotatedData[ i ] = ve.copy( item ); + } else if ( Array.isArray( item ) ) { + annotatedData[ i ] = [ + item[ 0 ], + annotations.storeIndexes.concat( item[ 1 ] ) + ]; + } else if ( typeof item === 'string' ) { + annotatedData[ i ] = [ item, annotations.storeIndexes.slice() ]; + } else { + throw new Error( 'Unknown item type' ); + } + } + annotatedDoc = newDoc.cloneWithData( annotatedData ); + } + tx = ve.dm.Transaction.newFromDocumentInsertion( doc, offset, annotatedDoc, newDocRange ); if ( !tx.isNoOp() ) { // Set the range to cover the inserted content; the offset translation will be wrong // if newFromInsertion() decided to move the insertion point newRange = tx.getModifiedRange( doc ); this.change( tx, newRange ? new ve.dm.LinearSelection( doc, newRange ) : new ve.dm.NullSelection( doc ) ); - if ( annotations && annotations.getLength() > 0 ) { - this.annotateContent( 'set', annotations ); - } } - return this; }; diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js index 7adbd27..38922b1 100644 --- a/tests/ce/ve.ce.Surface.test.js +++ b/tests/ce/ve.ce.Surface.test.js @@ -1332,6 +1332,7 @@ exampleSurface =
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Remove transform rule once toolbar has opened
jenkins-bot has submitted this change and it was merged. Change subject: Remove transform rule once toolbar has opened .. Remove transform rule once toolbar has opened Transform rules mess up the z-index context, so this puts the toolbar dropdowns back in front of the content. Change-Id: I7ba2cf295c83c55e5b1eead3a04760ea53390d37 --- M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css index fb22186..2c5b4e0 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css +++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.css @@ -25,6 +25,11 @@ transform: translateY( 0 ); } +.ve-init-mw-desktopArticleTarget-toolbar-opened > .oo-ui-toolbar-bar { + /* Reset trasnform once open to avoid breaking z-index */ + transform: none; +} + .ve-ui-toolbar-floating > .oo-ui-toolbar-bar { z-index: 4; } -- To view, visit https://gerrit.wikimedia.org/r/318130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ba2cf295c83c55e5b1eead3a04760ea53390d37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: DLynch Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Factor out some methods in the header generation
jenkins-bot has submitted this change and it was merged. Change subject: Factor out some methods in the header generation .. Factor out some methods in the header generation As preparation for some more minor refactoring there. Change-Id: I31f585e5c4fcf724d9aaf670a21f4f0af42e98ce --- M includes/EditPage.php 1 file changed, 28 insertions(+), 17 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index e8ea20f..4aa87d6 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2885,24 +2885,9 @@ global $wgOut, $wgUser, $wgMaxArticleSize, $wgLang; global $wgAllowUserCss, $wgAllowUserJs; - if ( $this->mTitle->isTalkPage() ) { - $wgOut->addWikiMsg( 'talkpagetext' ); - } + $this->addTalkPageText(); - // Add edit notices - $editNotices = $this->mTitle->getEditNotices( $this->oldid ); - if ( count( $editNotices ) ) { - $wgOut->addHTML( implode( "\n", $editNotices ) ); - } else { - $msg = $this->context->msg( 'editnotice-notext' ); - if ( !$msg->isDisabled() ) { - $wgOut->addHTML( - '' - . $msg->parseAsBlock() - . '' - ); - } - } + $this->addEditNotices(); if ( $this->isConflict ) { $wgOut->wrapWikiMsg( "\n$1\n", 'explainconflict' ); @@ -4435,4 +4420,30 @@ // reverse the transform that we made for reversibility reasons. return strtr( $result, [ "" => "
[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Add titleblacklistlog to viewrestrictedlogs grant
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/318153 Change subject: Add titleblacklistlog to viewrestrictedlogs grant .. Add titleblacklistlog to viewrestrictedlogs grant Bug: T149235 Depends-On: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 Change-Id: I0cff164c91128a9cc4b8700527ed1f4090a368a5 --- M extension.json 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleBlacklist refs/changes/53/318153/1 diff --git a/extension.json b/extension.json index f5a64c9..c770dba 100644 --- a/extension.json +++ b/extension.json @@ -32,6 +32,11 @@ "LogActionsHandlers": { "titleblacklist/*": "LogFormatter" }, + "GrantPermissions": { + "viewrestrictedlogs": { + "titleblacklistlog": true + } + }, "APIModules": { "titleblacklist": "ApiQueryTitleBlacklist" }, -- To view, visit https://gerrit.wikimedia.org/r/318153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cff164c91128a9cc4b8700527ed1f4090a368a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TitleBlacklist Gerrit-Branch: master Gerrit-Owner: Anomie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: [throttle] Remove old rules
Urbanecm has uploaded a new change for review. https://gerrit.wikimedia.org/r/318157 Change subject: [throttle] Remove old rules .. [throttle] Remove old rules Change-Id: Icd479fe9230ca0482571ecc52a9c53fd920284ea --- M wmf-config/throttle.php 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/57/318157/2 diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index e986b37..88911f0 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -28,14 +28,6 @@ # ]; ## Add throttling definitions below. -$wmgThrottlingExceptions[] = [ // T149063 - Nashville Architecture edit-a-thon (Vanderbilt library) - 'from' => '2016-10-25T10:30 -5:00', - 'to' => '2016-10-25T16:00 -5:00', - 'IP' => '129.59.122.18', - 'dbname' => [ 'enwiki', 'commonswiki' ], - 'value' => 50 // 20 to 30 expected -]; - $wmgThrottlingExceptions[] = [ // T148852 - Edit-a-thon BDA (Poitiers) 'from' => '2016-11-15T08:00 -1:00', 'to' => '2016-11-18T19:00 -1:00', -- To view, visit https://gerrit.wikimedia.org/r/318157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd479fe9230ca0482571ecc52a9c53fd920284ea Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: UrbanecmGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to cb42720
Ppchelko has uploaded a new change for review. https://gerrit.wikimedia.org/r/318165 Change subject: Update restbase to cb42720 .. Update restbase to cb42720 List of changes: ab1928e Added complete feed tests 8023904 Added a delay to the tests as storing is done async e531236 Improved assertion function name xxx Update node module dependencies Change-Id: Icadf372df0a5aba3c724865233b680d9e3c4d38b --- M node_modules/content-type/package.json M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json M node_modules/hyperswitch/node_modules/swagger-ui/package.json M node_modules/json-stable-stringify/package.json M node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json M node_modules/service-runner/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s M node_modules/service-runner/node_modules/bunyan/node_modules/dtrace-provider/package.json M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M restbase 9 files changed, 35 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy refs/changes/65/318165/1 diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json index d77b9a3..d5be2e8 100644 --- a/node_modules/content-type/package.json +++ b/node_modules/content-type/package.json @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/jshttp/content-type#readme;, "_id": "content-type@1.0.1", - "_shasum": "6474ed5a4ab19aa2170d848e31b52f7e3ea8fdd4", + "_shasum": "371a824d92841315e1887be762509f76620ace83", "_from": "git+https://github.com/wikimedia/content-type.git#master;, "_resolved": "git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b; } diff --git a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json index 685f581..0e2309a 100644 --- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json +++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "6e1ac0794da7febe33b34bf71812dba02487c252", + "_shasum": "6903f31479a2a34fbea92a62c2e16e53e1e97616", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json b/node_modules/hyperswitch/node_modules/swagger-ui/package.json index 7114a01..e5633b6 100644 --- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json +++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json @@ -70,7 +70,7 @@ "url": "https://github.com/swagger-api/swagger-ui/issues; }, "_id": "swagger-ui@2.2.5", - "_shasum": "70c690c72d29e8997776b4c4f82a0d9a1ef1fc6f", + "_shasum": "47819516876b95dccc4ce4a230a163c0fea3f909", "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;, "_resolved": "git+https://github.com/wikimedia/swagger-ui.git#c3a313727ad641d71142768bf05cdd6da22ba84a; } diff --git a/node_modules/json-stable-stringify/package.json b/node_modules/json-stable-stringify/package.json index 410d253..a865518 100644 --- a/node_modules/json-stable-stringify/package.json +++ b/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "642160760356f9fc31e42eeb7b2d88ee81aa3c7d", + "_shasum": "374c8d40e18bad1483b588e3db58c753c7700b60", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json index 685f581..0e2309a 100644 --- a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json +++ b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "6e1ac0794da7febe33b34bf71812dba02487c252", + "_shasum": "6903f31479a2a34fbea92a62c2e16e53e1e97616", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved":
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (8bdf0f7)
jenkins-bot has submitted this change and it was merged. Change subject: Update VE core submodule to master (8bdf0f7) .. Update VE core submodule to master (8bdf0f7) New changes: 7c10516 Cleanup ElementLinearData#sanitize ff79ed5 Fix margins around progress dialog rows 7b8652b Localisation updates from https://translatewiki.net. 60e14a5 Method to rebase a transaction onto another 10f4ad7 Fix typo in ve.dm.LinearSelection 8d0bff6 Apply inserted annotations above background annotation stack 0c0ebc9 Human-readable transaction summary, for debug 3f4706c Apply platform language to SA target b5e542c Ignore s used to keep empty branch nodes open f91512f Follow-up e3192e2d3: properly fix layout thrashing in updateInvisibleIcon ea3bf6d build: Switch from jshint and jscs to eslint 71897cc Fix documentation to pass eslint valid-jsdoc 2b27876 Enable eslint:valid-jsdoc with exceptions for @chainable f31b1fa Don't position inspector using selection from wrong document 1fc44bf doc: Fix up last jscs/jshint remnants, comment where retained Change-Id: I8682263591968713c1ebdea218181bb40634cbb4 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index 5fc8c7f..8bdf0f7 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 5fc8c7f0fe9da80aa97c456fa323acb8685bb792 +Subproject commit 8bdf0f796b4fba3e748c4b9697cf84a5b4cb4a3e -- To view, visit https://gerrit.wikimedia.org/r/318241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8682263591968713c1ebdea218181bb40634cbb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update SmashPig lib
jenkins-bot has submitted this change and it was merged. Change subject: Update SmashPig lib .. Update SmashPig lib Fix damaged message links and stop throwing exceptions on pending db messages missing order id. Change-Id: I6a0a404a6c5453354916f1604add9a2585baaefb --- M composer.lock 1 file changed, 8 insertions(+), 7 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index d736192..eb81bf1 100644 --- a/composer.lock +++ b/composer.lock @@ -249,6 +249,7 @@ "messaging", "stomp" ], +"abandoned": "stomp-php/stomp-php", "time": "2013-02-23 17:34:44" }, { @@ -1139,7 +1140,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;, -"reference": "345dc21e9cb0b4ef0a1a1e25286f21a91d099171" +"reference": "648351fbc2f9f158fcff53823fefa27639e3b827" }, "require": { "amzn/login-and-pay-with-amazon-sdk-php": "dev-master", @@ -1190,7 +1191,7 @@ "donations", "payments" ], -"time": "2016-10-24 21:30:18" +"time": "2016-10-26 18:59:19" }, { "name": "zordius/lightncandy", @@ -1351,16 +1352,16 @@ }, { "name": "phpdocumentor/reflection-docblock", -"version": "3.1.0", +"version": "3.1.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git;, -"reference": "9270140b940ff02e58ec577c237274e92cd40cdd" +"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd;, -"reference": "9270140b940ff02e58ec577c237274e92cd40cdd", +"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e;, +"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", "shasum": "" }, "require": { @@ -1392,7 +1393,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", -"time": "2016-06-10 09:48:41" +"time": "2016-09-30 07:12:33" }, { "name": "phpdocumentor/type-resolver", -- To view, visit https://gerrit.wikimedia.org/r/318155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a0a404a6c5453354916f1604add9a2585baaefb Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: zuul::merger: switch gearman server to contint1001
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318252 Change subject: zuul::merger: switch gearman server to contint1001 .. zuul::merger: switch gearman server to contint1001 Bug: T95757 Change-Id: Iff9a94471f051d5062afda30be5e8bf8c6d062d3 --- M hieradata/role/common/zuul/merger.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/318252/1 diff --git a/hieradata/role/common/zuul/merger.yaml b/hieradata/role/common/zuul/merger.yaml index e9195ce..af4a265 100644 --- a/hieradata/role/common/zuul/merger.yaml +++ b/hieradata/role/common/zuul/merger.yaml @@ -9,7 +9,7 @@ contactgroups: 'admins,contint' zuul::merger: -gearman_server: '208.80.154.135' # gallium.wikimedia.org +gearman_server: '208.80.154.17' # contint1001.wikimedia.org gerrit_ssh_key_file: 'ssh/ci/jenkins-bot_gerrit_id_rsa' git_dir: '/srv/ssd/zuul/git' git_email: "zuul-merger@%{::hostname}" -- To view, visit https://gerrit.wikimedia.org/r/318252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff9a94471f051d5062afda30be5e8bf8c6d062d3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dashboard[master]: Deploy fixed Maps dash
Bearloga has submitted this change and it was merged. Change subject: Deploy fixed Maps dash .. Deploy fixed Maps dash Bug: T149127 Change-Id: I8fca379e0b0e9e4e4aaecaaa8aabee4b768f9db4 --- M shiny-server/maps 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bearloga: Verified; Looks good to me, approved diff --git a/shiny-server/maps b/shiny-server/maps index d04dd5b..b2e9e21 16 --- a/shiny-server/maps +++ b/shiny-server/maps @@ -1 +1 @@ -Subproject commit d04dd5b6343816660a87ee9e24d9ee70bd79ffcd +Subproject commit b2e9e216a8c911931672037cd012e93f9e0df411 -- To view, visit https://gerrit.wikimedia.org/r/318164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8fca379e0b0e9e4e4aaecaaa8aabee4b768f9db4 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/discovery/dashboard Gerrit-Branch: master Gerrit-Owner: BearlogaGerrit-Reviewer: Bearloga ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus::tools: fix k8s discovery after upgrade
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/318251 Change subject: prometheus::tools: fix k8s discovery after upgrade .. prometheus::tools: fix k8s discovery after upgrade Newer Prometheus k8s discovery shuffled things around and discovery 'type' selection is done in the configuration itself. Also split in two jobs between apiserver and nodes, this allows e.g. to force insecure https and other settings only where needed. Finally, drop spammy metrics where cardinality would be out of control, e.g. rest_client_request_status_codes{code="Get https://k8s-master.tools.wmflabs.org:6443/api/v1/watch/services?resourceVersion=41811919=377: dial tcp 10.68.17.142:6443: getsockopt: connection refused",host="k8s-master.tools.wmflabs.org:6443",method="GET"} 1 Bug: T147207 Change-Id: I36dbc5c58f7619d8785b28201efc7c9b73b1c884 --- M modules/role/manifests/prometheus/tools.pp 1 file changed, 22 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/318251/1 diff --git a/modules/role/manifests/prometheus/tools.pp b/modules/role/manifests/prometheus/tools.pp index e0f60a9..1593b4a 100644 --- a/modules/role/manifests/prometheus/tools.pp +++ b/modules/role/manifests/prometheus/tools.pp @@ -15,30 +15,42 @@ listen_address => '127.0.0.1:9902', scrape_configs_extra => [ { -'job_name' => 'k8s', +'job_name' => 'k8s-api', 'bearer_token_file' => $bearer_token_file, 'kubernetes_sd_configs' => [ { 'api_servers' => [ "https://${master_host}:6443; ], 'bearer_token_file' => $bearer_token_file, +'role' => 'apiserver', }, ], -# keep metrics coming from apiserver or node kubernetes roles -# and map kubernetes node labels to prometheus metric labels -'relabel_configs' => [ +}, +{ +'job_name' => 'k8s-node', +'bearer_token_file' => $bearer_token_file, +# Force (insecure) https only for node servers +'scheme'=> 'https', +'tls_configs' => { +'insecure_skip_verify' => 'True', +}, +'kubernetes_sd_configs' => [ { -'source_labels' => ['__meta_kubernetes_role'], -'action'=> 'keep', -'regex' => '(?:apiserver|node)', +'api_servers' => [ "https://${master_host}:6443; ], +'bearer_token_file' => $bearer_token_file, +'role' => 'node', }, +], +'relabel_configs' => [ +# Map kubernetes node labels to prometheus metric labels { 'action' => 'labelmap', 'regex' => '__meta_kubernetes_node_label_(.+)', }, +# Drop spammy metrics (i.e. with high cardinality k/v pairs) { -'source_labels' => ['__meta_kubernetes_role'], -'action'=> 'replace', -'target_label' => 'kubernetes_role', +'action' => 'drop', +'regex' => 'rest_client_request.*', +'source_labels' => [ '__name__' ], }, ] }, -- To view, visit https://gerrit.wikimedia.org/r/318251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36dbc5c58f7619d8785b28201efc7c9b73b1c884 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove gallium.wikimedia.org, keep gallium.mgmt
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318250 Change subject: remove gallium.wikimedia.org, keep gallium.mgmt .. remove gallium.wikimedia.org, keep gallium.mgmt Bug: T95757 Change-Id: Ia14cfdf0448ae3ff7f1aabfec096c84beff8dcae --- M templates/154.80.208.in-addr.arpa M templates/wikimedia.org 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/50/318250/1 diff --git a/templates/154.80.208.in-addr.arpa b/templates/154.80.208.in-addr.arpa index 4f853f4..741038b 100644 --- a/templates/154.80.208.in-addr.arpa +++ b/templates/154.80.208.in-addr.arpa @@ -89,7 +89,6 @@ 130 1H IN PTR ae2-1002.cr1-eqiad.wikimedia.org. 131 1H IN PTR ae2-1002.cr2-eqiad.wikimedia.org. -135 1H IN PTR gallium.wikimedia.org. 136 1H IN PTR silver.wikimedia.org. 137 1H IN PTR lvs1004.wikimedia.org. 138 1H IN PTR lvs1005.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 7fdba7c..bf68622 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -127,7 +127,6 @@ frdev-eqiad 1H IN A208.80.155.13 fundraising-eqiad 1H IN A208.80.155.14 -gallium 1H IN A208.80.154.135 labservices1002 1H IN A208.80.154.12 hydrogen1H IN A208.80.154.50 1H IN 2620:0:861:1:208:80:154:50 -- To view, visit https://gerrit.wikimedia.org/r/318250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia14cfdf0448ae3ff7f1aabfec096c84beff8dcae Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: switch zuul CNAME from gallium to contint1001
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318249 Change subject: switch zuul CNAME from gallium to contint1001 .. switch zuul CNAME from gallium to contint1001 Bug: T95757 Change-Id: Id13632900b66c4a5f0f77ca96ffb326fcfe682f5 --- M templates/wmnet 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/49/318249/1 diff --git a/templates/wmnet b/templates/wmnet index 3b52247..4623c97 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -25,7 +25,7 @@ ; Service aliases syslog 1H IN CNAMElithium.eqiad.wmnet. webproxy1H IN CNAMEcarbon.wikimedia.org. -zuul1H IN CNAMEgallium.wikimedia.org. +zuul1H IN CNAMEcontint1001.wikimedia.org. carbon-relay1H IN CNAMEgraphite1001.eqiad.wmnet. graphite1H IN CNAMEgraphite1001.eqiad.wmnet. graphite-in 1H IN CNAMEgraphite1001.eqiad.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/318249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id13632900b66c4a5f0f77ca96ffb326fcfe682f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Pass edit token when saving/diffing in new wikitext editor
jenkins-bot has submitted this change and it was merged. Change subject: Pass edit token when saving/diffing in new wikitext editor .. Pass edit token when saving/diffing in new wikitext editor Change-Id: Ia14a4d204e367a3d0d46165a51b0cdc6fc3d57e7 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Alex Monk: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js index 30de109..e335096 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js @@ -372,7 +372,7 @@ * @inheritdoc */ ve.init.mw.DesktopWikitextArticleTarget.prototype.tryWithPreparedCacheKey = function ( doc, options ) { - var data; + var data, postData; if ( this.mode === 'source' ) { data = { wikitext: doc, @@ -381,10 +381,11 @@ if ( this.section !== null ) { data.section = this.section; } - return new mw.Api().post( - ve.extendObject( {}, options, data ), - { contentType: 'multipart/form-data' } - ); + postData = ve.extendObject( {}, options, data ); + if ( data.token ) { + return new mw.Api().post( postData, { contentType: 'multipart/form-data' } ); + } + return new mw.Api().postWithToken( 'csrf', postData, { contentType: 'multipart/form-data' } ); } else { // Parent method return ve.init.mw.DesktopWikitextArticleTarget.super.prototype.tryWithPreparedCacheKey.apply( this, arguments ); -- To view, visit https://gerrit.wikimedia.org/r/318239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia14a4d204e367a3d0d46165a51b0cdc6fc3d57e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Catrope Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep/integration: stop downgrading sshd MAC and KEX
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318248 Change subject: deployment-prep/integration: stop downgrading sshd MAC and KEX .. deployment-prep/integration: stop downgrading sshd MAC and KEX ... This is more an open question if we'll be able to do this on contint1001 Bug: T95757 Change-Id: Idac8d490e712de0eda7a4f66e2f92aec90d1f9ac --- M hieradata/labs/deployment-prep/common.yaml M hieradata/labs/integration/common.yaml 2 files changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/318248/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 90a252f..1416041 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -124,11 +124,6 @@ - wikidev "base::environment::core_dump_pattern": '/data/project/cores/%{::hostname}-core.%h.%e.%p.%t' -# T100509 Java7 on gallium does not support the hardned sshd MAC and KEX setup -# causing slaves to be unreacheable. -ssh::server::disable_nist_kex: false -ssh::server::explicit_macs: false - "role::apertium::apertium_port": 2737 "role::cxserver::cxserver_port": 8080 "misc::syslog-server::basepath": /data/project/syslog diff --git a/hieradata/labs/integration/common.yaml b/hieradata/labs/integration/common.yaml index f34d999..a117f7a 100644 --- a/hieradata/labs/integration/common.yaml +++ b/hieradata/labs/integration/common.yaml @@ -1,7 +1,3 @@ -# T100509 Java7 on gallium does not support the hardned sshd MAC and KEX setup -# causing slaves to be unreacheable. -ssh::server::disable_nist_kex: false -ssh::server::explicit_macs: false # Hosts running zuul-merger process # Use ip addresses since the values are injected in iptables rules. # -- To view, visit https://gerrit.wikimedia.org/r/318248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idac8d490e712de0eda7a4f66e2f92aec90d1f9ac Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: rm gallium from ferm rules in zuul::merger
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318247 Change subject: contint: rm gallium from ferm rules in zuul::merger .. contint: rm gallium from ferm rules in zuul::merger Bug: T95757 Change-Id: I1df15978f2308b670fdf38454331eb8e4f702ac9 --- M modules/role/manifests/zuul/merger.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/318247/1 diff --git a/modules/role/manifests/zuul/merger.pp b/modules/role/manifests/zuul/merger.pp index b6dbb77..acc89d9 100644 --- a/modules/role/manifests/zuul/merger.pp +++ b/modules/role/manifests/zuul/merger.pp @@ -33,6 +33,6 @@ ferm::service { 'git-daemon_internal': proto => 'tcp', port => '9418', -srange => '(($LABS_NETWORKS @resolve(gallium.wikimedia.org) @resolve(contint1001.wikimedia.org) ))', +srange => '(($LABS_NETWORKS @resolve(contint1001.wikimedia.org) ))', } } -- To view, visit https://gerrit.wikimedia.org/r/318247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1df15978f2308b670fdf38454331eb8e4f702ac9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to cb42720
Ppchelko has submitted this change and it was merged. Change subject: Update restbase to cb42720 .. Update restbase to cb42720 List of changes: ab1928e Added complete feed tests 8023904 Added a delay to the tests as storing is done async e531236 Improved assertion function name xxx Update node module dependencies Change-Id: Icadf372df0a5aba3c724865233b680d9e3c4d38b --- M node_modules/content-type/package.json M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json M node_modules/hyperswitch/node_modules/swagger-ui/package.json M node_modules/json-stable-stringify/package.json M node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json M node_modules/service-runner/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s M node_modules/service-runner/node_modules/bunyan/node_modules/dtrace-provider/package.json M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M restbase 9 files changed, 35 insertions(+), 29 deletions(-) Approvals: Ppchelko: Verified; Looks good to me, approved diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json index d77b9a3..d5be2e8 100644 --- a/node_modules/content-type/package.json +++ b/node_modules/content-type/package.json @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/jshttp/content-type#readme;, "_id": "content-type@1.0.1", - "_shasum": "6474ed5a4ab19aa2170d848e31b52f7e3ea8fdd4", + "_shasum": "371a824d92841315e1887be762509f76620ace83", "_from": "git+https://github.com/wikimedia/content-type.git#master;, "_resolved": "git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b; } diff --git a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json index 685f581..0e2309a 100644 --- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json +++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "6e1ac0794da7febe33b34bf71812dba02487c252", + "_shasum": "6903f31479a2a34fbea92a62c2e16e53e1e97616", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json b/node_modules/hyperswitch/node_modules/swagger-ui/package.json index 7114a01..e5633b6 100644 --- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json +++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json @@ -70,7 +70,7 @@ "url": "https://github.com/swagger-api/swagger-ui/issues; }, "_id": "swagger-ui@2.2.5", - "_shasum": "70c690c72d29e8997776b4c4f82a0d9a1ef1fc6f", + "_shasum": "47819516876b95dccc4ce4a230a163c0fea3f909", "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;, "_resolved": "git+https://github.com/wikimedia/swagger-ui.git#c3a313727ad641d71142768bf05cdd6da22ba84a; } diff --git a/node_modules/json-stable-stringify/package.json b/node_modules/json-stable-stringify/package.json index 410d253..a865518 100644 --- a/node_modules/json-stable-stringify/package.json +++ b/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "642160760356f9fc31e42eeb7b2d88ee81aa3c7d", + "_shasum": "374c8d40e18bad1483b588e3db58c753c7700b60", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json index 685f581..0e2309a 100644 --- a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json +++ b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "6e1ac0794da7febe33b34bf71812dba02487c252", + "_shasum": "6903f31479a2a34fbea92a62c2e16e53e1e97616", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: switch gallium to contint1001
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318246 Change subject: cache::misc: switch gallium to contint1001 .. cache::misc: switch gallium to contint1001 Bug: T95757 Change-Id: Ia4fabde431b42df99659e8334406b99eaec50d7a --- M modules/role/manifests/cache/misc.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/318246/1 diff --git a/modules/role/manifests/cache/misc.pp b/modules/role/manifests/cache/misc.pp index 21a039b..ab149e6 100644 --- a/modules/role/manifests/cache/misc.pp +++ b/modules/role/manifests/cache/misc.pp @@ -113,10 +113,10 @@ 'be_opts' => merge($app_def_be_opts, { 'port' => 9001 }), 'req_host' => 'etherpad.wikimedia.org', }, -'gallium' => { # CI server +'contint1001' => { # CI server 'dynamic' => 'no', 'type' => 'random', -'backends' => ['gallium.wikimedia.org' ], +'backends' => ['contint1001.wikimedia.org' ], 'be_opts' => $app_def_be_opts, 'req_host' => [ 'doc.wikimedia.org', -- To view, visit https://gerrit.wikimedia.org/r/318246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4fabde431b42df99659e8334406b99eaec50d7a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: remove gallium from firewall::labs
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/318245 Change subject: contint: remove gallium from firewall::labs .. contint: remove gallium from firewall::labs Bug: T95757 Change-Id: Ie631e165badc4b985ec8e815fbcfd657006a75ba --- M modules/contint/manifests/firewall/labs.pp 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/318245/1 diff --git a/modules/contint/manifests/firewall/labs.pp b/modules/contint/manifests/firewall/labs.pp index 81d58dc..bfb6652 100644 --- a/modules/contint/manifests/firewall/labs.pp +++ b/modules/contint/manifests/firewall/labs.pp @@ -5,11 +5,6 @@ # Firewall rules for contint Jenkins slaves. Basically let the Jenkins masters # to ssh to the slaves box. class contint::firewall::labs { -ferm::service { 'gallium_ssh_to_slaves': -proto => 'tcp', -port => '22', -srange => '@resolve(gallium.wikimedia.org)' -} ferm::service { 'contint1001_ssh_to_slaves': proto => 'tcp', -- To view, visit https://gerrit.wikimedia.org/r/318245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie631e165badc4b985ec8e815fbcfd657006a75ba Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Create embryo description editing activity.
jenkins-bot has submitted this change and it was merged. Change subject: Create embryo description editing activity. .. Create embryo description editing activity. This makes article descriptions clickable (by adding a ClickableSpan to the relevant text portion). This also creates a blank activity that will be the container for the description editing workflow. The activity is not entirely blank: it accepts a PageTitle parameter, which feeds it with the requested page title, which will contain its current description. Bug: T146639 Bug: T146640 Change-Id: Iaa62a901d93376cf743bfd933db0b6ea47be658c --- M app/src/main/AndroidManifest.xml M app/src/main/java/org/wikipedia/activity/SingleFragmentActivityWithToolbar.java A app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java A app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java A app/src/main/res/layout/fragment_description_edit.xml M app/src/main/res/layout/view_article_header.xml 8 files changed, 174 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Niedzielski: Looks good to me, approved diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8c2830c..bf97417 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -156,6 +156,10 @@ android:theme="@style/PageTheme" android:exported="false"/> + + { +private static final String EXTRA_TITLE = "title"; + +public static Intent newIntent(@NonNull Context context, @NonNull PageTitle title) { +return new Intent(context, DescriptionEditActivity.class) +.putExtra(EXTRA_TITLE, GsonMarshaller.marshal(title)); +} + +@Override +public void onCreate(Bundle savedInstanceState) { +super.onCreate(savedInstanceState); +setWordmarkVisible(false); +if (getSupportActionBar() != null) { +getSupportActionBar().setDisplayHomeAsUpEnabled(true); +} +} + +@Override +public DescriptionEditFragment createFragment() { +return DescriptionEditFragment.newInstance(GsonUnmarshaller.unmarshal(PageTitle.class, getIntent().getStringExtra(EXTRA_TITLE))); +} +} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java new file mode 100644 index 000..711e7f0 --- /dev/null +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java @@ -0,0 +1,56 @@ +package org.wikipedia.descriptions; + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import org.wikipedia.R; +import org.wikipedia.json.GsonMarshaller; +import org.wikipedia.json.GsonUnmarshaller; +import org.wikipedia.page.PageTitle; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.Unbinder; + +public class DescriptionEditFragment extends Fragment { +private static final String EXTRA_TITLE = "title"; + +@BindView(R.id.description_edit_page_title) TextView pageTitleText; +private Unbinder unbinder; + +private PageTitle pageTitle; + +@NonNull +public static DescriptionEditFragment newInstance(@NonNull PageTitle title) { +DescriptionEditFragment instance = new DescriptionEditFragment(); +Bundle args = new Bundle(); +args.putString(EXTRA_TITLE, GsonMarshaller.marshal(title)); +instance.setArguments(args); +return instance; +} + +@Nullable +@Override +public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { +super.onCreateView(inflater, container, savedInstanceState); +View view = inflater.inflate(R.layout.fragment_description_edit, container, false); +unbinder = ButterKnife.bind(this, view); + +pageTitle = GsonUnmarshaller.unmarshal(PageTitle.class, getActivity().getIntent().getStringExtra(EXTRA_TITLE)); + +pageTitleText.setText(pageTitle.getDisplayText()); +return view; +} + +@Override public void onDestroyView() { +unbinder.unbind(); +unbinder = null; +super.onDestroyView(); +} +} diff --git a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java b/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java index c5b9019..29b15b9 100644 --- a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java +++
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove references to psw1-eqiad, decom'ed
Faidon Liambotis has submitted this change and it was merged. Change subject: Remove references to psw1-eqiad, decom'ed .. Remove references to psw1-eqiad, decom'ed Bug: T149224 Change-Id: Id6894474efb26ad767e57911678c393a0d45e38f --- M modules/netops/manifests/monitoring.pp M modules/rancid/files/core/router.db M modules/role/manifests/torrus.pp M modules/smokeping/files/config.d/Targets 4 files changed, 0 insertions(+), 8 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/netops/manifests/monitoring.pp b/modules/netops/manifests/monitoring.pp index f9aea72..a505bcf 100644 --- a/modules/netops/manifests/monitoring.pp +++ b/modules/netops/manifests/monitoring.pp @@ -68,7 +68,6 @@ 'asw-c-eqiad.mgmt.eqiad.wmnet' => { ipv4 => '10.65.0.23', }, 'asw-d-eqiad.mgmt.eqiad.wmnet' => { ipv4 => '10.65.0.24', }, 'msw1-eqiad.mgmt.eqiad.wmnet'=> { ipv4 => '10.65.0.10', }, -'psw1-eqiad.mgmt.eqiad.wmnet'=> { ipv4 => '10.65.0.21', }, # codfw 'asw-a-codfw.mgmt.codfw.wmnet' => { ipv4 => '10.193.0.16', }, 'asw-b-codfw.mgmt.codfw.wmnet' => { ipv4 => '10.193.0.17', }, diff --git a/modules/rancid/files/core/router.db b/modules/rancid/files/core/router.db index 1a4a7d0..6bf6c79 100644 --- a/modules/rancid/files/core/router.db +++ b/modules/rancid/files/core/router.db @@ -11,7 +11,6 @@ asw-c-eqiad.mgmt.eqiad.wmnet:juniper:up: asw-d-eqiad.mgmt.eqiad.wmnet:juniper:up: asw2-a5-eqiad.mgmt.eqiad.wmnet:juniper:up: -psw1-eqiad.mgmt.eqiad.wmnet:juniper:up: msw1-eqiad.mgmt.eqiad.wmnet:juniper:up: lab-ex4200-1.mgmt.eqiad.wmnet:juniper:down: lab-ex4500-1.mgmt.eqiad.wmnet:juniper:down: diff --git a/modules/role/manifests/torrus.pp b/modules/role/manifests/torrus.pp index 3fafc6b..424b603 100644 --- a/modules/role/manifests/torrus.pp +++ b/modules/role/manifests/torrus.pp @@ -34,7 +34,6 @@ 'asw-esams.mgmt.esams.wmnet', 'csw2-esams.mgmt.esams.wmnet', 'msw1-eqiad.mgmt.eqiad.wmnet', -'psw1-eqiad.mgmt.eqiad.wmnet', 'msw1-codfw.mgmt.codfw.wmnet', ] diff --git a/modules/smokeping/files/config.d/Targets b/modules/smokeping/files/config.d/Targets index 30409e8..d0e1fe7 100644 --- a/modules/smokeping/files/config.d/Targets +++ b/modules/smokeping/files/config.d/Targets @@ -62,11 +62,6 @@ title = msw1-eqiad.mgmt.eqiad.wmnet host = msw1-eqiad.mgmt.eqiad.wmnet -+++ psw1-eqiad -menu = psw1-eqiad -title = psw1-eqiad.mgmt.eqiad.wmnet -host = psw1-eqiad.mgmt.eqiad.wmnet - ++ Hosts menu = Hosts title = Sampled Hosts -- To view, visit https://gerrit.wikimedia.org/r/318243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6894474efb26ad767e57911678c393a0d45e38f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Set mode of save dialog after setting size so footer is corr...
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318244 Change subject: Set mode of save dialog after setting size so footer is correct height .. Set mode of save dialog after setting size so footer is correct height Bug: T149274 Change-Id: Ic88b1c861029495e6098686d847deb181f62288e --- M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/44/318244/1 diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index 2059282..6b9f587 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -174,6 +174,7 @@ */ ve.ui.MWSaveDialog.prototype.swapPanel = function ( panel ) { var currentEditSummaryWikitext, + mode = panel, size = 'medium', dialog = this, panelObj = dialog[ panel + 'Panel' ]; @@ -200,19 +201,15 @@ switch ( panel ) { case 'save': - this.actions.setMode( 'save' ); // HACK: FF needs *another* defer setTimeout( function () { dialog.editSummaryInput.moveCursorToEnd(); } ); break; case 'conflict': - this.actions - .setAbilities( { save: false } ) - .setMode( 'conflict' ); + this.actions.setAbilities( { save: false } ); break; case 'preview': - this.actions.setMode( 'preview' ); size = 'full'; break; case 'review': @@ -249,9 +246,9 @@ } ); } } - /* falls through */ + break; case 'nochanges': - this.actions.setMode( 'review' ); + mode = 'review'; break; } @@ -264,6 +261,9 @@ this.panels.setItem( panelObj ); this.setSize( size ); + // Set mode after setting size so that the footer is measured correctly + this.actions.setMode( mode ); + mw.hook( 've.saveDialog.stateChanged' ).fire(); return dialog; -- To view, visit https://gerrit.wikimedia.org/r/318244 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic88b1c861029495e6098686d847deb181f62288e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: Remove psw1-eqiad, decom'ed
Faidon Liambotis has submitted this change and it was merged. Change subject: Remove psw1-eqiad, decom'ed .. Remove psw1-eqiad, decom'ed Bug: T149224 Change-Id: Id19c99bc615db152d45e488ea9cd227122eb243a --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index b69d1b2..a693ac8 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -1135,11 +1135,10 @@ 18 1H IN PTR asw-b-eqiad.mgmt.eqiad.wmnet. 19 1H IN PTR lab-ex4200-1.mgmt.eqiad.wmnet. 20 1H IN PTR asw2-a5-eqiad.mgmt.eqiad.wmnet. -21 1H IN PTR psw1-eqiad.mgmt.eqiad.wmnet. + 22 1H IN PTR scs-c1-eqiad.mgmt.eqiad.wmnet. 23 1H IN PTR asw-c-eqiad.mgmt.eqiad.wmnet. 24 1H IN PTR asw-d-eqiad.mgmt.eqiad.wmnet. - 25 1H IN PTR pfw1-eqiad.mgmt.eqiad.wmnet. 26 1H IN PTR pfw2-eqiad.mgmt.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 9f4a9f4..a004f75 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -837,7 +837,6 @@ asw-b-eqiad 1H IN A10.65.0.18 lab-ex4200-11H IN A10.65.0.19 asw2-a5-eqiad 1H IN A10.65.0.20 -psw1-eqiad 1H IN A10.65.0.21 scs-c1-eqiad1H IN A10.65.0.22 asw-c-eqiad 1H IN A10.65.0.23 asw-d-eqiad 1H IN A10.65.0.24 -- To view, visit https://gerrit.wikimedia.org/r/318242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id19c99bc615db152d45e488ea9cd227122eb243a Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove references to psw1-eqiad, decom'ed
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/318243 Change subject: Remove references to psw1-eqiad, decom'ed .. Remove references to psw1-eqiad, decom'ed Bug: T149224 Change-Id: Id6894474efb26ad767e57911678c393a0d45e38f --- M modules/netops/manifests/monitoring.pp M modules/rancid/files/core/router.db M modules/role/manifests/torrus.pp M modules/smokeping/files/config.d/Targets 4 files changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/318243/1 diff --git a/modules/netops/manifests/monitoring.pp b/modules/netops/manifests/monitoring.pp index f9aea72..a505bcf 100644 --- a/modules/netops/manifests/monitoring.pp +++ b/modules/netops/manifests/monitoring.pp @@ -68,7 +68,6 @@ 'asw-c-eqiad.mgmt.eqiad.wmnet' => { ipv4 => '10.65.0.23', }, 'asw-d-eqiad.mgmt.eqiad.wmnet' => { ipv4 => '10.65.0.24', }, 'msw1-eqiad.mgmt.eqiad.wmnet'=> { ipv4 => '10.65.0.10', }, -'psw1-eqiad.mgmt.eqiad.wmnet'=> { ipv4 => '10.65.0.21', }, # codfw 'asw-a-codfw.mgmt.codfw.wmnet' => { ipv4 => '10.193.0.16', }, 'asw-b-codfw.mgmt.codfw.wmnet' => { ipv4 => '10.193.0.17', }, diff --git a/modules/rancid/files/core/router.db b/modules/rancid/files/core/router.db index 1a4a7d0..6bf6c79 100644 --- a/modules/rancid/files/core/router.db +++ b/modules/rancid/files/core/router.db @@ -11,7 +11,6 @@ asw-c-eqiad.mgmt.eqiad.wmnet:juniper:up: asw-d-eqiad.mgmt.eqiad.wmnet:juniper:up: asw2-a5-eqiad.mgmt.eqiad.wmnet:juniper:up: -psw1-eqiad.mgmt.eqiad.wmnet:juniper:up: msw1-eqiad.mgmt.eqiad.wmnet:juniper:up: lab-ex4200-1.mgmt.eqiad.wmnet:juniper:down: lab-ex4500-1.mgmt.eqiad.wmnet:juniper:down: diff --git a/modules/role/manifests/torrus.pp b/modules/role/manifests/torrus.pp index 3fafc6b..424b603 100644 --- a/modules/role/manifests/torrus.pp +++ b/modules/role/manifests/torrus.pp @@ -34,7 +34,6 @@ 'asw-esams.mgmt.esams.wmnet', 'csw2-esams.mgmt.esams.wmnet', 'msw1-eqiad.mgmt.eqiad.wmnet', -'psw1-eqiad.mgmt.eqiad.wmnet', 'msw1-codfw.mgmt.codfw.wmnet', ] diff --git a/modules/smokeping/files/config.d/Targets b/modules/smokeping/files/config.d/Targets index 30409e8..d0e1fe7 100644 --- a/modules/smokeping/files/config.d/Targets +++ b/modules/smokeping/files/config.d/Targets @@ -62,11 +62,6 @@ title = msw1-eqiad.mgmt.eqiad.wmnet host = msw1-eqiad.mgmt.eqiad.wmnet -+++ psw1-eqiad -menu = psw1-eqiad -title = psw1-eqiad.mgmt.eqiad.wmnet -host = psw1-eqiad.mgmt.eqiad.wmnet - ++ Hosts menu = Hosts title = Sampled Hosts -- To view, visit https://gerrit.wikimedia.org/r/318243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6894474efb26ad767e57911678c393a0d45e38f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: Remove psw1-eqiad, decom'ed
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/318242 Change subject: Remove psw1-eqiad, decom'ed .. Remove psw1-eqiad, decom'ed Bug: T149224 Change-Id: Id19c99bc615db152d45e488ea9cd227122eb243a --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/42/318242/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index b69d1b2..a693ac8 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -1135,11 +1135,10 @@ 18 1H IN PTR asw-b-eqiad.mgmt.eqiad.wmnet. 19 1H IN PTR lab-ex4200-1.mgmt.eqiad.wmnet. 20 1H IN PTR asw2-a5-eqiad.mgmt.eqiad.wmnet. -21 1H IN PTR psw1-eqiad.mgmt.eqiad.wmnet. + 22 1H IN PTR scs-c1-eqiad.mgmt.eqiad.wmnet. 23 1H IN PTR asw-c-eqiad.mgmt.eqiad.wmnet. 24 1H IN PTR asw-d-eqiad.mgmt.eqiad.wmnet. - 25 1H IN PTR pfw1-eqiad.mgmt.eqiad.wmnet. 26 1H IN PTR pfw2-eqiad.mgmt.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 9f4a9f4..a004f75 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -837,7 +837,6 @@ asw-b-eqiad 1H IN A10.65.0.18 lab-ex4200-11H IN A10.65.0.19 asw2-a5-eqiad 1H IN A10.65.0.20 -psw1-eqiad 1H IN A10.65.0.21 scs-c1-eqiad1H IN A10.65.0.22 asw-c-eqiad 1H IN A10.65.0.23 asw-d-eqiad 1H IN A10.65.0.24 -- To view, visit https://gerrit.wikimedia.org/r/318242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id19c99bc615db152d45e488ea9cd227122eb243a Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: drop useless require_package
Dzahn has submitted this change and it was merged. Change subject: contint: drop useless require_package .. contint: drop useless require_package contint::packages is meant to be shared between production and labs slaves. It installs openjdk-7-jdk which is redundant with: jenkins::slave which installs the openjdk-7-jdk-headless for the jenkins agent that runs on the instances. contint::packages::java installed on all slaved and meant to represent the requirement to run a java/maven project. Drop openjdk-7-jdk from contint::packages. Change-Id: I1659311d10eaeed62816f38652cbdeeb341a8d1e --- M modules/contint/manifests/packages.pp 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index 2a6d32e..30f8b86 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -14,8 +14,6 @@ include ::mediawiki::packages::php5 } -require_package('openjdk-7-jdk') - # MediaWiki doc is built directly on contint1001 require_package('doxygen') -- To view, visit https://gerrit.wikimedia.org/r/317986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1659311d10eaeed62816f38652cbdeeb341a8d1e Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HasharGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (8bdf0f7)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/318241 Change subject: Update VE core submodule to master (8bdf0f7) .. Update VE core submodule to master (8bdf0f7) New changes: 7c10516 Cleanup ElementLinearData#sanitize ff79ed5 Fix margins around progress dialog rows 7b8652b Localisation updates from https://translatewiki.net. 60e14a5 Method to rebase a transaction onto another 10f4ad7 Fix typo in ve.dm.LinearSelection 8d0bff6 Apply inserted annotations above background annotation stack 0c0ebc9 Human-readable transaction summary, for debug 3f4706c Apply platform language to SA target b5e542c Ignore s used to keep empty branch nodes open f91512f Follow-up e3192e2d3: properly fix layout thrashing in updateInvisibleIcon ea3bf6d build: Switch from jshint and jscs to eslint 71897cc Fix documentation to pass eslint valid-jsdoc 2b27876 Enable eslint:valid-jsdoc with exceptions for @chainable f31b1fa Don't position inspector using selection from wrong document 1fc44bf doc: Fix up last jscs/jshint remnants, comment where retained Change-Id: I8682263591968713c1ebdea218181bb40634cbb4 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/41/318241/1 diff --git a/lib/ve b/lib/ve index 5fc8c7f..8bdf0f7 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 5fc8c7f0fe9da80aa97c456fa323acb8685bb792 +Subproject commit 8bdf0f796b4fba3e748c4b9697cf84a5b4cb4a3e -- To view, visit https://gerrit.wikimedia.org/r/318241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8682263591968713c1ebdea218181bb40634cbb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: add phpdbg for code coverage
Dzahn has submitted this change and it was merged. Change subject: contint: add phpdbg for code coverage .. contint: add phpdbg for code coverage mediawiki-core-code-coverage is still running on PHP5.5 with XDebug. PHP_CodeCoverage supports PHP7 with phpdbg which is order of magnitude faster. Install php7.0-phpdbg on Jessie slaves. Will let us run something like: php70-phpdbg -qrr phpunit --coverage Bug: T147778 Change-Id: I56864cf7a354e07263a38c90d6000f0ce2c44eac --- M modules/contint/manifests/packages/php.pp 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, but someone else must approve Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/contint/manifests/packages/php.pp b/modules/contint/manifests/packages/php.pp index 305050a..eef1fdf 100644 --- a/modules/contint/manifests/packages/php.pp +++ b/modules/contint/manifests/packages/php.pp @@ -37,7 +37,9 @@ 'php7.0-pgsql', 'php7.0-sqlite3', 'php7.0-tidy', -# missing xdebug +# xdebug s provided by sury as php-xdebug but we are using phpdbg +# which is faster for code coverage +'php7.0-phpdbg', # php70-phpdbg -qrr ... # ..and these are part of php5-common, # but now are separate packages 'php7.0-bcmath', -- To view, visit https://gerrit.wikimedia.org/r/314563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56864cf7a354e07263a38c90d6000f0ce2c44eac Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HasharGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Addshore Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: doc: Fix up last jscs/jshint remnants, comment where retained
jenkins-bot has submitted this change and it was merged. Change subject: doc: Fix up last jscs/jshint remnants, comment where retained .. doc: Fix up last jscs/jshint remnants, comment where retained Change-Id: I73193d60a10d14f1bbb57a34e79f16438c2d8964 --- M lib/jquery.i18n/src/jquery.i18n.language.js M package.json M src/ce/ve.ce.Surface.js M src/ce/ve.ce.TextState.js M src/ui/actions/ve.ui.LinkAction.js M src/ui/actions/ve.ui.TableAction.js M src/ui/dialogs/ve.ui.ProgressDialog.js M src/ui/ve.ui.DebugBar.js M src/ve.track.js M src/ve.utils.js M tests/ve.qunit.js M tests/ve.test.js 12 files changed, 14 insertions(+), 20 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.i18n/src/jquery.i18n.language.js b/lib/jquery.i18n/src/jquery.i18n.language.js index f83c473..65ad897 100644 --- a/lib/jquery.i18n/src/jquery.i18n.language.js +++ b/lib/jquery.i18n/src/jquery.i18n.language.js @@ -178,7 +178,7 @@ pt: { one: 'i = 1 and v = 0 or i = 0 and t = 1' }, - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers + // jscs:disable requireCamelCaseOrUpperCaseIdentifiers (awaiting eslint replacement; T149261) pt_PT: { one: 'n = 1 and v = 0' }, diff --git a/package.json b/package.json index 94b8294..a2c3354 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "grunt-contrib-clean": "1.0.0", "grunt-contrib-concat": "1.0.1", "grunt-contrib-copy": "1.0.0", -"grunt-contrib-jshint": "1.0.0", "grunt-contrib-watch": "1.0.0", "grunt-css-url-embed": "1.6.1", "grunt-cssjanus": "0.3.2", diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index c5260c9..4fe6711 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -882,9 +882,9 @@ break; } } - // Support: Firefox - // If we have no metadata (e.g. in Firefox) assume it is droppable } else if ( Array.prototype.indexOf.call( dataTransfer.types || [], 'Files' ) !== -1 ) { + // Support: Firefox + // If we have no metadata (e.g. in Firefox) assume it is droppable this.allowedFile = true; } } @@ -1868,7 +1868,7 @@ * @param {jQuery.Event} e Paste event */ ve.ce.Surface.prototype.afterPaste = function () { - // jshint unused:false + // jshint unused:false (awaiting eslint replacement; T149267) var clipboardKey, clipboardHash, $elements, pasteData, slice, internalListRange, data, pastedDocumentModel, htmlDoc, $body, $images, i, diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index 5651d4f..dbc8d42 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -69,7 +69,7 @@ // If appropriate, step into first child and loop // If no next sibling, step out until there is (breaking if we leave element) // Step to next sibling and loop - // jscs:disable disallowEmptyBlocks + // jscs:disable disallowEmptyBlocks (awaiting eslint replacement; T149266) if ( node.nodeType === Node.TEXT_NODE ) { add( node.data.replace( /\u00A0/g, ' ' ) ); } else if ( diff --git a/src/ui/actions/ve.ui.LinkAction.js b/src/ui/actions/ve.ui.LinkAction.js index a9fa71f..ffe1681 100644 --- a/src/ui/actions/ve.ui.LinkAction.js +++ b/src/ui/actions/ve.ui.LinkAction.js @@ -157,7 +157,6 @@ * stripped from an autolink. */ ve.ui.LinkAction.prototype.getTrailingPunctuation = function () { - /* jshint unused: false */ return /[,;.:!?)\]\}"'”’»]+$/; }; diff --git a/src/ui/actions/ve.ui.TableAction.js b/src/ui/actions/ve.ui.TableAction.js index 19da8cd..3cff02a 100644 --- a/src/ui/actions/ve.ui.TableAction.js +++ b/src/ui/actions/ve.ui.TableAction.js @@ -853,7 +853,7 @@ ); // Remove all but start and end tags rowData.splice( 1, rowData.length - 2 ); - /* jshint loopfunc:true */ + /* jshint loopfunc:true (awaiting eslint replacement; T149264) */ removedMatrix[ row - minIndex ] = { row: rowData, cells: cells.map( function ( cell ) { diff --git a/src/ui/dialogs/ve.ui.ProgressDialog.js b/src/ui/dialogs/ve.ui.ProgressDialog.js index ee13bce..467a812 100644 ---
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: [WIP] Move flickr interface to upload step
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/318240 Change subject: [WIP] Move flickr interface to upload step .. [WIP] Move flickr interface to upload step Change-Id: Idf1f1be48b1afe5f4c9195691d952f440d30ca22 --- M resources/controller/uw.controller.Upload.js M resources/mw.FlickrChecker.js M resources/mw.UploadWizard.js M resources/ui/steps/uw.ui.Upload.js 4 files changed, 121 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/40/318240/1 diff --git a/resources/controller/uw.controller.Upload.js b/resources/controller/uw.controller.Upload.js index 740e0da..baeb4bc 100644 --- a/resources/controller/uw.controller.Upload.js +++ b/resources/controller/uw.controller.Upload.js @@ -33,7 +33,6 @@ new uw.ui.Upload( config ) .connect( this, { retry: 'retry', - 'flickr-ui-init': [ 'emit', 'flickr-ui-init' ] } ), api, config diff --git a/resources/mw.FlickrChecker.js b/resources/mw.FlickrChecker.js index e59dbd9..6672eee 100644 --- a/resources/mw.FlickrChecker.js +++ b/resources/mw.FlickrChecker.js @@ -1,20 +1,12 @@ // Only turning these jscs options off for ''this file'' /* jscs:disable disallowDanglingUnderscores, requireCamelCaseOrUpperCaseIdentifiers */ ( function ( mw, $, OO ) { - mw.FlickrChecker = function ( wizard, upload ) { - this.wizard = wizard; - this.upload = upload; + mw.FlickrChecker = function ( ui, selectButton ) { + this.ui = ui; this.imageUploads = []; this.apiUrl = mw.UploadWizard.config.flickrApiUrl; this.apiKey = mw.UploadWizard.config.flickrApiKey; - - this.selectButton = new OO.ui.ButtonWidget( { - id: 'mwe-upwiz-select-flickr', - label: mw.message( 'mwe-upwiz-add-file-0-free' ).text(), - flags: [ 'constructive', 'primary' ] - } ); - - $( '#mwe-upwiz-flickr-select-list-container' ).append( this.selectButton.$element ); + this.selectButton = selectButton; }; /** @@ -113,7 +105,8 @@ } else { // XXX show user the message that the URL entered was not valid mw.errorDialog( mw.message( 'mwe-upwiz-url-invalid', 'Flickr' ).escaped() ); - this.wizard.flickrInterfaceReset(); + this.$spinner.remove(); + this.ui.flickrInterfaceReset(); } }, @@ -470,11 +463,10 @@ checker.setImageURL( image ) ); } ) ).done( function () { - // Once this is done for all images, add them to the wizard - checker.wizard.steps.file.addUploads( uploads ); + checker.ui.emit( 'files-added', uploads ); } ).always( function () { checker.$spinner.remove(); - checker.wizard.flickrInterfaceDestroy(); + checker.ui.flickrInterfaceDestroy(); } ); } ); @@ -494,7 +486,8 @@ } } ).fail( function ( message ) { mw.errorDialog( message ); - checker.wizard.flickrInterfaceReset(); + checker.$spinner.remove(); + checker.ui.flickrInterfaceReset(); } ); }, @@ -575,14 +568,15 @@ checker.setUploadDescription( flickrUpload, photo.description._content ), checker.setImageURL( 0 ) ).done( function () { - checker.wizard.steps.file.addUploads( [ flickrUpload ] ); + checker.ui.emit( 'files-added', [ flickrUpload ] ); } ).always( function () { checker.$spinner.remove(); - checker.wizard.flickrInterfaceDestroy(); +
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Pass edit token when saving/diffing in new wikitext editor
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318239 Change subject: Pass edit token when saving/diffing in new wikitext editor .. Pass edit token when saving/diffing in new wikitext editor Change-Id: Ia14a4d204e367a3d0d46165a51b0cdc6fc3d57e7 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/39/318239/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js index 30de109..e335096 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js @@ -372,7 +372,7 @@ * @inheritdoc */ ve.init.mw.DesktopWikitextArticleTarget.prototype.tryWithPreparedCacheKey = function ( doc, options ) { - var data; + var data, postData; if ( this.mode === 'source' ) { data = { wikitext: doc, @@ -381,10 +381,11 @@ if ( this.section !== null ) { data.section = this.section; } - return new mw.Api().post( - ve.extendObject( {}, options, data ), - { contentType: 'multipart/form-data' } - ); + postData = ve.extendObject( {}, options, data ); + if ( data.token ) { + return new mw.Api().post( postData, { contentType: 'multipart/form-data' } ); + } + return new mw.Api().postWithToken( 'csrf', postData, { contentType: 'multipart/form-data' } ); } else { // Parent method return ve.init.mw.DesktopWikitextArticleTarget.super.prototype.tryWithPreparedCacheKey.apply( this, arguments ); -- To view, visit https://gerrit.wikimedia.org/r/318239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia14a4d204e367a3d0d46165a51b0cdc6fc3d57e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment and update vendor e824ec0 Update SmashPig lib a0babf2 Log raw messages in queue consumers b3ae49a Add decile field to prospect. d841af3 Add new prospect custom fields to custom fields declaration. d1f874a Update trigger mysql 97edcc1 Add benefactor fields. d2bda21 Address a second way in which contacts are winding up without primaries. b63ccfc Adjust preferred_language dedupe conflict resolution to prefer later donor. 94b6845 Remove placeholder emails (n...@na.com). 912b850 CiviCRM submodule update Change-Id: Ia48177d190ffab725ff35ef67a138e9399b38abe --- M composer.lock D sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M vendor 3 files changed, 1 insertion(+), 2,293 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 4343486..82fa960 100644 --- a/composer.lock +++ b/composer.lock @@ -1241,1067 +1241,7 @@ "time": "2015-11-05 07:14:57" } ], -<<< HEAD (586433 Merge branch 'master' into deployment) "packages-dev": null, -=== -"packages-dev": [ -{ -"name": "doctrine/instantiator", -"version": "1.0.5", -"source": { -"type": "git", -"url": "https://github.com/doctrine/instantiator.git;, -"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d;, -"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", -"shasum": "" -}, -"require": { -"php": ">=5.3,<8.0-DEV" -}, -"require-dev": { -"athletic/athletic": "~0.1.8", -"ext-pdo": "*", -"ext-phar": "*", -"phpunit/phpunit": "~4.0", -"squizlabs/php_codesniffer": "~2.0" -}, -"type": "library", -"extra": { -"branch-alias": { -"dev-master": "1.0.x-dev" -} -}, -"autoload": { -"psr-4": { -"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" -} -}, -"notification-url": "https://packagist.org/downloads/;, -"license": [ -"MIT" -], -"authors": [ -{ -"name": "Marco Pivetta", -"email": "ocram...@gmail.com", -"homepage": "http://ocramius.github.com/; -} -], -"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", -"homepage": "https://github.com/doctrine/instantiator;, -"keywords": [ -"constructor", -"instantiate" -], -"time": "2015-06-14 21:17:01" -}, -{ -"name": "phpdocumentor/reflection-common", -"version": "1.0", -"source": { -"type": "git", -"url": "https://github.com/phpDocumentor/ReflectionCommon.git;, -"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c;, -"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", -"shasum": "" -}, -"require": { -"php": ">=5.5" -}, -"require-dev": { -"phpunit/phpunit": "^4.6" -}, -"type": "library", -"extra": { -"branch-alias": { -"dev-master": "1.0.x-dev" -} -}, -"autoload": { -"psr-4": { -"phpDocumentor\\Reflection\\": [ -"src" -] -} -}, -"notification-url": "https://packagist.org/downloads/;, -"license": [ -"MIT" -], -"authors": [ -{ -"name": "Jaap van Otterdijk", -"email": "opensou...@ijaap.nl" -} -], -"description": "Common reflection classes used by phpdocumentor to reflect the code structure", -"homepage": "http://www.phpdoc.org;, -
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/318238 Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment and update vendor e824ec0 Update SmashPig lib a0babf2 Log raw messages in queue consumers b3ae49a Add decile field to prospect. d841af3 Add new prospect custom fields to custom fields declaration. d1f874a Update trigger mysql 97edcc1 Add benefactor fields. d2bda21 Address a second way in which contacts are winding up without primaries. b63ccfc Adjust preferred_language dedupe conflict resolution to prefer later donor. 94b6845 Remove placeholder emails (n...@na.com). 912b850 CiviCRM submodule update Change-Id: Ia48177d190ffab725ff35ef67a138e9399b38abe --- M composer.lock D sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M vendor 3 files changed, 1 insertion(+), 2,293 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/38/318238/1 diff --git a/composer.lock b/composer.lock index 4343486..82fa960 100644 --- a/composer.lock +++ b/composer.lock @@ -1241,1067 +1241,7 @@ "time": "2015-11-05 07:14:57" } ], -<<< HEAD (586433 Merge branch 'master' into deployment) "packages-dev": null, -=== -"packages-dev": [ -{ -"name": "doctrine/instantiator", -"version": "1.0.5", -"source": { -"type": "git", -"url": "https://github.com/doctrine/instantiator.git;, -"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d;, -"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", -"shasum": "" -}, -"require": { -"php": ">=5.3,<8.0-DEV" -}, -"require-dev": { -"athletic/athletic": "~0.1.8", -"ext-pdo": "*", -"ext-phar": "*", -"phpunit/phpunit": "~4.0", -"squizlabs/php_codesniffer": "~2.0" -}, -"type": "library", -"extra": { -"branch-alias": { -"dev-master": "1.0.x-dev" -} -}, -"autoload": { -"psr-4": { -"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" -} -}, -"notification-url": "https://packagist.org/downloads/;, -"license": [ -"MIT" -], -"authors": [ -{ -"name": "Marco Pivetta", -"email": "ocram...@gmail.com", -"homepage": "http://ocramius.github.com/; -} -], -"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", -"homepage": "https://github.com/doctrine/instantiator;, -"keywords": [ -"constructor", -"instantiate" -], -"time": "2015-06-14 21:17:01" -}, -{ -"name": "phpdocumentor/reflection-common", -"version": "1.0", -"source": { -"type": "git", -"url": "https://github.com/phpDocumentor/ReflectionCommon.git;, -"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c;, -"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", -"shasum": "" -}, -"require": { -"php": ">=5.5" -}, -"require-dev": { -"phpunit/phpunit": "^4.6" -}, -"type": "library", -"extra": { -"branch-alias": { -"dev-master": "1.0.x-dev" -} -}, -"autoload": { -"psr-4": { -"phpDocumentor\\Reflection\\": [ -"src" -] -} -}, -"notification-url": "https://packagist.org/downloads/;, -"license": [ -"MIT" -], -"authors": [ -{ -"name": "Jaap van Otterdijk", -"email": "opensou...@ijaap.nl" -} -], -"description": "Common reflection classes used by phpdocumentor to reflect the code structure", -
[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update SmashPig library
Ejegg has submitted this change and it was merged. Change subject: Update SmashPig library .. Update SmashPig library Change-Id: I1cc827a1b4f7844fcc56c42307dd2abb88d8f527 --- M wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php M wikimedia/smash-pig/Core/DataStores/PendingDatabase.php M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php M wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php M wikimedia/smash-pig/SmashPig.yaml M wikimedia/smash-pig/Tests/DamagedDatabaseTest.php 8 files changed, 27 insertions(+), 13 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php b/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php index 8f6e60a..19d6b3a 100644 --- a/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php +++ b/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php @@ -66,6 +66,8 @@ VALUES ( $paramList );"; $this->prepareAndExecute( $insert, $dbRecord ); + + return $this->getDatabase()->lastInsertId(); } /** diff --git a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php index 5dedce3..4d9bcfc 100644 --- a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php +++ b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php @@ -3,6 +3,7 @@ use PDO; use RuntimeException; +use SmashPig\Core\Logging\Logger; use SmashPig\Core\SmashPigException; use SmashPig\Core\UtcDate; @@ -140,7 +141,9 @@ */ public function deleteMessage( $message ) { if ( !isset( $message['order_id'] ) ) { - throw new RuntimeException( 'Message doesn\'t have an order_id!' ); + $json = json_encode( $message ); + Logger::warning( "Trying to delete pending message with no order id: $json" ); + return; } $sql = ' diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php b/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php index 6f83935..dcb33c0 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php @@ -90,6 +90,9 @@ if ( $msg_type === 'refund' ) { $new_msg->gateway_refund_id = $request['txn_id']; $new_msg->gross_currency = $request['mc_currency']; + if ( $new_msg->type === 'chargeback_settlement' ) { + $new_msg->type = 'chargeback'; + } } // FIXME once recurring uses normalized msg it needs this too diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php b/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php index a6ddd10..9eb9b49 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php @@ -36,7 +36,7 @@ // Read the logging output rewind( $curlDebugLog ); - $logged = fread( $curlDebugLog, 4096 ); + $logged = fread( $curlDebugLog, 8192 ); fclose( $curlDebugLog ); Logger::debug( "cURL verbose logging: $logged" ); diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json b/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json index e59522e..d96bde3 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json @@ -1,13 +1,18 @@ { - "date": "1476796761", + "payment_date": "11:55:22 Sep 28, 2016 PDT", + "payment_status": "Completed", "txn_type": "adjustment", - "gateway_parent_id": "X", - "gateway_txn_id": "Y", - "currency": "USD", - "type": "chargeback_settlement", + "parent_txn_id": "X", + "txn_id": "Y", + "mc_currency": "USD", + "reason_code": "chargeback_settlement", "email": "a...@wikimedia.org", - "gross": "-10.00", + "mc_gross": "-10.00", "gateway": "paypal", + "notify_version": "3.8", + "payment_gross": "-10.00", + "payer_status": "verified", + "payment_fee": "-20.00", "source_name": "SmashPig", "source_type": "listener", "source_host": "secrethost",
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.28.0-wmf.23]: Use correct user for isUsableBy check in Special:OAuth/identify
jenkins-bot has submitted this change and it was merged. Change subject: Use correct user for isUsableBy check in Special:OAuth/identify .. Use correct user for isUsableBy check in Special:OAuth/identify The special page's $this->getUser() comes from the normal CookieSessionProvider cookies (or other non-OAuth mechanism), not the OAuth headers that are being validated here for use by the /identify endpoint. We need to use the user associated with the MWOAuthConsumerAcceptance instead for proper operation. Bug: T149194 Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index f6bbf7e..3f0954f 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -157,21 +157,21 @@ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); $access = MWOAuthConsumerAcceptance::newFromToken( $dbr, $token->key ); + $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); + if ( !$localUser || !$localUser->isLoggedIn() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); + } // Access token is for this wiki if ( $access->get( 'wiki' ) !== '*' && $access->get( 'wiki' ) !== $wiki ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); - } elseif ( !$consumer->isUsableBy( $user ) ) { + } elseif ( !$consumer->isUsableBy( $localUser ) ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', $consumer->get( 'name' ) ); - } - $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); - if ( !$localUser || !$localUser->isLoggedIn() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); - } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.28.0-wmf.22]: Use correct user for isUsableBy check in Special:OAuth/identify
jenkins-bot has submitted this change and it was merged. Change subject: Use correct user for isUsableBy check in Special:OAuth/identify .. Use correct user for isUsableBy check in Special:OAuth/identify The special page's $this->getUser() comes from the normal CookieSessionProvider cookies (or other non-OAuth mechanism), not the OAuth headers that are being validated here for use by the /identify endpoint. We need to use the user associated with the MWOAuthConsumerAcceptance instead for proper operation. Bug: T149194 Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 (cherry picked from commit d9eeb5be255c3d301c396f6b701b0c9fab569593) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0eb7f81..9723641 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -157,21 +157,21 @@ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); $access = MWOAuthConsumerAcceptance::newFromToken( $dbr, $token->key ); + $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); + if ( !$localUser || !$localUser->isLoggedIn() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); + } // Access token is for this wiki if ( $access->get( 'wiki' ) !== '*' && $access->get( 'wiki' ) !== $wiki ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); - } elseif ( !$consumer->isUsableBy( $user ) ) { + } elseif ( !$consumer->isUsableBy( $localUser ) ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', $consumer->get( 'name' ) ); - } - $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); - if ( !$localUser || !$localUser->isLoggedIn() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); - } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.28.0-wmf.22 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update SmashPig library
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/318237 Change subject: Update SmashPig library .. Update SmashPig library Change-Id: I1cc827a1b4f7844fcc56c42307dd2abb88d8f527 --- M wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php M wikimedia/smash-pig/Core/DataStores/PendingDatabase.php M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php M wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php M wikimedia/smash-pig/SmashPig.yaml M wikimedia/smash-pig/Tests/DamagedDatabaseTest.php 8 files changed, 27 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor refs/changes/37/318237/1 diff --git a/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php b/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php index 8f6e60a..19d6b3a 100644 --- a/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php +++ b/wikimedia/smash-pig/Core/DataStores/DamagedDatabase.php @@ -66,6 +66,8 @@ VALUES ( $paramList );"; $this->prepareAndExecute( $insert, $dbRecord ); + + return $this->getDatabase()->lastInsertId(); } /** diff --git a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php index 5dedce3..4d9bcfc 100644 --- a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php +++ b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php @@ -3,6 +3,7 @@ use PDO; use RuntimeException; +use SmashPig\Core\Logging\Logger; use SmashPig\Core\SmashPigException; use SmashPig\Core\UtcDate; @@ -140,7 +141,9 @@ */ public function deleteMessage( $message ) { if ( !isset( $message['order_id'] ) ) { - throw new RuntimeException( 'Message doesn\'t have an order_id!' ); + $json = json_encode( $message ); + Logger::warning( "Trying to delete pending message with no order id: $json" ); + return; } $sql = ' diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php b/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php index 6f83935..dcb33c0 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/Job.php @@ -90,6 +90,9 @@ if ( $msg_type === 'refund' ) { $new_msg->gateway_refund_id = $request['txn_id']; $new_msg->gross_currency = $request['mc_currency']; + if ( $new_msg->type === 'chargeback_settlement' ) { + $new_msg->type = 'chargeback'; + } } // FIXME once recurring uses normalized msg it needs this too diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php b/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php index a6ddd10..9eb9b49 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php @@ -36,7 +36,7 @@ // Read the logging output rewind( $curlDebugLog ); - $logged = fread( $curlDebugLog, 4096 ); + $logged = fread( $curlDebugLog, 8192 ); fclose( $curlDebugLog ); Logger::debug( "cURL verbose logging: $logged" ); diff --git a/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json b/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json index e59522e..d96bde3 100644 --- a/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json +++ b/wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/chargeback_settlement.json @@ -1,13 +1,18 @@ { - "date": "1476796761", + "payment_date": "11:55:22 Sep 28, 2016 PDT", + "payment_status": "Completed", "txn_type": "adjustment", - "gateway_parent_id": "X", - "gateway_txn_id": "Y", - "currency": "USD", - "type": "chargeback_settlement", + "parent_txn_id": "X", + "txn_id": "Y", + "mc_currency": "USD", + "reason_code": "chargeback_settlement", "email": "a...@wikimedia.org", - "gross": "-10.00", + "mc_gross": "-10.00", "gateway": "paypal", + "notify_version": "3.8", + "payment_gross": "-10.00", + "payer_status": "verified", + "payment_fee": "-20.00", "source_name":
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove palladium.eqiad, keep palladium.mgmt.eqiad
Dzahn has submitted this change and it was merged. Change subject: remove palladium.eqiad, keep palladium.mgmt.eqiad .. remove palladium.eqiad, keep palladium.mgmt.eqiad Bug: T147320 Change-Id: Ia80a98953a0ebb5417a776ff5fa7e16d6f7ccb75 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 0f1e550..b69d1b2 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -536,7 +536,6 @@ 157 1H IN PTR pc1002.eqiad.wmnet. 158 1H IN PTR pc1003.eqiad.wmnet. 159 1H IN PTR dbproxy1006.eqiad.wmnet. -160 1H IN PTR palladium.eqiad.wmnet. 161 1H IN PTR osm-cp1003.eqiad.wmnet. 162 1H IN PTR osm-cp1004.eqiad.wmnet. 163 1H IN PTR ms-be1016.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index d3a19af..9f4a9f4 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -671,7 +671,6 @@ osm-web1004 1H IN A10.64.32.96 osmium 1H IN A10.64.32.146 oxygen 1H IN A10.64.0.222 -palladium 1H IN A10.64.16.160 pc1001 1H IN A10.64.16.156 pc1002 1H IN A10.64.16.157 pc1003 1H IN A10.64.16.158 -- To view, visit https://gerrit.wikimedia.org/r/318034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia80a98953a0ebb5417a776ff5fa7e16d6f7ccb75 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: WIP: Expose Wikidata item ID number in mobile-sections
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/318163 Change subject: WIP: Expose Wikidata item ID number in mobile-sections .. WIP: Expose Wikidata item ID number in mobile-sections TODO: add tests Bug: T149220 Change-Id: I099b9ff4787d5cedd6b37cb84cd27aadd479935f --- M lib/mwapi.js M routes/mobile-sections.js 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/63/318163/1 diff --git a/lib/mwapi.js b/lib/mwapi.js index 842f41a..ee5c87b 100644 --- a/lib/mwapi.js +++ b/lib/mwapi.js @@ -127,7 +127,8 @@ format: 'json', formatversion: 2, page: req.params.title, -prop: 'languagecount|thumb|image|id|revision|description|lastmodified|lastmodifiedby|normalizedtitle|displaytitle|protection|editable|namespace', +prop: 'languagecount|thumb|image|id|revision|description|lastmodified|lastmodifiedby|normalizedtitle|displaytitle|protection|editable|namespace|pageprops', +ppprop: 'wikibase_item', thumbsize: mwapi.LEAD_IMAGE_XL }; return api.mwApiGet(app, req.params.domain, query) diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js index ba3a7ac..7b9472c 100644 --- a/routes/mobile-sections.js +++ b/routes/mobile-sections.js @@ -110,6 +110,7 @@ displaytitle: input.meta.displaytitle, normalizedtitle: input.meta.normalizedtitle, redirected: input.meta.redirected, +qid: input.meta.pageprops && input.meta.pageprops.wikibase_item, description: input.meta.description, protection: input.meta.protection, editable: input.meta.editable, -- To view, visit https://gerrit.wikimedia.org/r/318163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I099b9ff4787d5cedd6b37cb84cd27aadd479935f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fill missing order_id while normalizing
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/318150 Change subject: Fill missing order_id while normalizing .. Fill missing order_id while normalizing Since we've moved off of stomp, we're transitioning from using correlation-id to order_id to identify messages in logs and the like. If order_id is missing, fill it with either contribution_tracking_id or gateway_txn_id. Bug: T149123 Change-Id: I1f3c6d97287ff96ccfecf604789eb98d88fdb207 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/50/318150/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index def9a32..bbd83b0 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -1625,6 +1625,28 @@ } } + // 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.', + WATCHDOG_INFO + ); + $keys = array( 'gateway_txn_id', 'contribution_tracking_id' ); + foreach ( $keys as $key ) { + if ( isset( $msg[$key] ) ) { + watchdog( + 'wmf_civicrm', + "Filling order_id with {$msg[$key]} from key $key.", + 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/318150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f3c6d97287ff96ccfecf604789eb98d88fdb207 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.28.0-wmf.22]: Use correct user for isUsableBy check in Special:OAuth/identify
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/318236 Change subject: Use correct user for isUsableBy check in Special:OAuth/identify .. Use correct user for isUsableBy check in Special:OAuth/identify The special page's $this->getUser() comes from the normal CookieSessionProvider cookies (or other non-OAuth mechanism), not the OAuth headers that are being validated here for use by the /identify endpoint. We need to use the user associated with the MWOAuthConsumerAcceptance instead for proper operation. Bug: T149194 Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 (cherry picked from commit d9eeb5be255c3d301c396f6b701b0c9fab569593) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/36/318236/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0eb7f81..9723641 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -157,21 +157,21 @@ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); $access = MWOAuthConsumerAcceptance::newFromToken( $dbr, $token->key ); + $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); + if ( !$localUser || !$localUser->isLoggedIn() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); + } // Access token is for this wiki if ( $access->get( 'wiki' ) !== '*' && $access->get( 'wiki' ) !== $wiki ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); - } elseif ( !$consumer->isUsableBy( $user ) ) { + } elseif ( !$consumer->isUsableBy( $localUser ) ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', $consumer->get( 'name' ) ); - } - $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); - if ( !$localUser || !$localUser->isLoggedIn() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); - } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.28.0-wmf.22 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Don't position inspector using selection from wrong document
jenkins-bot has submitted this change and it was merged. Change subject: Don't position inspector using selection from wrong document .. Don't position inspector using selection from wrong document Bug: T147231 Change-Id: I07ae3791dc460e9ba7692ba943eb640418a6300e --- M src/ui/contexts/ve.ui.DesktopContext.js 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/contexts/ve.ui.DesktopContext.js b/src/ui/contexts/ve.ui.DesktopContext.js index 3bad69d..c41efe6 100644 --- a/src/ui/contexts/ve.ui.DesktopContext.js +++ b/src/ui/contexts/ve.ui.DesktopContext.js @@ -215,6 +215,11 @@ // Selection when the inspector was opened. Used to stop the context from // jumping when an inline selection expands, e.g. to cover a long word startingSelection = !focusedNode && this.inspector && this.inspector.previousSelection; + // Don't use start selection if it comes from another document, e.g. the fake document used in + // source mode. + if ( startingSelection && startingSelection.getDocument() !== surface.getModel().getDocument ) { + startingSelection = null; + } currentSelection = this.surface.getModel().getSelection(); isTableSelection = ( startingSelection || currentSelection ) instanceof ve.dm.TableSelection; -- To view, visit https://gerrit.wikimedia.org/r/318234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07ae3791dc460e9ba7692ba943eb640418a6300e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.28.0-wmf.22]: SECURITY: check stage and user blocked/locked status in /ide...
jenkins-bot has submitted this change and it was merged. Change subject: SECURITY: check stage and user blocked/locked status in /identify .. SECURITY: check stage and user blocked/locked status in /identify Bug: T148600 Change-Id: I81327a86890d99dfaef1b1a217a68b4404608394 (cherry picked from commit 3f5875b23f5ff7eb43a740075e383ec816adbeed) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0397987..0eb7f81 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -42,7 +42,7 @@ } public function execute( $subpage ) { - global $wgMWOAuthSecureTokenTransfer, $wgMWOAuthReadOnly; + global $wgMWOAuthSecureTokenTransfer, $wgMWOAuthReadOnly, $wgBlockDisablesLogin; $this->setHeaders(); @@ -151,6 +151,8 @@ $oauthRequest = MWOAuthRequest::fromRequest( $request ); // verify_request throws an exception if anything isn't verified list( $consumer, $token ) = $server->verify_request( $oauthRequest ); + /** @var MWOAuthConsumer $consumer */ + /** @var MWOAuthToken $token */ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); @@ -161,10 +163,15 @@ 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); + } elseif ( !$consumer->isUsableBy( $user ) ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', + $consumer->get( 'name' ) ); } $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); if ( !$localUser || !$localUser->isLoggedIn() ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81327a86890d99dfaef1b1a217a68b4404608394 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.28.0-wmf.22 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviCRM submodule update
jenkins-bot has submitted this change and it was merged. Change subject: CiviCRM submodule update .. CiviCRM submodule update 6f26dbe CRM-19547 rationalise expensive use of exactMatch search on quicksearch Change-Id: I98715c18f42932c8307d1c05d2b8119b33e65952 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/civicrm b/civicrm index c291b67..6f26dbe 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit c291b67ed20677edc1be3f9a0a70c0b127600c82 +Subproject commit 6f26dbe54c6f727e5de22f29a179ec6e1b0ee0de -- To view, visit https://gerrit.wikimedia.org/r/318232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98715c18f42932c8307d1c05d2b8119b33e65952 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: WIP: Data model classes
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/318235 Change subject: WIP: Data model classes .. WIP: Data model classes New data models out of the existing code. These classes are based on OOJS and part of VE migration code refactoring. Change-Id: I4b4058fed953061e81dabaf5f08ab3e933ca01b9 --- M .jshintrc M extension.json M modules/base/ext.cx.sitemapper.js A modules/dm/mw.cx.dm.SourcePage.js A modules/dm/mw.cx.dm.Translation.js A modules/dm/mw.cx.dm.js M modules/ui/mw.cx.ui.Columns.js M modules/ui/mw.cx.ui.TranslationView.js 8 files changed, 322 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/35/318235/1 diff --git a/.jshintrc b/.jshintrc index dc06253..f526647 100644 --- a/.jshintrc +++ b/.jshintrc @@ -17,6 +17,7 @@ "jQuery", "QUnit", "moment", + "mw", "OO" ] } diff --git a/extension.json b/extension.json index 9bfb026..2327e9d 100644 --- a/extension.json +++ b/extension.json @@ -1129,6 +1129,31 @@ "mediawiki.api" ] }, + "mw.cx.dm": { + "scripts": [ + "dm/mw.cx.dm.js" + ], + "dependencies": [ + "ext.cx.model" + ] + }, + "mw.cx.dm.Translation": { + "scripts": [ + "dm/mw.cx.dm.Translation.js" + ], + "dependencies": [ + "mw.cx.dm", + "mw.cx.dm.SourcePage" + ] + }, + "mw.cx.dm.SourcePage": { + "scripts": [ + "dm/mw.cx.dm.SourcePage.js" + ], + "dependencies": [ + "mw.cx.dm" + ] + }, "mw.cx.ui.TranslationView": { "scripts": [ "ui/mw.cx.ui.TranslationView.js" @@ -1136,10 +1161,11 @@ "styles": [ "ui/styles/mw.cx.ui.TranslationView.less" ], - "messages":[ + "messages": [ "cx-publish-button" ], "dependencies": [ + "mw.cx.dm.Translation", "mw.cx.ui.Header", "mw.cx.ui.Columns", "ext.cx.model", @@ -1218,7 +1244,7 @@ "ui/mw.cx.ui.Columns.js", "ui/mw.cx.ui.SourceColumn.js", "ui/mw.cx.ui.TranslationColumn.js", - "ui/mw.cx.ui.ToolsColumn.js" ], + "ui/mw.cx.ui.ToolsColumn.js" ], "styles": [ "ui/styles/mw.cx.ui.Columns.less" ], diff --git a/modules/base/ext.cx.sitemapper.js b/modules/base/ext.cx.sitemapper.js index 7991799..8f06cc0 100644 --- a/modules/base/ext.cx.sitemapper.js +++ b/modules/base/ext.cx.sitemapper.js @@ -79,7 +79,7 @@ extra = ( base.indexOf( '?' ) !== -1 ? '&' : '?' ) + $.param( params ); } - return base.replace( '$1', domain ).replace( '$2', title ) + extra; + return base.replace( '$1', domain ).replace( '$2', title || '' ) + extra; }; /** diff --git a/modules/dm/mw.cx.dm.SourcePage.js b/modules/dm/mw.cx.dm.SourcePage.js new file mode 100644 index 000..c83c1d1 --- /dev/null +++ b/modules/dm/mw.cx.dm.SourcePage.js @@ -0,0 +1,142 @@ +( function ( $, mw ) { + 'use strict'; + /** +* CX Source page +* +* @abstract +* @mixins OO.EventEmitter +* +* @constructor +*/ + mw.cx.dm.SourcePage = function SourcePage( config ) { + // Mixin constructor + OO.EventEmitter.call( this ); + this.config = config; + this.language = config.sourceLanguage; + this.direction = null; + this.title = config.sourceTitle; + this.revisionId = config.revision; + this.section = []; + this.categories = []; + }; + + /* Inheritance */ + + OO.mixinClass( mw.cx.dm.SourcePage, OO.EventEmitter ); + + mw.cx.dm.SourcePage.prototype.init = function () { + var self = this; + +
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Don't position inspector using selection from wrong document
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/318234 Change subject: Don't position inspector using selection from wrong document .. Don't position inspector using selection from wrong document Bug: T147231 Change-Id: I07ae3791dc460e9ba7692ba943eb640418a6300e --- M src/ui/contexts/ve.ui.DesktopContext.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/34/318234/1 diff --git a/src/ui/contexts/ve.ui.DesktopContext.js b/src/ui/contexts/ve.ui.DesktopContext.js index 3bad69d..c41efe6 100644 --- a/src/ui/contexts/ve.ui.DesktopContext.js +++ b/src/ui/contexts/ve.ui.DesktopContext.js @@ -215,6 +215,11 @@ // Selection when the inspector was opened. Used to stop the context from // jumping when an inline selection expands, e.g. to cover a long word startingSelection = !focusedNode && this.inspector && this.inspector.previousSelection; + // Don't use start selection if it comes from another document, e.g. the fake document used in + // source mode. + if ( startingSelection && startingSelection.getDocument() !== surface.getModel().getDocument ) { + startingSelection = null; + } currentSelection = this.surface.getModel().getSelection(); isTableSelection = ( startingSelection || currentSelection ) instanceof ve.dm.TableSelection; -- To view, visit https://gerrit.wikimedia.org/r/318234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07ae3791dc460e9ba7692ba943eb640418a6300e Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Add titleblacklistlog to viewrestrictedlogs grant
jenkins-bot has submitted this change and it was merged. Change subject: Add titleblacklistlog to viewrestrictedlogs grant .. Add titleblacklistlog to viewrestrictedlogs grant Bug: T149235 Depends-On: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39 Change-Id: I0cff164c91128a9cc4b8700527ed1f4090a368a5 --- M extension.json 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index f5a64c9..c770dba 100644 --- a/extension.json +++ b/extension.json @@ -32,6 +32,11 @@ "LogActionsHandlers": { "titleblacklist/*": "LogFormatter" }, + "GrantPermissions": { + "viewrestrictedlogs": { + "titleblacklistlog": true + } + }, "APIModules": { "titleblacklist": "ApiQueryTitleBlacklist" }, -- To view, visit https://gerrit.wikimedia.org/r/318153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cff164c91128a9cc4b8700527ed1f4090a368a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TitleBlacklist Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: update ViewTest packaging
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/318233 Change subject: Hygiene: update ViewTest packaging .. Hygiene: update ViewTest packaging Move ViewTest into org.wikipedia.test.view. This wasn't done in the previous commit to minimize deltas. Change-Id: I4f3603d5048555e17686b4cc2aef4e5b7068aa6b --- M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java M app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java M app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java M app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java R app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 6 files changed, 6 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/33/318233/1 diff --git a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java index 4bcda7f..6662ca8 100644 --- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java +++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java @@ -11,7 +11,6 @@ import org.junit.experimental.theories.suppliers.TestedOn; import org.wikipedia.R; import org.wikipedia.feed.model.Card; -import org.wikipedia.test.ViewTest; import org.wikipedia.test.view.FontScale; import org.wikipedia.test.view.LayoutDirection; import org.wikipedia.test.view.PrimaryTestImg; @@ -20,6 +19,7 @@ import org.wikipedia.test.view.SecondaryTestStr; import org.wikipedia.test.view.TestImg; import org.wikipedia.test.view.TestStr; +import org.wikipedia.test.view.ViewTest; import org.wikipedia.theme.Theme; import static butterknife.ButterKnife.findById; diff --git a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java index 5ca2ac7..0bd1b6e 100644 --- a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java +++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java @@ -7,7 +7,6 @@ import org.junit.experimental.theories.Theory; import org.junit.experimental.theories.suppliers.TestedOn; import org.wikipedia.R; -import org.wikipedia.test.ViewTest; import org.wikipedia.test.view.FontScale; import org.wikipedia.test.view.LayoutDirection; import org.wikipedia.test.view.NullValue; @@ -16,6 +15,7 @@ import org.wikipedia.test.view.SecondaryTestImg; import org.wikipedia.test.view.TestImg; import org.wikipedia.test.view.TestStr; +import org.wikipedia.test.view.ViewTest; import org.wikipedia.theme.Theme; import static android.view.View.OnClickListener; diff --git a/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java index fea6449..f9c9bea 100644 --- a/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java +++ b/app/src/androidTest/java/org/wikipedia/feed/view/DefaultFeedCardViewTest.java @@ -8,10 +8,10 @@ import org.junit.experimental.theories.Theory; import org.wikipedia.feed.model.Card; import org.wikipedia.feed.view.FeedAdapter.Callback; -import org.wikipedia.test.ViewTest; import org.wikipedia.test.view.FontScale; import org.wikipedia.test.view.LayoutDirection; import org.wikipedia.test.view.NullValue; +import org.wikipedia.test.view.ViewTest; import org.wikipedia.theme.Theme; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java index 4447e97..005cb9c 100644 --- a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java +++ b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardViewTest.java @@ -11,10 +11,10 @@ import org.junit.Test; import org.junit.experimental.theories.Theory; import org.wikipedia.feed.model.Card; -import org.wikipedia.test.ViewTest; import org.wikipedia.test.view.FontScale; import org.wikipedia.test.view.LayoutDirection; import org.wikipedia.test.view.NullValue; +import org.wikipedia.test.view.ViewTest; import org.wikipedia.theme.Theme; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java index f3a287a..2f676ca 100644 --- a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java +++ b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java @@ -6,9 +6,9 @@ import org.junit.Test; import org.junit.experimental.theories.Theory; import
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviCRM submodule update
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/318232 Change subject: CiviCRM submodule update .. CiviCRM submodule update 6f26dbe CRM-19547 rationalise expensive use of exactMatch search on quicksearch Change-Id: I98715c18f42932c8307d1c05d2b8119b33e65952 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/32/318232/1 diff --git a/civicrm b/civicrm index c291b67..6f26dbe 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit c291b67ed20677edc1be3f9a0a70c0b127600c82 +Subproject commit 6f26dbe54c6f727e5de22f29a179ec6e1b0ee0de -- To view, visit https://gerrit.wikimedia.org/r/318232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98715c18f42932c8307d1c05d2b8119b33e65952 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: collapse PageTitleListCardItemView
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/318230 Change subject: Hygiene: collapse PageTitleListCardItemView .. Hygiene: collapse PageTitleListCardItemView Merge ListCardItemView into PageTitleListCardItemView and remove dead code. Change-Id: I2abab7182bee35026fe3e95acbf596a5e2c6f57b --- D app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java D app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java M app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java 3 files changed, 26 insertions(+), 106 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/30/318230/1 diff --git a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java b/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java deleted file mode 100644 index 1c42f86..000 --- a/app/src/androidTest/java/org/wikipedia/feed/view/ListCardItemViewTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.wikipedia.feed.view; - -import android.net.Uri; - -import org.junit.Before; -import org.junit.experimental.theories.Theory; -import org.junit.experimental.theories.suppliers.TestedOn; -import org.wikipedia.test.ViewTest; -import org.wikipedia.theme.Theme; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; -import static org.mockito.Mockito.mock; -import static org.wikipedia.test.ViewTest.LayoutDirection.LOCALE; -import static org.wikipedia.util.StringUtil.emptyIfNull; - -public class ListCardItemViewTest extends ViewTest { -private ListCardItemView subject; - -@Before public void setUp() { -setUp(WIDTH_DP_S, LOCALE, FONT_SCALES[0], Theme.LIGHT); -subject = new ListCardItemView(ctx()); -} - -@Theory public void testSetImage(@TestedOn(ints = {0, 1}) int nonnull) { -Uri uri = nonnull == 0 ? null : mock(Uri.class); -assertThat(subject.imageView.getController(), nullValue()); -subject.setImage(uri); -assertThat(subject.imageView.getController(), notNullValue()); -} - -@Theory public void testSetTitle(@TestedOn(ints = {0, 1}) int nonnull) { -CharSequence title = nonnull == 0 ? null : "subtitle"; -subject.setTitle(title); -assertThat(subject.titleView.getText(), is(emptyIfNull(title))); -} - -@Theory public void testSetSubtitle(@TestedOn(ints = {0, 1}) int nonnull) { -CharSequence subtitle = nonnull == 0 ? null : "subtitle"; -subject.setSubtitle(subtitle); -assertThat(subject.subtitleView.getText(), is(emptyIfNull(subtitle))); -} -} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java b/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java deleted file mode 100644 index 739d6ac..000 --- a/app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.wikipedia.feed.view; - -import android.content.Context; -import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.view.View; -import android.view.ViewGroup; -import android.widget.FrameLayout; -import android.widget.TextView; - -import com.facebook.drawee.view.SimpleDraweeView; - -import org.wikipedia.R; -import org.wikipedia.views.GoneIfEmptyTextView; - -import butterknife.BindView; -import butterknife.ButterKnife; - -public class ListCardItemView extends FrameLayout { -@BindView(R.id.view_list_card_item_image) SimpleDraweeView imageView; -@BindView(R.id.view_list_card_item_title) TextView titleView; -@BindView(R.id.view_list_card_item_subtitle) GoneIfEmptyTextView subtitleView; -@BindView(R.id.view_list_card_item_menu) View menuView; - -public ListCardItemView(Context context) { -super(context); - -setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, -ViewGroup.LayoutParams.WRAP_CONTENT)); -setClickable(true); - -inflate(getContext(), R.layout.view_list_card_item, this); -ButterKnife.bind(this); -} - -@NonNull public ListCardItemView setImage(@Nullable Uri uri) { -imageView.setImageURI(uri); -return this; -} - -@NonNull public ListCardItemView setTitle(@Nullable CharSequence title) { -titleView.setText(title); -return this; -} - -@NonNull public ListCardItemView setSubtitle(@Nullable CharSequence subtitle) { -subtitleView.setText((String) subtitle); -return this; -} -} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Remove placeholder emails (n...@na.com).
jenkins-bot has submitted this change and it was merged. Change subject: Remove placeholder emails (n...@na.com). .. Remove placeholder emails (n...@na.com). Bug: T149248 Change-Id: I8367476598005ff9c2545bc642432afa2e20f6b0 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bfe0a36..d3f4e21 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2304,6 +2304,20 @@ } /** + * Remove invalid address n...@na.com. + * + * I put this before update 7305 in case it leaves any contacts without a primary. + * + * Only a small number of emails involved. + * + * Bug: T149248 + */ +function wmf_civicrm_update_7303() { + civicrm_initialize(); + CRM_Core_DAO::executeQuery('DELETE FROM civicrm_email WHERE email = "n...@na.com"'); +} + +/** * Rerun fix for no primary address. * * I fixed a second cause for this (a rarer one) - make sure -- To view, visit https://gerrit.wikimedia.org/r/318225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8367476598005ff9c2545bc642432afa2e20f6b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[wmf/1.28.0-wmf.23]: Invoke database connection in ApiQueryGlobalBlocks::execute
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/318160 Change subject: Invoke database connection in ApiQueryGlobalBlocks::execute .. Invoke database connection in ApiQueryGlobalBlocks::execute This fixes the following error: Exception Caught: Call to a member function buildLike() on a non-object (null)" This is a follow-up of commit 53dee904. Bug: T149232 Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe --- M includes/api/ApiQueryGlobalBlocks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking refs/changes/60/318160/1 diff --git a/includes/api/ApiQueryGlobalBlocks.php b/includes/api/ApiQueryGlobalBlocks.php index ede610e..a7231ba 100644 --- a/includes/api/ApiQueryGlobalBlocks.php +++ b/includes/api/ApiQueryGlobalBlocks.php @@ -94,6 +94,7 @@ $lower = $upper = IP::toHex( $params['ip'] ); } $prefix = substr( $lower, 0, 4 ); + $dbr = GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE ); $this->addWhere( [ 'gb_range_start ' . $dbr->buildLike( $prefix, $dbr->anyString() ), 'gb_range_start <= ' . $dbr->addQuotes( $lower ), -- To view, visit https://gerrit.wikimedia.org/r/318160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalBlocking Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: 20after4Gerrit-Reviewer: Dereckson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Adjust preferred_language dedupe conflict resolution to pref...
jenkins-bot has submitted this change and it was merged. Change subject: Adjust preferred_language dedupe conflict resolution to prefer later donor. .. Adjust preferred_language dedupe conflict resolution to prefer later donor. Bug: T149242 Change-Id: I5d8555060b3765bbce7f45731222585792a25d8f --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 96 insertions(+), 3 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 8d1a730..5263d4f 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -387,6 +387,63 @@ } /** + * Test that a conflict on communication preferences is handled. + * + * @dataProvider getDifferentLanguageCombos + * + * @param string $language1 + * @param string $language2 + */ + public function testBatchMergeConflictDifferentPreferredLanguage($language1, $language2) { +// Can't use api if we are trying to use invalid data. +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2010-01-01', 'invoice_id' => 1, 'trxn_id' => 1)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2012-01-01', 'invoice_id' => 2, 'trxn_id' => 2)); + +wmf_civicrm_ensure_language_exists('en_US'); +wmf_civicrm_ensure_language_exists('fr_FR'); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language1' WHERE id = $this->contactID"); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language2' WHERE id = $this->contactID2"); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccess('Contact', 'get', array( + 'id' => $this->contactID, + 'sequential' => 1 +)); +$this->assertEquals($language2, $contact['values'][0]['preferred_language']); + } + + /** + * Test that a conflict on communication preferences is handled. + * + * This is the same as the other test except the contact with the lower id is + * the later donor. + * + * @dataProvider getDifferentLanguageCombos + * + * @param string $language1 + * @param string $language2 + */ + public function testBatchMergeConflictDifferentPreferredLanguageReverse($language1, $language2) { +// Can't use api if we are trying to use invalid data. +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2012-01-01', 'invoice_id' => 1, 'trxn_id' => 1)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2010-01-01', 'invoice_id' => 2, 'trxn_id' => 2)); + +wmf_civicrm_ensure_language_exists('en_US'); +wmf_civicrm_ensure_language_exists('fr_FR'); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language1' WHERE id = $this->contactID"); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language2' WHERE id = $this->contactID2"); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccess('Contact', 'get', array( + 'id' => $this->contactID, + 'sequential' => 1 +)); +$this->assertEquals($language1, $contact['values'][0]['preferred_language']); + } + + /** * Get combinations of languages for comparison. * * @return array @@ -410,6 +467,21 @@ ); return $dataSet; } + + /** + * Get combinations of languages for comparison. + * + * @return array + */ + public function getDifferentLanguageCombos() { +$dataSet = array( + // Choose longer. + array('fr_FR', 'en_US'), + array('en_US', 'fr_FR'), +); +return $dataSet; + } + /** * Test that source conflicts are ignored. * diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index a63f453..30ea8d1 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2152,7 +2152,10 @@ str_replace('move_', '', $moveField), $refs['migration_info'][$moveField], $refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'])) { +$refs['migration_info']['rows'][$moveField]['main'], +$mainId, +$otherId + )) {
[MediaWiki-commits] [Gerrit] labs...stewardbots[master]: Add an "authenticate" command for identifying with nickserv ...
Platonides has uploaded a new change for review. https://gerrit.wikimedia.org/r/318229 Change subject: Add an "authenticate" command for identifying with nickserv after connection .. Add an "authenticate" command for identifying with nickserv after connection Relates to T149265: StewardBot not logged into irc Change-Id: I90174f75b92d698bb95a08be0bbc07f97d5ab383 --- M StewardBot/StewardBot.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/stewardbots refs/changes/29/318229/1 diff --git a/StewardBot/StewardBot.py b/StewardBot/StewardBot.py index 4612e79..65e313a 100644 --- a/StewardBot/StewardBot.py +++ b/StewardBot/StewardBot.py @@ -229,6 +229,11 @@ who=cmd[6:].strip(" ") self.connection.action(self.channel, "huggles " + who) +#Authenticate +elif cmd.lower().startswith("authenticate"): +'''Reauthenticate with NickServ (services may have been down)''' +c.privmsg("NickServ",'IDENTIFY '+self.password) + #Die elif cmd.lower() == "die": if self.getcloak(e.source()) != self.owner: -- To view, visit https://gerrit.wikimedia.org/r/318229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90174f75b92d698bb95a08be0bbc07f97d5ab383 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/stewardbots Gerrit-Branch: master Gerrit-Owner: Platonides___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[wmf/1.28.0-wmf.22]: SECURITY: check stage and user blocked/locked status in /ide...
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/318228 Change subject: SECURITY: check stage and user blocked/locked status in /identify .. SECURITY: check stage and user blocked/locked status in /identify Bug: T148600 Change-Id: I81327a86890d99dfaef1b1a217a68b4404608394 (cherry picked from commit 3f5875b23f5ff7eb43a740075e383ec816adbeed) --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/28/318228/1 diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index 0397987..0eb7f81 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -42,7 +42,7 @@ } public function execute( $subpage ) { - global $wgMWOAuthSecureTokenTransfer, $wgMWOAuthReadOnly; + global $wgMWOAuthSecureTokenTransfer, $wgMWOAuthReadOnly, $wgBlockDisablesLogin; $this->setHeaders(); @@ -151,6 +151,8 @@ $oauthRequest = MWOAuthRequest::fromRequest( $request ); // verify_request throws an exception if anything isn't verified list( $consumer, $token ) = $server->verify_request( $oauthRequest ); + /** @var MWOAuthConsumer $consumer */ + /** @var MWOAuthToken $token */ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); @@ -161,10 +163,15 @@ 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); + } elseif ( !$consumer->isUsableBy( $user ) ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', + $consumer->get( 'name' ) ); } $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); if ( !$localUser || !$localUser->isLoggedIn() ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81327a86890d99dfaef1b1a217a68b4404608394 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: wmf/1.28.0-wmf.22 Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Address a second way in which contacts are winding up withou...
jenkins-bot has submitted this change and it was merged. Change subject: Address a second way in which contacts are winding up without primaries. .. Address a second way in which contacts are winding up without primaries. It turns out than sometimes core is making the choice to demote an address from primary and sometimes our choice was to bring across a non-primary, resulting in no primary. Undo core choice. Testing scenarios are quite thorough here, giving some confidence. Bug: T145873 Change-Id: If011c3426f40b7dfc445aee9227ed80a0aeb4675 --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.install M sites/all/modules/wmf_civicrm/wmf_civicrm.module 3 files changed, 91 insertions(+), 2 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 5f509b6..8d1a730 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -311,7 +311,8 @@ } } unset($addresses['values'][$index]); - continue; + // break to find a match for the next $expected address. + continue 2; } } } @@ -1019,7 +1020,78 @@ )), ), ), - + 'duplicate_mixed_address_on_one_contact' => array( +'duplicate_mixed_address_on_one_contact' => array( + 'merged' => 1, + 'skipped' => 0, + 'comment' => 'We want to be sure we still have a primary. Ideally we would squash + matching addresses here too but currently that only happens on the to-merge contact. + (no high priority improvement)', + 'is_major_gifts' => 0, + 'entity' => $entity, + 'contact_1' => array( +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), + ), + 'contact_2' => array( +array_merge(array( + 'location_type_id' => 'Main', + 'is_primary' => 1, +), $locationParams1), +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), + ), + 'expected_hook' => array_merge($additionalExpected, array( +array_merge(array( + 'location_type_id' => 'Main', + 'is_primary' => 1, +), $locationParams1), +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), + )), +), + ), + 'duplicate_mixed_address_on_one_contact_second_primary' => array( +'duplicate_mixedaddress_on_one_contact_second_primary' => array( + 'comment' => 'check we do not lose the primary. Matching addresses are squashed.', + 'merged' => 1, + 'skipped' => 0, + 'is_major_gifts' => 0, + 'entity' => $entity, + 'contact_1' => array( +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), + ), + 'contact_2' => array( +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), +array_merge(array( + 'location_type_id' => 'Main', + 'is_primary' => 1, +), $locationParams1), + ), + 'expected_hook' => array_merge($additionalExpected, array( +array_merge(array( + 'location_type_id' => 'Home', + 'is_primary' => 0, +), $locationParams1), +array_merge(array( + 'location_type_id' => 'Main', + 'is_primary' => 1, +), $locationParams1), + )), +), + ), ); return $data; } diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index ead87ac..bfe0a36 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2302,3 +2302,15 @@ require_once 'update_custom_fields.php'; _wmf_civicrm_update_custom_fields(); } + +/** + * Rerun fix for no primary address. + * + * I fixed a second cause for this (a rarer one) - make sure + * all contacts have a primary address. + * + * Bug: T145873 + */ +function wmf_civicrm_update_7305() { + wmf_civicrm_update_7250(); +} diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index def9a32..a63f453 100644 ---
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up I64a8ed73: Fix NWE getWikitextFragment
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up I64a8ed73: Fix NWE getWikitextFragment .. Follow-up I64a8ed73: Fix NWE getWikitextFragment Also fix the rejection Deferred line if things go wrong Change-Id: I8f060de1972dd0ae79c81162c61efd5956e48955 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js index 0f0f1b6..3345f1f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js @@ -267,7 +267,8 @@ ve.init.mw.DesktopWikitextArticleTarget.prototype.getWikitextFragment = function ( doc, useRevision ) { var promise, xhr, params = { - action: 'visualeditor', + action: 'visualeditoredit', + token: this.editToken, paction: 'serialize', html: ve.dm.converter.getDomFromModel( doc ).body.innerHTML, page: this.pageName @@ -284,10 +285,10 @@ ); promise = xhr.then( function ( response ) { - if ( response.visualeditor ) { - return response.visualeditor.content; + if ( response.visualeditoredit ) { + return response.visualeditoredit.content; } - return $.Deferred.reject(); + return $.Deferred().reject(); } ); promise.abort = function () { -- To view, visit https://gerrit.wikimedia.org/r/318202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f060de1972dd0ae79c81162c61efd5956e48955 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add missing configuration files in noc.
jenkins-bot has submitted this change and it was merged. Change subject: Add missing configuration files in noc. .. Add missing configuration files in noc. Change-Id: Ic105734cd0829bcc6cfbb63ccd3b90cddf40bad9 --- A docroot/noc/conf/logging-labs.php.txt A docroot/noc/conf/proofreadpage.php.txt A docroot/noc/conf/session-labs.php.txt A docroot/noc/conf/session.php.txt 4 files changed, 4 insertions(+), 0 deletions(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/noc/conf/logging-labs.php.txt b/docroot/noc/conf/logging-labs.php.txt new file mode 12 index 000..95c1aa0 --- /dev/null +++ b/docroot/noc/conf/logging-labs.php.txt @@ -0,0 +1 @@ +../../../wmf-config/logging-labs.php \ No newline at end of file diff --git a/docroot/noc/conf/proofreadpage.php.txt b/docroot/noc/conf/proofreadpage.php.txt new file mode 12 index 000..26cde3a --- /dev/null +++ b/docroot/noc/conf/proofreadpage.php.txt @@ -0,0 +1 @@ +../../../wmf-config/proofreadpage.php \ No newline at end of file diff --git a/docroot/noc/conf/session-labs.php.txt b/docroot/noc/conf/session-labs.php.txt new file mode 12 index 000..b6463ff --- /dev/null +++ b/docroot/noc/conf/session-labs.php.txt @@ -0,0 +1 @@ +../../../wmf-config/session-labs.php \ No newline at end of file diff --git a/docroot/noc/conf/session.php.txt b/docroot/noc/conf/session.php.txt new file mode 12 index 000..86761a8 --- /dev/null +++ b/docroot/noc/conf/session.php.txt @@ -0,0 +1 @@ +../../../wmf-config/session.php \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/318027 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic105734cd0829bcc6cfbb63ccd3b90cddf40bad9 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: DerecksonGerrit-Reviewer: Dereckson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update noc.wikimedia.org dblist files
jenkins-bot has submitted this change and it was merged. Change subject: Update noc.wikimedia.org dblist files .. Update noc.wikimedia.org dblist files Change-Id: I7f5ad14748edfa58836357472e933ea43ff3ae35 --- A docroot/noc/conf/nowikidatadescriptiontaglines.dblist A docroot/noc/conf/top6-wikipedia.dblist D docroot/noc/conf/wikidatadescriptions.dblist 3 files changed, 2 insertions(+), 1 deletion(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/docroot/noc/conf/nowikidatadescriptiontaglines.dblist b/docroot/noc/conf/nowikidatadescriptiontaglines.dblist new file mode 12 index 000..18662a4 --- /dev/null +++ b/docroot/noc/conf/nowikidatadescriptiontaglines.dblist @@ -0,0 +1 @@ +../../../dblists/nowikidatadescriptiontaglines.dblist \ No newline at end of file diff --git a/docroot/noc/conf/top6-wikipedia.dblist b/docroot/noc/conf/top6-wikipedia.dblist new file mode 12 index 000..ba9cfad --- /dev/null +++ b/docroot/noc/conf/top6-wikipedia.dblist @@ -0,0 +1 @@ +../../../dblists/top6-wikipedia.dblist \ No newline at end of file diff --git a/docroot/noc/conf/wikidatadescriptions.dblist b/docroot/noc/conf/wikidatadescriptions.dblist deleted file mode 12 index 5d1b806..000 --- a/docroot/noc/conf/wikidatadescriptions.dblist +++ /dev/null @@ -1 +0,0 @@ -../../../dblists/wikidatadescriptions.dblist \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/309743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f5ad14748edfa58836357472e933ea43ff3ae35 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: DerecksonGerrit-Reviewer: Dereckson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-19547 rationalise expensive use of exactMatch search on ...
jenkins-bot has submitted this change and it was merged. Change subject: CRM-19547 rationalise expensive use of exactMatch search on quicksearch .. CRM-19547 rationalise expensive use of exactMatch search on quicksearch - do not do exact match when the string is just a wildcard (it will never be an exact match) - do not do exact match when the search is an email & there is no @ (it will never be an exact match) - do not do exact match when the search is for sort_name and prepending wildcards is disabled for the site (it is functionally equivalent Upstream PR https://github.com/civicrm/civicrm-core/pull/9301 Upstream PR includes unit tests Bug:T147344 Change-Id: Ie2593cd37f98be5a43d3a606121d679b03aa2952 --- M api/v3/Contact.php 1 file changed, 60 insertions(+), 14 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/api/v3/Contact.php b/api/v3/Contact.php index fdab683..49a862c 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -805,6 +805,7 @@ if ($aclWhere) { $where .= " AND $aclWhere "; } + $isPrependWildcard = \Civi::settings()->get('includeWildCardInName'); if (!empty($params['org'])) { $where .= " AND contact_type = \"Organization\""; @@ -817,7 +818,7 @@ (int) $params['employee_id'], 'employer_id' )) { -if ($config->includeWildCardInName) { +if ($isPrependWildcard) { $strSearch = "%$name%"; } else { @@ -864,7 +865,7 @@ $rel = CRM_Utils_Type::escape($relation[2], 'String'); } - if ($config->includeWildCardInName) { + if ($isPrependWildcard) { $strSearch = "%$name%"; } else { @@ -879,15 +880,13 @@ //CRM-10687 if (!empty($params['field_name']) && !empty($params['table_name'])) { $whereClause = " WHERE ( $table_name.$field_name LIKE '$strSearch') {$where}"; -$exactWhereClause = " WHERE ( $table_name.$field_name = '$name') {$where}"; // Search by id should be exact if ($field_name == 'id' || $field_name == 'external_identifier') { - $whereClause = $exactWhereClause; + $whereClause = " WHERE ( $table_name.$field_name = '$name') {$where}"; } } else { $whereClause = " WHERE ( sort_name LIKE '$strSearch' $includeNickName ) {$where} "; -$exactWhereClause = " WHERE ( sort_name LIKE '$name' $exactIncludeNickName ) {$where} "; if ($config->includeEmailInName) { if (!in_array('email', $list)) { $includeEmailFrom = "LEFT JOIN civicrm_email eml ON ( cc.id = eml.contact_id AND eml.is_primary = 1 )"; @@ -912,12 +911,7 @@ INNER JOIN civicrm_uf_match um ON (um.contact_id=cc.id) "; } - - $orderByInner = $orderByOuter = "ORDER BY exactFirst"; - if ($config->includeOrderByClause) { -$orderByInner = "ORDER BY exactFirst, sort_name"; -$orderByOuter .= ", sort_name"; - } + $orderBy = _civicrm_api3_quicksearch_get_order_by($name, $isPrependWildcard, $field_name); //CRM-5954 $query = " @@ -931,7 +925,7 @@ {$aclFrom} {$additionalFrom} {$whereClause} -{$orderByInner} +{$orderBy} LIMIT 0, {$limit} ) "; @@ -946,13 +940,13 @@ {$aclFrom} {$additionalFrom} {$includeEmailFrom} {$emailWhere} AND cc.is_deleted = 0 " . ($aclWhere ? " AND $aclWhere " : '') . " -{$orderByInner} +{$orderBy} LIMIT 0, {$limit} ) "; } $query .= ") t -{$orderByOuter} +{$orderBy} LIMIT0, {$limit} "; @@ -1008,6 +1002,58 @@ } /** + * Get the order by string for the quicksearch query. + * + * Get the order by string. The string might be + * - sort name if there is no search value provided and the site is configured + *to search by sort name + * - empty if there is no search value provided and the site is not configured + *to search by sort name + * - exactFirst and then sort name if a search value is provided and the site is configured + *to search by sort name + * - exactFirst if a search value is provided and the site is not configured + *to search by sort name + * + * exactFirst means 'yes if the search value exactly matches the searched field. else no'. + * It is intended to prioritise exact matches for the entered string so on a first name search + * for 'kath' contacts with a first name of exactly Kath rise to the top. + * + * On short strings it is expensive. Per CRM-19547 there is still an open question + * as to whether we should only do exactMatch on a minimum length or on certain fields. + * + * However, we have mitigated this somewhat by not doing an exact match search on + * empty strings, non-wildcard sort-name searches and email searches where there is + * no @ after the first character. + * + * For the user it is further mitigated by the fact they just don't know the + * slower queries are firing. If they type 'smit'
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: doc: Fix up last jscs/jshint remnants, comment where retained
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/318227 Change subject: doc: Fix up last jscs/jshint remnants, comment where retained .. doc: Fix up last jscs/jshint remnants, comment where retained Change-Id: I73193d60a10d14f1bbb57a34e79f16438c2d8964 --- M lib/jquery.i18n/src/jquery.i18n.language.js M package.json M src/ce/ve.ce.Surface.js M src/ce/ve.ce.TextState.js M src/ui/actions/ve.ui.LinkAction.js M src/ui/actions/ve.ui.TableAction.js M src/ui/dialogs/ve.ui.ProgressDialog.js M src/ui/ve.ui.DebugBar.js M src/ve.track.js M src/ve.utils.js M tests/ve.qunit.js M tests/ve.test.js 12 files changed, 18 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/27/318227/1 diff --git a/lib/jquery.i18n/src/jquery.i18n.language.js b/lib/jquery.i18n/src/jquery.i18n.language.js index f83c473..65ad897 100644 --- a/lib/jquery.i18n/src/jquery.i18n.language.js +++ b/lib/jquery.i18n/src/jquery.i18n.language.js @@ -178,7 +178,7 @@ pt: { one: 'i = 1 and v = 0 or i = 0 and t = 1' }, - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers + // jscs:disable requireCamelCaseOrUpperCaseIdentifiers (awaiting eslint replacement; T149261) pt_PT: { one: 'n = 1 and v = 0' }, diff --git a/package.json b/package.json index 94b8294..a2c3354 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "grunt-contrib-clean": "1.0.0", "grunt-contrib-concat": "1.0.1", "grunt-contrib-copy": "1.0.0", -"grunt-contrib-jshint": "1.0.0", "grunt-contrib-watch": "1.0.0", "grunt-css-url-embed": "1.6.1", "grunt-cssjanus": "0.3.2", diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index c5260c9..a6e9b7f 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -882,10 +882,12 @@ break; } } - // Support: Firefox - // If we have no metadata (e.g. in Firefox) assume it is droppable - } else if ( Array.prototype.indexOf.call( dataTransfer.types || [], 'Files' ) !== -1 ) { - this.allowedFile = true; + } else { + // Support: Firefox + // If we have no metadata (e.g. in Firefox) assume it is droppable + } if ( Array.prototype.indexOf.call( dataTransfer.types || [], 'Files' ) !== -1 ) { + this.allowedFile = true; + } } } // this.allowedFile is cached until the next dragleave event @@ -1868,7 +1870,7 @@ * @param {jQuery.Event} e Paste event */ ve.ce.Surface.prototype.afterPaste = function () { - // jshint unused:false + // jshint unused:false (awaiting eslint replacement; T149267) var clipboardKey, clipboardHash, $elements, pasteData, slice, internalListRange, data, pastedDocumentModel, htmlDoc, $body, $images, i, diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js index 5651d4f..dbc8d42 100644 --- a/src/ce/ve.ce.TextState.js +++ b/src/ce/ve.ce.TextState.js @@ -69,7 +69,7 @@ // If appropriate, step into first child and loop // If no next sibling, step out until there is (breaking if we leave element) // Step to next sibling and loop - // jscs:disable disallowEmptyBlocks + // jscs:disable disallowEmptyBlocks (awaiting eslint replacement; T149266) if ( node.nodeType === Node.TEXT_NODE ) { add( node.data.replace( /\u00A0/g, ' ' ) ); } else if ( diff --git a/src/ui/actions/ve.ui.LinkAction.js b/src/ui/actions/ve.ui.LinkAction.js index a9fa71f..ffe1681 100644 --- a/src/ui/actions/ve.ui.LinkAction.js +++ b/src/ui/actions/ve.ui.LinkAction.js @@ -157,7 +157,6 @@ * stripped from an autolink. */ ve.ui.LinkAction.prototype.getTrailingPunctuation = function () { - /* jshint unused: false */ return /[,;.:!?)\]\}"'”’»]+$/; }; diff --git a/src/ui/actions/ve.ui.TableAction.js b/src/ui/actions/ve.ui.TableAction.js index 19da8cd..3cff02a 100644 --- a/src/ui/actions/ve.ui.TableAction.js +++ b/src/ui/actions/ve.ui.TableAction.js @@ -853,7 +853,7 @@ ); // Remove all but start and end tags rowData.splice( 1, rowData.length - 2 ); - /* jshint loopfunc:true */ + /*
[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[wmf/1.28.0-wmf.23]: Invoke database connection in ApiQueryGlobalBlocks::execute
jenkins-bot has submitted this change and it was merged. Change subject: Invoke database connection in ApiQueryGlobalBlocks::execute .. Invoke database connection in ApiQueryGlobalBlocks::execute This fixes the following error: Exception Caught: Call to a member function buildLike() on a non-object (null)" This is a follow-up of commit 53dee904. Bug: T149232 Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe --- M includes/api/ApiQueryGlobalBlocks.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGlobalBlocks.php b/includes/api/ApiQueryGlobalBlocks.php index ede610e..a7231ba 100644 --- a/includes/api/ApiQueryGlobalBlocks.php +++ b/includes/api/ApiQueryGlobalBlocks.php @@ -94,6 +94,7 @@ $lower = $upper = IP::toHex( $params['ip'] ); } $prefix = substr( $lower, 0, 4 ); + $dbr = GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE ); $this->addWhere( [ 'gb_range_start ' . $dbr->buildLike( $prefix, $dbr->anyString() ), 'gb_range_start <= ' . $dbr->addQuotes( $lower ), -- To view, visit https://gerrit.wikimedia.org/r/318160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia29c7b7ad6dcf335a092863f703ede12dd072dbe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalBlocking Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: 20after4Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Dereckson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: dynamicproxy: Fix health check endpoint location
Madhuvishy has submitted this change and it was merged. Change subject: dynamicproxy: Fix health check endpoint location .. dynamicproxy: Fix health check endpoint location Bug: T143638 Change-Id: I0705074e38fafb3d374901101f68378bb0e4d1a8 --- M modules/dynamicproxy/templates/domainproxy.conf M modules/dynamicproxy/templates/nginx.conf M modules/dynamicproxy/templates/urlproxy.conf 3 files changed, 8 insertions(+), 5 deletions(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dynamicproxy/templates/domainproxy.conf b/modules/dynamicproxy/templates/domainproxy.conf index 327c041..a220a91 100644 --- a/modules/dynamicproxy/templates/domainproxy.conf +++ b/modules/dynamicproxy/templates/domainproxy.conf @@ -99,6 +99,10 @@ <%- end -%> } +location /.well-known/healthz { +return 200 'proxy ok!'; +} + # GZIP (ALMOST) ALL THE THINGS! gzip on; gzip_proxied any; diff --git a/modules/dynamicproxy/templates/nginx.conf b/modules/dynamicproxy/templates/nginx.conf index 02250a8..c4c8282 100644 --- a/modules/dynamicproxy/templates/nginx.conf +++ b/modules/dynamicproxy/templates/nginx.conf @@ -66,9 +66,4 @@ include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; - server { -location /.well-known/healthz { - return 200 'proxy ok!'; -} - } } diff --git a/modules/dynamicproxy/templates/urlproxy.conf b/modules/dynamicproxy/templates/urlproxy.conf index 76e5e3b..5aa24c3 100644 --- a/modules/dynamicproxy/templates/urlproxy.conf +++ b/modules/dynamicproxy/templates/urlproxy.conf @@ -95,6 +95,10 @@ # We just want to protect downstream users who might be proxy_set_header Proxy ""; +location /.well-known/healthz { +return 200 'proxy ok!'; +} + location /.error/ { alias /var/www/error/; default_type text/html; -- To view, visit https://gerrit.wikimedia.org/r/318226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0705074e38fafb3d374901101f68378bb0e4d1a8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MadhuvishyGerrit-Reviewer: Madhuvishy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: dynamicproxy: Fix health check endpoint location
Madhuvishy has uploaded a new change for review. https://gerrit.wikimedia.org/r/318226 Change subject: dynamicproxy: Fix health check endpoint location .. dynamicproxy: Fix health check endpoint location Bug: T143638 Change-Id: I0705074e38fafb3d374901101f68378bb0e4d1a8 --- M modules/dynamicproxy/templates/domainproxy.conf M modules/dynamicproxy/templates/nginx.conf M modules/dynamicproxy/templates/urlproxy.conf 3 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/318226/1 diff --git a/modules/dynamicproxy/templates/domainproxy.conf b/modules/dynamicproxy/templates/domainproxy.conf index 327c041..a220a91 100644 --- a/modules/dynamicproxy/templates/domainproxy.conf +++ b/modules/dynamicproxy/templates/domainproxy.conf @@ -99,6 +99,10 @@ <%- end -%> } +location /.well-known/healthz { +return 200 'proxy ok!'; +} + # GZIP (ALMOST) ALL THE THINGS! gzip on; gzip_proxied any; diff --git a/modules/dynamicproxy/templates/nginx.conf b/modules/dynamicproxy/templates/nginx.conf index 02250a8..c4c8282 100644 --- a/modules/dynamicproxy/templates/nginx.conf +++ b/modules/dynamicproxy/templates/nginx.conf @@ -66,9 +66,4 @@ include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; - server { -location /.well-known/healthz { - return 200 'proxy ok!'; -} - } } diff --git a/modules/dynamicproxy/templates/urlproxy.conf b/modules/dynamicproxy/templates/urlproxy.conf index 76e5e3b..5aa24c3 100644 --- a/modules/dynamicproxy/templates/urlproxy.conf +++ b/modules/dynamicproxy/templates/urlproxy.conf @@ -95,6 +95,10 @@ # We just want to protect downstream users who might be proxy_set_header Proxy ""; +location /.well-known/healthz { +return 200 'proxy ok!'; +} + location /.error/ { alias /var/www/error/; default_type text/html; -- To view, visit https://gerrit.wikimedia.org/r/318226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0705074e38fafb3d374901101f68378bb0e4d1a8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[wmf/1.28.0-wmf.23]: Unbreak Flickr uploads
jenkins-bot has submitted this change and it was merged. Change subject: Unbreak Flickr uploads .. Unbreak Flickr uploads deedChooser might not be set for Flickr uploads at all. Bug: T149259 Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d (cherry picked from commit 6b1f0d337472e8a4032017867c4658d5e72fd501) --- M resources/details/uw.DateDetailsWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/details/uw.DateDetailsWidget.js b/resources/details/uw.DateDetailsWidget.js index 893a65c..b2fca31 100644 --- a/resources/details/uw.DateDetailsWidget.js +++ b/resources/details/uw.DateDetailsWidget.js @@ -103,7 +103,7 @@ * @return {Object} */ uw.DateDetailsWidget.prototype.getLicenses = function () { - if ( this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { + if ( this.upload.deedChooser && this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { return this.upload.deedChooser.deed.licenseInput.getLicenses(); } -- To view, visit https://gerrit.wikimedia.org/r/318222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Dereckson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Remove placeholder emails (n...@na.com).
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/318225 Change subject: Remove placeholder emails (n...@na.com). .. Remove placeholder emails (n...@na.com). Bug: T149248 Change-Id: I8367476598005ff9c2545bc642432afa2e20f6b0 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/25/318225/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bfe0a36..d3f4e21 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -2304,6 +2304,20 @@ } /** + * Remove invalid address n...@na.com. + * + * I put this before update 7305 in case it leaves any contacts without a primary. + * + * Only a small number of emails involved. + * + * Bug: T149248 + */ +function wmf_civicrm_update_7303() { + civicrm_initialize(); + CRM_Core_DAO::executeQuery('DELETE FROM civicrm_email WHERE email = "n...@na.com"'); +} + +/** * Rerun fix for no primary address. * * I fixed a second cause for this (a rarer one) - make sure -- To view, visit https://gerrit.wikimedia.org/r/318225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8367476598005ff9c2545bc642432afa2e20f6b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Retrofit edit preview fetching
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/318161 Change subject: Retrofit edit preview fetching .. Retrofit edit preview fetching Change-Id: I653f2c4f68a10001209d7bac8e11226fb0c90ef1 --- D app/src/androidTest/java/org/wikipedia/editing/EditPreviewTaskTest.java A app/src/androidTest/java/org/wikipedia/editing/EditPreviewTest.java A app/src/main/java/org/wikipedia/editing/EditPreview.java A app/src/main/java/org/wikipedia/editing/EditPreviewClient.java M app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java D app/src/main/java/org/wikipedia/editing/EditPreviewTask.java 6 files changed, 155 insertions(+), 125 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/61/318161/1 diff --git a/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTaskTest.java b/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTaskTest.java deleted file mode 100644 index fdbb9ab..000 --- a/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTaskTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.wikipedia.editing; - -import android.support.annotation.NonNull; -import android.support.test.filters.SmallTest; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.wikipedia.WikipediaApp; -import org.wikipedia.dataclient.WikiSite; -import org.wikipedia.page.PageTitle; -import org.wikipedia.testlib.TestLatch; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; - -@SmallTest -@RunWith(AndroidJUnit4.class) -public class EditPreviewTaskTest { -@Test -public void testPreview() throws Throwable { -final PageTitle title = new PageTitle(null, "Test_page_for_app_testing/Section1", WikiSite.forLanguageCode("test")); -long randomTime = System.currentTimeMillis(); -final String wikiText = "== Section 2 ==\n\nEditing section INSERT RANDOM & HERE test at " + randomTime; - -String result = Subject.execute(wikiText, title); -assertThat(result, containsString(String.valueOf(randomTime))); -} - -private static class Subject extends EditPreviewTask { -public static String execute(String wikiText, PageTitle title) { -Subject subject = new Subject(wikiText, title); -subject.execute(); -return subject.await(); -} - -@NonNull private final TestLatch latch = new TestLatch(); -private String result; - -Subject(String wikiText, PageTitle title) { -super(WikipediaApp.getInstance(), wikiText, title); -} - -@Override -public void onFinish(String result) { -super.onFinish(result); -this.result = result; -latch.countDown(); -} - -public String await() { -latch.await(); -return result; -} -} -} diff --git a/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTest.java b/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTest.java new file mode 100644 index 000..8367a7b --- /dev/null +++ b/app/src/androidTest/java/org/wikipedia/editing/EditPreviewTest.java @@ -0,0 +1,36 @@ +package org.wikipedia.editing; + +import android.support.annotation.NonNull; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.wikipedia.dataclient.WikiSite; +import org.wikipedia.page.PageTitle; + +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertThat; + +@RunWith(AndroidJUnit4.class) +public class EditPreviewTest { +@Test +public void testPreview() throws Throwable { +final WikiSite wiki = new WikiSite("test.wikipedia.org"); +final PageTitle title = new PageTitle(null, "Test_page_for_app_testing/Section1", wiki); +final long randomTime = System.currentTimeMillis(); +final String wikiText = "== Section 2 ==\n\nEditing section INSERT RANDOM & HERE test at " + randomTime; + +new EditPreviewClient().previewEdit(wiki, title, wikiText, +new EditPreviewClient.EditPreviewCallback() { +@Override +public void success(@NonNull String preview) { +assertThat(preview, containsString(String.valueOf(randomTime))); +} + +@Override +public void failure(@NonNull Throwable caught) { +throw new RuntimeException(caught); +} +}); +} +} diff --git a/app/src/main/java/org/wikipedia/editing/EditPreview.java b/app/src/main/java/org/wikipedia/editing/EditPreview.java new file mode 100644 index 000..8927693 --- /dev/null +++
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Adjust preferred_language dedupe conflict resolution to pref...
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/318224 Change subject: Adjust preferred_language dedupe conflict resolution to prefer later donor. .. Adjust preferred_language dedupe conflict resolution to prefer later donor. Bug: T149242 Change-Id: I5d8555060b3765bbce7f45731222585792a25d8f --- M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php M sites/all/modules/wmf_civicrm/wmf_civicrm.module 2 files changed, 96 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/24/318224/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php index 8d1a730..5263d4f 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php @@ -387,6 +387,63 @@ } /** + * Test that a conflict on communication preferences is handled. + * + * @dataProvider getDifferentLanguageCombos + * + * @param string $language1 + * @param string $language2 + */ + public function testBatchMergeConflictDifferentPreferredLanguage($language1, $language2) { +// Can't use api if we are trying to use invalid data. +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2010-01-01', 'invoice_id' => 1, 'trxn_id' => 1)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2012-01-01', 'invoice_id' => 2, 'trxn_id' => 2)); + +wmf_civicrm_ensure_language_exists('en_US'); +wmf_civicrm_ensure_language_exists('fr_FR'); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language1' WHERE id = $this->contactID"); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language2' WHERE id = $this->contactID2"); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccess('Contact', 'get', array( + 'id' => $this->contactID, + 'sequential' => 1 +)); +$this->assertEquals($language2, $contact['values'][0]['preferred_language']); + } + + /** + * Test that a conflict on communication preferences is handled. + * + * This is the same as the other test except the contact with the lower id is + * the later donor. + * + * @dataProvider getDifferentLanguageCombos + * + * @param string $language1 + * @param string $language2 + */ + public function testBatchMergeConflictDifferentPreferredLanguageReverse($language1, $language2) { +// Can't use api if we are trying to use invalid data. +$this->contributionCreate(array('contact_id' => $this->contactID, 'receive_date' => '2012-01-01', 'invoice_id' => 1, 'trxn_id' => 1)); +$this->contributionCreate(array('contact_id' => $this->contactID2, 'receive_date' => '2010-01-01', 'invoice_id' => 2, 'trxn_id' => 2)); + +wmf_civicrm_ensure_language_exists('en_US'); +wmf_civicrm_ensure_language_exists('fr_FR'); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language1' WHERE id = $this->contactID"); +CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = '$language2' WHERE id = $this->contactID2"); + +$result = $this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 'safe')); +$this->assertEquals(1, count($result['values']['merged'])); +$contact = $this->callAPISuccess('Contact', 'get', array( + 'id' => $this->contactID, + 'sequential' => 1 +)); +$this->assertEquals($language1, $contact['values'][0]['preferred_language']); + } + + /** * Get combinations of languages for comparison. * * @return array @@ -410,6 +467,21 @@ ); return $dataSet; } + + /** + * Get combinations of languages for comparison. + * + * @return array + */ + public function getDifferentLanguageCombos() { +$dataSet = array( + // Choose longer. + array('fr_FR', 'en_US'), + array('en_US', 'fr_FR'), +); +return $dataSet; + } + /** * Test that source conflicts are ignored. * diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index a63f453..30ea8d1 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2152,7 +2152,10 @@ str_replace('move_', '', $moveField), $refs['migration_info'][$moveField], $refs['migration_info']['rows'][$moveField]['other'], -$refs['migration_info']['rows'][$moveField]['main'])) { +$refs['migration_info']['rows'][$moveField]['main'], +$mainId, +$otherId +
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: For $wmgGalleryOptions, use isset()
jenkins-bot has submitted this change and it was merged. Change subject: For $wmgGalleryOptions, use isset() .. For $wmgGalleryOptions, use isset() This is a follow-up for commit 4589e9c8. Change-Id: I5897bd8e997ab41f6ae45aac846605bb4a2c5f01 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 117dba3..1a0694a 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -461,7 +461,7 @@ $wgFileBlacklist[] = 'txt'; $wgFileBlacklist[] = 'mht'; -if ( $wmgGalleryOptions ) { +if ( isset( $wmgGalleryOptions ) ) { $wgGalleryOptions = $wmgGalleryOptions; } -- To view, visit https://gerrit.wikimedia.org/r/318223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5897bd8e997ab41f6ae45aac846605bb4a2c5f01 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Dereckson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update authors list
jenkins-bot has submitted this change and it was merged. Change subject: Update authors list .. Update authors list * Added Ed Sanders * Moved Kunal Mehta to primary contributor section Change-Id: I1162a99c4987223e4a80a914ff3043fc89ce4227 --- M AUTHORS.txt 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/AUTHORS.txt b/AUTHORS.txt index 171743b..745d9c0 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -4,6 +4,7 @@ Arlo Breault, C.Scott Ananian, Gabriel Wicke, + Kunal Mehta, Marc Ordinas i Llopis, Mark Holmquist, Subramanya Sastry, Tim Starling @@ -14,12 +15,11 @@ Antoine Musso, Audrey Tang (au), Be Birchall, Brandon Black, Brandon Istenes, Brion Vibber, Carl Fürstenberg, - E.C.Okpo, Erik Bernhardson, + E.C.Okpo, Ed Sanders, Erik Bernhardson, Faidon Liambotis, Hardik Juneja, Inez Korczyński, James Douglas, James Forrester, Jeff Evans, - Kunal Mehta, Luke Welling, Luis Miguel Morillas, Maria Pacana, Marco Obrovac, Matt Flaschen, Matt Walker, Matthias Mullie, Molly White, MZMcBride, -- To view, visit https://gerrit.wikimedia.org/r/318201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1162a99c4987223e4a80a914ff3043fc89ce4227 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya SastryGerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: For $wmgGalleryOptions, use isset()
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/318223 Change subject: For $wmgGalleryOptions, use isset() .. For $wmgGalleryOptions, use isset() Change-Id: I5897bd8e997ab41f6ae45aac846605bb4a2c5f01 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/23/318223/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 117dba3..1a0694a 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -461,7 +461,7 @@ $wgFileBlacklist[] = 'txt'; $wgFileBlacklist[] = 'mht'; -if ( $wmgGalleryOptions ) { +if ( isset( $wmgGalleryOptions ) ) { $wgGalleryOptions = $wmgGalleryOptions; } -- To view, visit https://gerrit.wikimedia.org/r/318223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5897bd8e997ab41f6ae45aac846605bb4a2c5f01 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[wmf/1.28.0-wmf.23]: Unbreak Flickr uploads
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/318222 Change subject: Unbreak Flickr uploads .. Unbreak Flickr uploads deedChooser might not be set for Flickr uploads at all. Bug: T149259 Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d (cherry picked from commit 6b1f0d337472e8a4032017867c4658d5e72fd501) --- M resources/details/uw.DateDetailsWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/22/318222/1 diff --git a/resources/details/uw.DateDetailsWidget.js b/resources/details/uw.DateDetailsWidget.js index 893a65c..b2fca31 100644 --- a/resources/details/uw.DateDetailsWidget.js +++ b/resources/details/uw.DateDetailsWidget.js @@ -103,7 +103,7 @@ * @return {Object} */ uw.DateDetailsWidget.prototype.getLicenses = function () { - if ( this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { + if ( this.upload.deedChooser && this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { return this.upload.deedChooser.deed.licenseInput.getLicenses(); } -- To view, visit https://gerrit.wikimedia.org/r/318222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: wmf/1.28.0-wmf.23 Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Unbreak Flickr uploads
jenkins-bot has submitted this change and it was merged. Change subject: Unbreak Flickr uploads .. Unbreak Flickr uploads deedChooser might not be set for Flickr uploads at all. Bug: T149259 Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d --- M resources/details/uw.DateDetailsWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/details/uw.DateDetailsWidget.js b/resources/details/uw.DateDetailsWidget.js index 893a65c..b2fca31 100644 --- a/resources/details/uw.DateDetailsWidget.js +++ b/resources/details/uw.DateDetailsWidget.js @@ -103,7 +103,7 @@ * @return {Object} */ uw.DateDetailsWidget.prototype.getLicenses = function () { - if ( this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { + if ( this.upload.deedChooser && this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { return this.upload.deedChooser.deed.licenseInput.getLicenses(); } -- To view, visit https://gerrit.wikimedia.org/r/318221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Unbreak Flickr uploads
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/318221 Change subject: Unbreak Flickr uploads .. Unbreak Flickr uploads deedChooser might not be set for Flickr uploads at all. Bug: T149259 Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d --- M resources/details/uw.DateDetailsWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/21/318221/1 diff --git a/resources/details/uw.DateDetailsWidget.js b/resources/details/uw.DateDetailsWidget.js index 893a65c..b2fca31 100644 --- a/resources/details/uw.DateDetailsWidget.js +++ b/resources/details/uw.DateDetailsWidget.js @@ -103,7 +103,7 @@ * @return {Object} */ uw.DateDetailsWidget.prototype.getLicenses = function () { - if ( this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { + if ( this.upload.deedChooser && this.upload.deedChooser.deed && this.upload.deedChooser.deed.licenseInput ) { return this.upload.deedChooser.deed.licenseInput.getLicenses(); } -- To view, visit https://gerrit.wikimedia.org/r/318221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If83d0b176155e87d5aee5ebe294bb76f4d08ac2d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard 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
[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools proxy: Add health check and icinga monitoring
Madhuvishy has submitted this change and it was merged. Change subject: tools proxy: Add health check and icinga monitoring .. tools proxy: Add health check and icinga monitoring Bug: T143638 Change-Id: If89260a3320315ee4cce2a70be0d7b83b21f3646 --- M modules/dynamicproxy/templates/nginx.conf M modules/icinga/manifests/monitor/toollabs.pp 2 files changed, 15 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, but someone else must approve Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dynamicproxy/templates/nginx.conf b/modules/dynamicproxy/templates/nginx.conf index 54acf4c..02250a8 100644 --- a/modules/dynamicproxy/templates/nginx.conf +++ b/modules/dynamicproxy/templates/nginx.conf @@ -1,5 +1,5 @@ # Default nginx config for Debian Jessie with overrides for worker_connections -# and worket_rlimit_nofile +# and worket_rlimit_nofile. Also includes a health check endpoint. user www-data; worker_processes auto; @@ -65,4 +65,10 @@ include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; + + server { +location /.well-known/healthz { + return 200 'proxy ok!'; +} + } } diff --git a/modules/icinga/manifests/monitor/toollabs.pp b/modules/icinga/manifests/monitor/toollabs.pp index 4392f38..b070f96 100644 --- a/modules/icinga/manifests/monitor/toollabs.pp +++ b/modules/icinga/manifests/monitor/toollabs.pp @@ -35,6 +35,14 @@ host => 'tools.wmflabs.org', } +# Monitors the tools nginx proxy by hitting the health endpoint +# defined in dynamicproxy nginx.conf +monitoring::service {'tools-proxy': +description => 'tools nginx proxy health', +check_command => 'check_http_url!tools.wmflabs.org!/.well-known/healthz', +host => 'tools.wmflabs.org', +} + # complex checks via a wsgi app running on a cluster for this purpose. # these checks are used to track uptime and availability via # catchpoint as well as for general alerting and administration. -- To view, visit https://gerrit.wikimedia.org/r/314707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If89260a3320315ee4cce2a70be0d7b83b21f3646 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MadhuvishyGerrit-Reviewer: Madhuvishy Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: remove python-requests
Dzahn has submitted this change and it was merged. Change subject: contint: remove python-requests .. contint: remove python-requests We have python-requests installed on gallium which was to fulfill a dependency to auto sync the VisualEditor repository in Gerrit. That was to workaround a bug in Gerrit which no more apply nowaday. The sync script has been removed and the dependency is no more needed. Bug: T51846 Change-Id: I0b7a42c34cf9671c515b843dd3fe9849356005f8 --- M modules/contint/manifests/packages.pp 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index aab7b8d..2a6d32e 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -21,8 +21,4 @@ # For Doxygen based documentations require_package('graphviz') - -# VisualEditor syncing -require_package('python-requests') - } -- To view, visit https://gerrit.wikimedia.org/r/317923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b7a42c34cf9671c515b843dd3fe9849356005f8 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HasharGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Enable eslint:valid-jsdoc with exceptions for @chainable
jenkins-bot has submitted this change and it was merged. Change subject: Enable eslint:valid-jsdoc with exceptions for @chainable .. Enable eslint:valid-jsdoc with exceptions for @chainable Change-Id: Ic92b425d4060a7263bf5cd131fcbd1cc443fcb3d --- M .eslintrc.json M src/ce/ve.ce.View.js M src/dm/ve.dm.SurfaceFragment.js M src/ui/ve.ui.Context.js M src/ui/ve.ui.ContextItem.js M src/ui/ve.ui.Surface.js M src/ui/widgets/ve.ui.LanguageResultWidget.js M src/ui/widgets/ve.ui.LinkAnnotationWidget.js M src/ve.EventSequencer.js M src/ve.Filibuster.js 10 files changed, 19 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json index 23a927c..10222e1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,6 @@ }, "rules": { "dot-notation": 0, - "valid-jsdoc": 0, "wrap-iife": 0, "no-console": "error", "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }] diff --git a/src/ce/ve.ce.View.js b/src/ce/ve.ce.View.js index 0affa81..c21ddf8 100644 --- a/src/ce/ve.ce.View.js +++ b/src/ce/ve.ce.View.js @@ -70,6 +70,7 @@ /* Static members */ +// eslint-disable-next-line valid-jsdoc /** * Allowed attributes for DOM elements, in the same format as ve.dm.Model#preserveHtmlAttributes * diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js index 06c95e4..0b60e0a 100644 --- a/src/dm/ve.dm.SurfaceFragment.js +++ b/src/dm/ve.dm.SurfaceFragment.js @@ -4,6 +4,9 @@ * @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org */ +// HACK: eslint valid-jsdoc doesn't yet support @chainable: https://github.com/eslint/eslint/issues/6681 +/* eslint-disable valid-jsdoc */ + /** * DataModel surface fragment. * diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js index 43d3222..f58b6a8 100644 --- a/src/ui/ve.ui.Context.js +++ b/src/ui/ve.ui.Context.js @@ -106,6 +106,8 @@ return this.surface; }; +/* eslint-disable valid-jsdoc */ + /** * Toggle the menu. * diff --git a/src/ui/ve.ui.ContextItem.js b/src/ui/ve.ui.ContextItem.js index 8b6491d..461fd0e 100644 --- a/src/ui/ve.ui.ContextItem.js +++ b/src/ui/ve.ui.ContextItem.js @@ -125,6 +125,8 @@ return this.fragment; }; +/* eslint-disable valid-jsdoc */ + /** * Setup the item. * diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js index d16b1cf..38823b1 100644 --- a/src/ui/ve.ui.Surface.js +++ b/src/ui/ve.ui.Surface.js @@ -121,6 +121,8 @@ /* Methods */ +/* eslint-disable valid-jsdoc */ + /** * Destroy the surface, releasing all memory and removing all DOM elements. * @@ -408,6 +410,8 @@ return this.setDisabled( false ); }; +/* eslint-enable valid-jsdoc */ + /** * Handle transact events from the document model * diff --git a/src/ui/widgets/ve.ui.LanguageResultWidget.js b/src/ui/widgets/ve.ui.LanguageResultWidget.js index 8cd7018..7f41d23 100644 --- a/src/ui/widgets/ve.ui.LanguageResultWidget.js +++ b/src/ui/widgets/ve.ui.LanguageResultWidget.js @@ -30,6 +30,7 @@ /* Methods */ +// eslint-disable-next-line valid-jsdoc /** * Update labels based on query * diff --git a/src/ui/widgets/ve.ui.LinkAnnotationWidget.js b/src/ui/widgets/ve.ui.LinkAnnotationWidget.js index 2b6c5a7..8d9786e 100644 --- a/src/ui/widgets/ve.ui.LinkAnnotationWidget.js +++ b/src/ui/widgets/ve.ui.LinkAnnotationWidget.js @@ -136,6 +136,7 @@ } ); }; +// eslint-disable-next-line valid-jsdoc /** * Sets the annotation value. * diff --git a/src/ve.EventSequencer.js b/src/ve.EventSequencer.js index caf413f..a652708 100644 --- a/src/ve.EventSequencer.js +++ b/src/ve.EventSequencer.js @@ -124,6 +124,8 @@ this.afterLoopTimeoutId = null; }; +/* eslint-disable valid-jsdoc */ + /** * Attach to a node, to listen to its jQuery events * diff --git a/src/ve.Filibuster.js b/src/ve.Filibuster.js index 25c16b8..6ccd6c1 100644 --- a/src/ve.Filibuster.js +++ b/src/ve.Filibuster.js @@ -69,6 +69,7 @@ this.callPath.length = 0; }; +// eslint-disable-next-line valid-jsdoc /** * Attaches an observer callback. The callback returns a value representing the current state, * which must be a string (this ensures state values are immutable, comparable with strict @@ -248,6 +249,7 @@ return this; }; +// eslint-disable-next-line valid-jsdoc /** * Wrap the functions in a class with wrappers that perform logging. * @@ -276,6 +278,7 @@ return this; }; +// eslint-disable-next-line valid-jsdoc /** * Recursively wrap the functions in a namespace with wrappers that perform logging. * -- To view, visit https://gerrit.wikimedia.org/r/318214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Test setting gallery config differently on Beta Cluster enwiki
jenkins-bot has submitted this change and it was merged. Change subject: Test setting gallery config differently on Beta Cluster enwiki .. Test setting gallery config differently on Beta Cluster enwiki Though this is configured in default settings we've never varied this before; I chose to place it after core image config, and before 'PagedTiffHandler' is set, in some sort of vague consistency, but this doesn't fix the overall file order to be ideal. Change-Id: I3d61178ce361e7a08e3f16d52aa32619fffeb43d --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings-labs.php 2 files changed, 19 insertions(+), 0 deletions(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 268117a..117dba3 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -461,6 +461,10 @@ $wgFileBlacklist[] = 'txt'; $wgFileBlacklist[] = 'mht'; +if ( $wmgGalleryOptions ) { + $wgGalleryOptions = $wmgGalleryOptions; +} + if ( $wmgUsePagedTiffHandler ) { include( $IP . '/extensions/PagedTiffHandler/PagedTiffHandler.php' ); } diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 151dbb0..244d3b9 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -558,5 +558,20 @@ 'wmgUseQuiz' => [ 'cawiki' => true, ], + + // Test gallery settings; see T141349 + 'wmgGalleryOptions' => [ + 'default' => [ + 'imagesPerRow' => 0, + 'imageWidth' => 120, + 'imageHeight' => 120, + 'captionLength' => true, + 'showBytes' => true, + 'mode' => 'traditional', + ], + '+enwiki' => [ + 'mode' => 'packed', // T141349 + ], + ], ]; } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/301128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d61178ce361e7a08e3f16d52aa32619fffeb43d Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Dereckson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Gilles Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix documentation to pass eslint valid-jsdoc
jenkins-bot has submitted this change and it was merged. Change subject: Fix documentation to pass eslint valid-jsdoc .. Fix documentation to pass eslint valid-jsdoc Don't actually enable the rule for now as it doesn't yet support @chainable Change-Id: I1c5b817213d40923a7094e841252b7ff61a80962 --- M src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js M src/ce/nodes/ve.ce.TableCellNode.js M src/ce/ve.ce.ContentBranchNode.js M src/ce/ve.ce.FocusableNode.js M src/ce/ve.ce.Node.js M src/ce/ve.ce.ResizableNode.js M src/ce/ve.ce.Surface.js M src/ce/ve.ce.SurfaceObserver.js M src/ce/ve.ce.View.js M src/dm/nodes/ve.dm.GeneratedContentNode.js M src/dm/selections/ve.dm.NullSelection.js M src/dm/ve.dm.Annotation.js M src/dm/ve.dm.Converter.js M src/dm/ve.dm.Document.js M src/dm/ve.dm.MetaList.js M src/dm/ve.dm.TableMatrix.js M src/dm/ve.dm.Transaction.js M src/dm/ve.dm.TransactionProcessor.js M src/ui/dialogs/ve.ui.CommandHelpDialog.js M src/ui/inspectors/ve.ui.AnnotationInspector.js M src/ui/inspectors/ve.ui.CommentInspector.js M src/ui/ve.ui.Context.js M src/ui/ve.ui.Sequence.js M src/ui/widgets/ve.ui.LinkAnnotationWidget.js M src/ui/windowmanagers/ve.ui.MobileWindowManager.js M src/ve.utils.js M tests/ce/ve.ce.TestRunner.js M tests/ve.qunit.js 28 files changed, 69 insertions(+), 11 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js b/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js index 96d41e5..e4ee6b2 100644 --- a/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js +++ b/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js @@ -140,8 +140,6 @@ } surface.getModel().setSelection( newSelection ); - - return true; }; /* Registration */ diff --git a/src/ce/nodes/ve.ce.TableCellNode.js b/src/ce/nodes/ve.ce.TableCellNode.js index 9319212..2759595 100644 --- a/src/ce/nodes/ve.ce.TableCellNode.js +++ b/src/ce/nodes/ve.ce.TableCellNode.js @@ -131,6 +131,10 @@ /** * Handle attribute changes to keep the live HTML element updated. + * + * @param {string} key Attribute name + * @param {Mixed} from Old value + * @param {Mixed} to Old value */ ve.ce.TableCellNode.prototype.onAttributeChange = function ( key, from, to ) { switch ( key ) { diff --git a/src/ce/ve.ce.ContentBranchNode.js b/src/ce/ve.ce.ContentBranchNode.js index 94e6c0c..7f7f12e 100644 --- a/src/ce/ve.ce.ContentBranchNode.js +++ b/src/ce/ve.ce.ContentBranchNode.js @@ -124,6 +124,7 @@ * This is used to automatically render contents. * * @method + * @param {ve.dm.Transaction} transaction Transaction */ ve.ce.ContentBranchNode.prototype.onChildUpdate = function ( transaction ) { if ( transaction === null || transaction === this.lastTransaction ) { diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 792fae9..89aad0c 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -302,7 +302,7 @@ ve.ce.FocusableNode.prototype.executeCommand = function () { var command, surface; if ( !this.model.isInspectable() ) { - return false; + return; } surface = this.focusableSurface.getSurface(); command = surface.commandRegistry.getCommandForNode( this ); diff --git a/src/ce/ve.ce.Node.js b/src/ce/ve.ce.Node.js index b25f7a9..b3c27a5 100644 --- a/src/ce/ve.ce.Node.js +++ b/src/ce/ve.ce.Node.js @@ -227,7 +227,11 @@ ve.ce.Node.super.prototype.destroy.call( this ); }; -/** */ +/** + * Get the model's HTML document + * + * @return {HTMLDocument} Model document + */ ve.ce.Node.prototype.getModelHtmlDocument = function () { return this.model.getDocument() && this.model.getDocument().getHtmlDocument(); }; diff --git a/src/ce/ve.ce.ResizableNode.js b/src/ce/ve.ce.ResizableNode.js index bafe15a..4d5a832 100644 --- a/src/ce/ve.ce.ResizableNode.js +++ b/src/ce/ve.ce.ResizableNode.js @@ -109,7 +109,11 @@ return this.resizableOffset; }; -/** */ +/** + * Set the original dimensions of the scalable object + * + * @param {Object} dimensions Dimensions + */ ve.ce.ResizableNode.prototype.setOriginalDimensions = function ( dimensions ) { var scalable; @@ -417,7 +421,7 @@ } ); this.emit( 'resizeStart' ); - return false; + e.preventDefault(); }; /** diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index c5260c9..7d21167 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -1233,7 +1233,7 @@ * unit instead of letting the cursor slip inside them. * @private -* @param {Node} DOM node of cursor position +* @param {Node} node DOM node of cursor position * @param {number} offset Offset of cursor position * @param {number} direction Cursor motion direction
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add CaptchaClientTest
jenkins-bot has submitted this change and it was merged. Change subject: Add CaptchaClientTest .. Add CaptchaClientTest Also defined equals() and hashCode() for EditingResult and subclasses including CaptchaResult. Change-Id: I05a31d81a6a717d932d74ba7c14b64fc71bea4df --- M app/src/main/java/org/wikipedia/editing/CaptchaClient.java M app/src/main/java/org/wikipedia/editing/EditingResult.java A app/src/test/java/org/wikipedia/editing/CaptchaClientTest.java A app/src/test/res/raw/captcha.json 4 files changed, 90 insertions(+), 4 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/editing/CaptchaClient.java b/app/src/main/java/org/wikipedia/editing/CaptchaClient.java index fa361b6..7b4c1c4 100644 --- a/app/src/main/java/org/wikipedia/editing/CaptchaClient.java +++ b/app/src/main/java/org/wikipedia/editing/CaptchaClient.java @@ -2,6 +2,7 @@ import android.support.annotation.NonNull; +import android.support.annotation.VisibleForTesting; import org.wikipedia.dataclient.WikiSite; import org.wikipedia.dataclient.retrofit.MwCachedService; @@ -17,8 +18,13 @@ @NonNull private final MwCachedService cachedService = new MwCachedService<>(Service.class); @NonNull private final Retrofit retrofit = RbPageEndpointsCache.INSTANCE.getRetrofit(); -public Call request(@NonNull final WikiSite wiki, @NonNull final Callback cb) { -Call call = cachedService.service(wiki).refreshCaptcha(); +public Call request(@NonNull WikiSite wiki, @NonNull Callback cb) { +Service service = cachedService.service(wiki); +return request(service, cb); +} + +@VisibleForTesting Call request(@NonNull Service service, @NonNull final Callback cb) { +Call call = service.refreshCaptcha(); call.enqueue(new retrofit2.Callback() { @Override public void onResponse(Call call, Response response) { @@ -42,7 +48,7 @@ void failure(@NonNull Call call, @NonNull Throwable caught); } -private interface Service { +@VisibleForTesting interface Service { /* Get a fresh Captcha ID. */ @GET("w/api.php?action=fancycaptchareload=json=2") Call refreshCaptcha(); diff --git a/app/src/main/java/org/wikipedia/editing/EditingResult.java b/app/src/main/java/org/wikipedia/editing/EditingResult.java index bacd0c2..7c97e2c 100644 --- a/app/src/main/java/org/wikipedia/editing/EditingResult.java +++ b/app/src/main/java/org/wikipedia/editing/EditingResult.java @@ -3,7 +3,9 @@ import android.os.Parcel; import android.os.Parcelable; -public abstract class EditingResult implements Parcelable { +import org.wikipedia.model.BaseModel; + +public abstract class EditingResult extends BaseModel implements Parcelable { private final String result; public EditingResult(String result) { diff --git a/app/src/test/java/org/wikipedia/editing/CaptchaClientTest.java b/app/src/test/java/org/wikipedia/editing/CaptchaClientTest.java new file mode 100644 index 000..04ba058 --- /dev/null +++ b/app/src/test/java/org/wikipedia/editing/CaptchaClientTest.java @@ -0,0 +1,73 @@ +package org.wikipedia.editing; + +import android.support.annotation.NonNull; + +import com.google.gson.stream.MalformedJsonException; + +import org.junit.Test; +import org.wikipedia.dataclient.retrofit.RetrofitException; +import org.wikipedia.editing.CaptchaClient.Callback; +import org.wikipedia.editing.CaptchaClient.Service; +import org.wikipedia.test.MockWebServerTest; + +import retrofit2.Call; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; +import static org.mockito.Matchers.isA; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; + +public class CaptchaClientTest extends MockWebServerTest { +@NonNull private final CaptchaClient subject = new CaptchaClient(); + +@Test public void testRequestSuccess() throws Throwable { +CaptchaResult expected = new CaptchaResult("1572672319"); +enqueueFromFile("captcha.json"); + +Callback cb = mock(Callback.class); +Call call = request(cb); + +server().takeRequest(); +assertCallbackSuccess(call, cb, expected); +} + +@Test public void testRequestResponseFailure() throws Throwable { +enqueue404(); + +Callback cb = mock(Callback.class); +Call call = request(cb); + +server().takeRequest(); +assertCallbackFailure(call, cb, RetrofitException.class); +} + +@Test public void testRequestResponseMalformed() throws Throwable { +server().enqueue("'"); + +Callback cb = mock(Callback.class); +Call call = request(cb); + +server().takeRequest(); +assertCallbackFailure(call, cb, MalformedJsonException.class); +} + +private
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: build: Switch from jshint and jscs to eslint
jenkins-bot has submitted this change and it was merged. Change subject: build: Switch from jshint and jscs to eslint .. build: Switch from jshint and jscs to eslint Where lint exceptions have no equivalent rule in eslint, they have been left in as a reminder that we need to find replacements for those rules. Change-Id: I42001fb086fb090ad9f154b691f4c104d76e60a2 --- A .eslintrc.json D .jscsrc D .jshintignore D .jshintrc M Gruntfile.js M build/moduleUtils.js M build/tasks/buildloader.js M build/tasks/git-build.js M demos/ve/ve.demo.init.js M package.json M src/ce/keydownhandlers/ve.ce.LinearArrowKeyDownHandler.js M src/ce/ve.ce.ClassAttributeNode.js M src/ce/ve.ce.Surface.js M src/ce/ve.ce.js M src/dm/ve.dm.SourceSurfaceFragment.js M src/dm/ve.dm.TableCellableNode.js M src/dm/ve.dm.Transaction.js M src/init/ve.init.SupportCheck.js M src/ui/actions/ve.ui.LinkAction.js M src/ui/actions/ve.ui.TableAction.js M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js M src/ui/dialogs/ve.ui.ProgressDialog.js M src/ui/tools/ve.ui.FragmentWindowTool.js M src/ui/ve.ui.DataTransferHandlerFactory.js M src/ui/ve.ui.DataTransferItem.js M src/ui/ve.ui.DebugBar.js M src/ui/ve.ui.TabIndexScope.js M src/ui/ve.ui.Trigger.js M src/ui/widgets/ve.ui.AlignWidget.js M src/ui/widgets/ve.ui.MediaSizeWidget.js M src/ve.Document.js M src/ve.EventSequencer.js M src/ve.Filibuster.js M src/ve.debug.js M src/ve.utils.js M tests/ce/imetests/input-chromium-ubuntu-ibus-japanese-mozc.js M tests/ce/imetests/input-firefox-ubuntu-ibus-japanese-mozc.js M tests/ce/ve.ce.Document.test.js M tests/ce/ve.ce.Surface.test.js M tests/ce/ve.ce.test.js M tests/dm/lineardata/ve.dm.ElementLinearData.test.js M tests/dm/ve.dm.SurfaceFragment.test.js M tests/dm/ve.dm.Transaction.test.js M tests/dm/ve.dm.TransactionProcessor.test.js M tests/dm/ve.dm.example.js M tests/ve.qunit.js M tests/ve.test.js M tests/ve.test.utils.js 48 files changed, 306 insertions(+), 353 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..23a927c --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "ve": true, + "VisualEditorSupportCheck": false, + "OO": false, + "unicodeJS": false, + "RangeFix": false, + "Papa": false + }, + "rules": { + "dot-notation": 0, + "valid-jsdoc": 0, + "wrap-iife": 0, + "no-console": "error", + "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }] + } +} diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 592765f..000 --- a/.jscsrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "preset": "wikimedia", - - "jsDoc": { - "checkAnnotations": { - "preset": "jsduck5", - "extra": { - "source": true, - "see": true - } - }, - "checkParamNames": true, - "checkRedundantAccess": true, - "checkRedundantReturns": true, - "checkTypes": "strictNativeCase", - "requireNewlineAfterDescription": true, - "requireParamTypes": true, - "requireReturnTypes": true - }, - - "excludeFiles": [ - "coverage/**", - "dist/**", - "docs/**", - "lib/**", - "node_modules/**" - ] -} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index e2d1bae..000 --- a/.jshintignore +++ /dev/null @@ -1,5 +0,0 @@ -coverage -dist -docs -lib -node_modules diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 49f49fb..000 --- a/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": "nofunc", - "futurehostile": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - - "strict": false, - - // Relaxing - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "OO": false, - "QUnit": false, - "unicodeJS": false, - "RangeFix": false, - "Papa": false, - "ve": false, - "VisualEditorSupportCheck": false - } -} diff --git a/Gruntfile.js b/Gruntfile.js index fe79805..d00027b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,7 +4,7 @@ * @package VisualEditor */ -/*jshint node:true */ +/*
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add short-circuit to DatabasePostgres::schemaExists()
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/318220 Change subject: Add short-circuit to DatabasePostgres::schemaExists() .. Add short-circuit to DatabasePostgres::schemaExists() Change-Id: I5221f7d937be1e87689df5a21fd64e244dbd4c2a --- M includes/libs/rdbms/database/DatabasePostgres.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/318220/1 diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index 7acd8dc..b72557a 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -1175,8 +1175,12 @@ * @return bool */ function schemaExists( $schema ) { - $exists = $this->selectField( '"pg_catalog"."pg_namespace"', 1, - [ 'nspname' => $schema ], __METHOD__ ); + if ( !strlen( $schema ) ) { + return false; // short-circuit + } + + $exists = $this->selectField( + '"pg_catalog"."pg_namespace"', 1, [ 'nspname' => $schema ], __METHOD__ ); return (bool)$exists; } -- To view, visit https://gerrit.wikimedia.org/r/318220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5221f7d937be1e87689df5a21fd64e244dbd4c2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: upgrade to new config syntax
Filippo Giunchedi has submitted this change and it was merged. Change subject: prometheus: upgrade to new config syntax .. prometheus: upgrade to new config syntax The configuration keys changed in 0.20. Bug: T147207 Change-Id: I63ae7d23f061b421e825bffc77e67c17487bde05 --- M modules/prometheus/manifests/server.pp M modules/role/manifests/prometheus/beta.pp M modules/role/manifests/prometheus/ops.pp M modules/role/manifests/prometheus/tools.pp 4 files changed, 15 insertions(+), 15 deletions(-) Approvals: Filippo Giunchedi: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/prometheus/manifests/server.pp b/modules/prometheus/manifests/server.pp index 05e0616..61fb13f 100644 --- a/modules/prometheus/manifests/server.pp +++ b/modules/prometheus/manifests/server.pp @@ -74,14 +74,14 @@ { 'job_name' => 'prometheus', 'metrics_path' => "/${title}/metrics", -'target_groups' => [ +'static_configs' => [ { 'targets' => [ $listen_address ] }, ] }, { 'job_name' => 'node', 'file_sd_configs' => [ -{ 'names' => [ "${targets_path}/node_*.yml", +{ 'files' => [ "${targets_path}/node_*.yml", "${targets_path}/node_*.yaml" ] }, ] }, diff --git a/modules/role/manifests/prometheus/beta.pp b/modules/role/manifests/prometheus/beta.pp index bb44478..0297764 100644 --- a/modules/role/manifests/prometheus/beta.pp +++ b/modules/role/manifests/prometheus/beta.pp @@ -12,13 +12,13 @@ { 'job_name'=> 'varnish-text', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/varnish-text_*.yaml"] }, + { 'files' => [ "${targets_path}/varnish-text_*.yaml"] }, ] }, { 'job_name'=> 'varnish-upload', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/varnish-upload_*.yaml"] }, + { 'files' => [ "${targets_path}/varnish-upload_*.yaml"] }, ] }, ] @@ -27,7 +27,7 @@ { 'job_name'=> 'mysql-core', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-core_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-core_*.yaml"] }, ] }, ] @@ -36,19 +36,19 @@ { 'job_name'=> 'apache', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/apache_*.yaml"] }, + { 'files' => [ "${targets_path}/apache_*.yaml"] }, ] }, { 'job_name'=> 'hhvm', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/hhvm_*.yaml"] }, + { 'files' => [ "${targets_path}/hhvm_*.yaml"] }, ] }, { 'job_name'=> 'memcache', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/memcache_*.yaml"] }, + { 'files' => [ "${targets_path}/memcache_*.yaml"] }, ] }, ] diff --git a/modules/role/manifests/prometheus/ops.pp b/modules/role/manifests/prometheus/ops.pp index 0d39db9..eabc97e 100644 --- a/modules/role/manifests/prometheus/ops.pp +++ b/modules/role/manifests/prometheus/ops.pp @@ -13,31 +13,31 @@ { 'job_name'=> 'mysql-core', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-core_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-core_*.yaml"] }, ] }, { 'job_name'=> 'mysql-dbstore', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-dbstore_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-dbstore_*.yaml"] }, ] }, { 'job_name'=> 'mysql-labs', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-labs_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-labs_*.yaml"] }, ] }, { 'job_name'=> 'mysql-misc', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-misc_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-misc_*.yaml"] }, ] }, { 'job_name'=> 'mysql-parsercache', 'file_sd_configs' => [ - { 'names' => [ "${targets_path}/mysql-parsercache_*.yaml"] }, + { 'files' => [ "${targets_path}/mysql-parsercache_*.yaml"] }, ] }, ] diff --git a/modules/role/manifests/prometheus/tools.pp b/modules/role/manifests/prometheus/tools.pp index 32b1c52..e0f60a9 100644 --- a/modules/role/manifests/prometheus/tools.pp +++ b/modules/role/manifests/prometheus/tools.pp @@ -50,7 +50,7 @@ }, 'file_sd_configs' => [ { -
[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Update TSS2 revision number
Bearloga has submitted this change and it was merged. Change subject: Update TSS2 revision number .. Update TSS2 revision number Erik is adding "did you mean" to TestSearchSatisfaction2 schema so we need to update the revision number after the patch goes live. Depends-On: I8983a9677ffd9d98c8a347ef0961c2f0e874393f Change-Id: I6a9c64761a38d8a69ecac7fe8e5c6f3cbd20b741 --- M search/desktop.R M search/paulscore.R 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Chelsyx: Verified; Looks good to me, approved diff --git a/search/desktop.R b/search/desktop.R index 9f41110..5ac17e2 100644 --- a/search/desktop.R +++ b/search/desktop.R @@ -1,7 +1,7 @@ # Per-file config: base_path <- paste0(write_root, "search/") -main <- function(date = NULL, table = "TestSearchSatisfaction2_15700292"){ +main <- function(date = NULL, table = "TestSearchSatisfaction2_15922352"){ # Retrieve data data <- wmf::build_query(fields = "SELECT diff --git a/search/paulscore.R b/search/paulscore.R index 1451183..e6d2fd3 100644 --- a/search/paulscore.R +++ b/search/paulscore.R @@ -18,7 +18,7 @@ event_source, event_searchSessionId, ", paste0("SUM(IF(event_action = 'click', POW(0.", 1:9, ", event_position), 0)) / SUM(IF(event_action = 'searchResultPage', 1, 0)) AS pow_", 1:9, collapse = ",\n"), " - FROM TestSearchSatisfaction2_15700292 + FROM TestSearchSatisfaction2_15922352 WHERE LEFT(timestamp, 8) = '", date, "' AND event_action IN ('searchResultPage', 'click') -- To view, visit https://gerrit.wikimedia.org/r/316489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a9c64761a38d8a69ecac7fe8e5c6f3cbd20b741 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/golden Gerrit-Branch: master Gerrit-Owner: BearlogaGerrit-Reviewer: Bearloga Gerrit-Reviewer: Chelsyx ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Follow-up e3192e2d3: properly fix layout thrashing in update...
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up e3192e2d3: properly fix layout thrashing in updateInvisibleIcon .. Follow-up e3192e2d3: properly fix layout thrashing in updateInvisibleIcon Rather than deferring the whole function with rAF, do the measurements immediately and defer the DOM modification. In theory, this means we should be able to do all the measurements first and all the DOM modifications after that, causing no reflows. In practice, there are still a couple of reflows because of other stuff that happens during FocusableNode setup, so we'd need to use something like the fastdom library to really cut down on reflows. This cuts post-AJAX load time on [[en:Barack Obama]] down to 5.8s down from 7.6s on my laptop. Change-Id: I4aff88f705782d7ab3bd6f7aaa8096324a29b813 --- M src/ce/ve.ce.FocusableNode.js 1 file changed, 22 insertions(+), 13 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 792fae9..a43d992 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -119,8 +119,6 @@ * @method */ ve.ce.FocusableNode.prototype.onFocusableSetup = function () { - var rAF = window.requestAnimationFrame || setTimeout; - // Exit if already setup or not attached if ( this.isFocusableSetup || !this.root ) { return; @@ -158,7 +156,7 @@ .find( 'img:not([width]),img:not([height])' ) .addBack( 'img:not([width]),img:not([height])' ) .on( 'load', this.updateInvisibleIcon.bind( this ) ); - rAF( this.updateInvisibleIcon.bind( this ) ); + this.updateInvisibleIcon(); } this.isFocusableSetup = true; @@ -174,20 +172,31 @@ * @method */ ve.ce.FocusableNode.prototype.updateInvisibleIcon = function () { + var showIcon, + rAF = window.requestAnimationFrame || setTimeout, + node = this; + if ( !this.constructor.static.iconWhenInvisible ) { return; } - if ( !this.hasRendering() ) { - if ( !this.$icon ) { - this.$icon = this.createInvisibleIcon(); + + showIcon = !this.hasRendering(); + + // Defer updating the DOM. If we don't do this, the hasRendering() call for the next + // FocusableNode will force a reflow, which is slow. + rAF( function () { + if ( showIcon ) { + if ( !node.$icon ) { + node.$icon = node.createInvisibleIcon(); + } + node.$element.first() + .addClass( 've-ce-focusableNode-invisible' ) + .prepend( node.$icon ); + } else if ( node.$icon ) { + node.$element.first().removeClass( 've-ce-focusableNode-invisible' ); + node.$icon.detach(); } - this.$element.first() - .addClass( 've-ce-focusableNode-invisible' ) - .prepend( this.$icon ); - } else if ( this.$icon ) { - this.$element.first().removeClass( 've-ce-focusableNode-invisible' ); - this.$icon.detach(); - } + } ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/316703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4aff88f705782d7ab3bd6f7aaa8096324a29b813 Gerrit-PatchSet: 5 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Use correct user for isUsableBy check in Special:OAuth/identify
jenkins-bot has submitted this change and it was merged. Change subject: Use correct user for isUsableBy check in Special:OAuth/identify .. Use correct user for isUsableBy check in Special:OAuth/identify The special page's $this->getUser() comes from the normal CookieSessionProvider cookies (or other non-OAuth mechanism), not the OAuth headers that are being validated here for use by the /identify endpoint. We need to use the user associated with the MWOAuthConsumerAcceptance instead for proper operation. Bug: T149194 Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 --- M frontend/specialpages/SpecialMWOAuth.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/specialpages/SpecialMWOAuth.php b/frontend/specialpages/SpecialMWOAuth.php index f6bbf7e..3f0954f 100644 --- a/frontend/specialpages/SpecialMWOAuth.php +++ b/frontend/specialpages/SpecialMWOAuth.php @@ -157,21 +157,21 @@ $wiki = wfWikiID(); $dbr = MWOAuthUtils::getCentralDB( DB_SLAVE ); $access = MWOAuthConsumerAcceptance::newFromToken( $dbr, $token->key ); + $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); + if ( !$localUser || !$localUser->isLoggedIn() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); + } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { + throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); + } // Access token is for this wiki if ( $access->get( 'wiki' ) !== '*' && $access->get( 'wiki' ) !== $wiki ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-wrong-wiki', array( $wiki ) ); - } elseif ( !$consumer->isUsableBy( $user ) ) { + } elseif ( !$consumer->isUsableBy( $localUser ) ) { throw new MWOAuthException( 'mwoauth-invalid-authorization-not-approved', $consumer->get( 'name' ) ); - } - $localUser = MWOAuthUtils::getLocalUserFromCentralId( $access->get( 'userId' ) ); - if ( !$localUser || !$localUser->isLoggedIn() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-invalid-user' ); - } elseif ( $localUser->isLocked() || $wgBlockDisablesLogin && $localUser->isBlocked() ) { - throw new MWOAuthException( 'mwoauth-invalid-authorization-blocked-user' ); } // We know the identity of the user who granted the authorization -- To view, visit https://gerrit.wikimedia.org/r/318098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a9f78c4fe7e592a3dbbf084858ba9942a8fac38 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Chad Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits