[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Fix badly cropped images when using page images
jenkins-bot has submitted this change and it was merged. Change subject: Fix badly cropped images when using page images .. Fix badly cropped images when using page images Skips generating of banner HTML code when image is not landscape. This fix should also allow when the editor has specifically overriden the default. Bug: T131424 Change-Id: I1261cca946e8e0e87ad9446233096da4511a1443 --- M includes/WikidataPageBanner.functions.php M includes/WikidataPageBanner.hooks.php 2 files changed, 11 insertions(+), 5 deletions(-) Approvals: Sumit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/WikidataPageBanner.functions.php b/includes/WikidataPageBanner.functions.php old mode 100644 new mode 100755 index 3f2216e..dc8c812 --- a/includes/WikidataPageBanner.functions.php +++ b/includes/WikidataPageBanner.functions.php @@ -165,15 +165,20 @@ // use largest image url as src attribute $bannerurl = $urls[count( $urls ) - 1]; $bannerfile = Title::newFromText( "File:$bannername" ); + $file = wfFindFile( $bannerfile ); + // don't auto generate banner if image is not landscape, see bug report T131424 + $fileWidth = $file->getWidth(); + $fileHeight = $file->getHeight(); + if ( isset( $options['isAutomatic'] ) && $fileWidth < 1.5 * $fileHeight ) { + return null; + } $templateParser = new TemplateParser( __DIR__ . '/../templates' ); $options['bannerfile'] = $bannerfile->getLocalUrl(); $options['banner'] = $bannerurl; $options['srcset'] = $srcset; - $file = wfFindFile( $bannerfile ); - $fileWidth = $file->getWidth(); $options['maxWidth'] = $fileWidth; // Provide information to the logic-less template about whether it is a panorama or not. - $options['isPanorama'] = $fileWidth > ( $file->getHeight() * 2 ); + $options['isPanorama'] = $fileWidth > ( $fileHeight * 2 ); $options['isHeadingOverrideEnabled'] = $config->get( 'WPBEnableHeadingOverride' ); $banner = $templateParser->processTemplate( 'banner', diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php old mode 100644 new mode 100755 index a87290d..642248c --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -98,6 +98,7 @@ $banner = $wpbFunctionsClass::getBannerHtml( $bannername, $params ); // attempt to get an automatic banner if ( $banner === null ) { + $params['isAutomatic'] = true; $bannername = $wpbFunctionsClass::getAutomaticBanner( $title ); $banner = $wpbFunctionsClass::getBannerHtml( $bannername, $params ); } @@ -123,8 +124,8 @@ if ( $wpbFunctionsClass::validateNamespace( $ns ) && !$title->isMainPage() ) { // first try to obtain bannername from Wikidata $bannername = $wpbFunctionsClass::getAutomaticBanner( $title ); - // add title to template parameters - $paramsForBannerTemplate = [ 'title' => $title ]; + // add title and whether the banner is auto generated to template parameters + $paramsForBannerTemplate = [ 'title' => $title, 'isAutomatic' => true ]; $banner = $wpbFunctionsClass:: getBannerHtml( $bannername, $paramsForBannerTemplate ); // only add banner and styling if valid banner generated -- To view, visit https://gerrit.wikimedia.org/r/324775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1261cca946e8e0e87ad9446233096da4511a1443 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Divadsn Gerrit-Reviewer: Divadsn Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Sumit 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]: db-eqiad.php: Depool db1071 for maintenance
jenkins-bot has submitted this change and it was merged. Change subject: db-eqiad.php: Depool db1071 for maintenance .. db-eqiad.php: Depool db1071 for maintenance db1071 needs an ALTER table. It is serving API, so in order to help with the API load I have pooled db1082 in temporarily Bug: T148967 Change-Id: Ie0174d05d7553ab6e580524659bdbbb031a84847 --- M wmf-config/db-eqiad.php 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c9d6a52..1a902eb 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,8 +143,8 @@ 'db1026' => 1, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager 'db1045' => 0, # 1.4TB 64GB, vslow, dump 'db1070' => 50, # 2.8TB 160GB, api, old master - 'db1071' => 50, # 2.8TB 160GB, api - 'db1082' => 500, # 3.6TB 512GB +# 'db1071' => 50, # 2.8TB 160GB, api #T148967 + 'db1082' => 300, # 3.6TB 512GB, api #Temporarily serving api #T148967 'db1087' => 500, # 3.6TB 512GB 'db1092' => 500, # 3.6TB 512GB ], @@ -359,8 +359,9 @@ 'db1045' => 1, ], 'api' => [ - 'db1070' => 1, - 'db1071' => 1, + 'db1070' => 3, +# 'db1071' => 1, + 'db1082' => 1, ], 'watchlist' => [ 'db1026' => 1, -- To view, visit https://gerrit.wikimedia.org/r/324861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0174d05d7553ab6e580524659bdbbb031a84847 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Marostegui 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]: db-eqiad.php: Depool db1071 for maintenance
Marostegui has uploaded a new change for review. https://gerrit.wikimedia.org/r/324861 Change subject: db-eqiad.php: Depool db1071 for maintenance .. db-eqiad.php: Depool db1071 for maintenance db1071 needs an ALTER table. It is serving API, so in order to help with the API load I have pooled db1082 in temporarily Bug: T148967 Change-Id: Ie0174d05d7553ab6e580524659bdbbb031a84847 --- M wmf-config/db-eqiad.php 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/61/324861/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c9d6a52..2a389c0 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,8 +143,8 @@ 'db1026' => 1, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager 'db1045' => 0, # 1.4TB 64GB, vslow, dump 'db1070' => 50, # 2.8TB 160GB, api, old master - 'db1071' => 50, # 2.8TB 160GB, api - 'db1082' => 500, # 3.6TB 512GB +# 'db1071' => 50, # 2.8TB 160GB, api #T148967 + 'db1082' => 300, # 3.6TB 512GB, api #Temporarily serving api #T148967 'db1087' => 500, # 3.6TB 512GB 'db1092' => 500, # 3.6TB 512GB ], @@ -359,8 +359,9 @@ 'db1045' => 1, ], 'api' => [ - 'db1070' => 1, - 'db1071' => 1, + 'db1082' => 1, + 'db1070' => 3, +# 'db1071' => 1, ], 'watchlist' => [ 'db1026' => 1, -- To view, visit https://gerrit.wikimedia.org/r/324861 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0174d05d7553ab6e580524659bdbbb031a84847 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Switching to a more standard compliant schema
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/324860 Change subject: Switching to a more standard compliant schema .. Switching to a more standard compliant schema * all schema information is now part of the top level "schema" element: "schema": { "fields": [ { "name": "col1", "type": "string" }, ... * Optional "title" inside the above schema-fields allows for column labeling * Top level "description" instead of "info" * Top level "data" instead of "rows" See https://github.com/frictionlessdata/specs/issues/265#issuecomment-264264230 Change-Id: I2dc08940cf9e314d5d822dce8c7cb97052aee99b --- A tests/phpunit/tabular-bad/bad-fields.json A tests/phpunit/tabular-bad/bad-fields2.json M tests/phpunit/tabular-bad/bad-header-symbol.json M tests/phpunit/tabular-bad/bad-license.json A tests/phpunit/tabular-bad/bad-schema.json M tests/phpunit/tabular-bad/bad-summary.json M tests/phpunit/tabular-bad/bad-summary2.json M tests/phpunit/tabular-bad/empty-license.json A tests/phpunit/tabular-bad/extra-field.json A tests/phpunit/tabular-bad/extra-schema.json A tests/phpunit/tabular-bad/extra-top.json D tests/phpunit/tabular-bad/header-bad-type.json A tests/phpunit/tabular-bad/no-field-name.json A tests/phpunit/tabular-bad/no-field-type.json A tests/phpunit/tabular-bad/no-fields.json D tests/phpunit/tabular-bad/no-headers.json M tests/phpunit/tabular-bad/no-license.json M tests/phpunit/tabular-bad/no-rows.json A tests/phpunit/tabular-bad/no-schema.json D tests/phpunit/tabular-bad/no-types.json M tests/phpunit/tabular-bad/row-count-mismatch.json M tests/phpunit/tabular-bad/row-vals-count.json M tests/phpunit/tabular-bad/type-mismatch.json D tests/phpunit/tabular-bad/types-headers-count.json M tests/phpunit/tabular-bad/unknown-license.json M tests/phpunit/tabular-bad/unknown-type.json M tests/phpunit/tabular-good/01.json M tests/phpunit/tabular-good/02.json M tests/phpunit/tabular-good/03.json M tests/phpunit/tabular-good/04.json M tests/phpunit/tabular-good/05.json M tests/phpunit/tabular-good/06.json M tests/phpunit/tabular-good/07.json M tests/phpunit/tabular-good/08.json 34 files changed, 271 insertions(+), 94 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig refs/changes/60/324860/1 diff --git a/tests/phpunit/tabular-bad/bad-fields.json b/tests/phpunit/tabular-bad/bad-fields.json new file mode 100644 index 000..e9e8cb2 --- /dev/null +++ b/tests/phpunit/tabular-bad/bad-fields.json @@ -0,0 +1,7 @@ +{ +"license": "CC0-1.0", +"schema": { +"fields": {} +}, +"data": [] +} diff --git a/tests/phpunit/tabular-bad/bad-fields2.json b/tests/phpunit/tabular-bad/bad-fields2.json new file mode 100644 index 000..b8c2227 --- /dev/null +++ b/tests/phpunit/tabular-bad/bad-fields2.json @@ -0,0 +1,9 @@ +{ +"license": "CC0-1.0", +"schema": { +"fields": [ +[] +] +}, +"data": [] +} diff --git a/tests/phpunit/tabular-bad/bad-header-symbol.json b/tests/phpunit/tabular-bad/bad-header-symbol.json index 7ca880d..acf5611 100644 --- a/tests/phpunit/tabular-bad/bad-header-symbol.json +++ b/tests/phpunit/tabular-bad/bad-header-symbol.json @@ -1,6 +1,12 @@ { "license": "CC0-1.0", -"headers": ["a-b"], -"types": ["string"], -"rows": [] +"schema": { +"fields": [ +{ +"name": "a-b", +"type": "string" +} +] +}, +"data": [] } diff --git a/tests/phpunit/tabular-bad/bad-license.json b/tests/phpunit/tabular-bad/bad-license.json index dad424a..0bc6533 100644 --- a/tests/phpunit/tabular-bad/bad-license.json +++ b/tests/phpunit/tabular-bad/bad-license.json @@ -1,6 +1,14 @@ { -"license": {"en": "blah"}, -"headers": ["col1"], -"types": ["string"], -"rows": [] +"license": { +"en": "blah" +}, +"schema": { +"fields": [ +{ +"name": "col1", +"type": "string" +} +] +}, +"data": [] } diff --git a/tests/phpunit/tabular-bad/bad-schema.json b/tests/phpunit/tabular-bad/bad-schema.json new file mode 100644 index 000..9521273 --- /dev/null +++ b/tests/phpunit/tabular-bad/bad-schema.json @@ -0,0 +1,5 @@ +{ +"license": "CC0-1.0", +"schema": "", +"data": [] +} diff --git a/tests/phpunit/tabular-bad/bad-summary.json b/tests/phpunit/tabular-bad/bad-summary.json index b60c8c5..9b3e118 100644 --- a/tests/phpunit/tabular-bad/bad-summary.json +++ b/tests/phpunit/tabular-bad/bad-summary.json @@ -1,7 +1,10 @@ { -"sources": ["a"], +"sources": [ +"a" +], "license": "CC0-1.0", -"headers": [], -"types": [], -"rows": [] +"schema": { +"fields": [] +}, +"data": [] } diff --git a/tests/phpunit/tabular-bad/bad-summary2.
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Use DOMPurify to sanitize incoming HTML
jenkins-bot has submitted this change and it was merged. Change subject: Use DOMPurify to sanitize incoming HTML .. Use DOMPurify to sanitize incoming HTML Change-Id: I76ce9af4b2ef04a841ce15f339c3189254211131 --- M AUTHORS.txt M build/modules.json A lib/dompurify/LICENSE A lib/dompurify/purify.js M src/dm/ve.dm.Change.js M tests/index.html 6 files changed, 1,296 insertions(+), 2 deletions(-) Approvals: Divec: Looks good to me, approved jenkins-bot: Verified diff --git a/AUTHORS.txt b/AUTHORS.txt index 4fef1b0..e0568a4 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -77,6 +77,11 @@ – Apache license 2.0 – Google, Inc. +DOMPurify + – https://github.com/cure53/DOMPurify + – Apache license 2.0 (dual with MPL 2.0) + – Mario Heiderich and other contributors + jQuery – https://jquery.com/ – MIT license diff --git a/build/modules.json b/build/modules.json index 83f7247..d5e7dd5 100644 --- a/build/modules.json +++ b/build/modules.json @@ -31,6 +31,11 @@ "lib/diff-match-patch/diff_match_patch_uncompressed.js" ] }, + "dompurify": { + "scripts": [ + "lib/dompurify/purify.js" + ] + }, "oojs": { "scripts": [ "lib/oojs/oojs.jquery.js" @@ -616,7 +621,8 @@ "src/dm/ve.dm.RebaseClient.js" ], "dependencies": [ - "visualEditor.core.build" + "visualEditor.core.build", + "dompurify" ] }, "visualEditor.test": { diff --git a/lib/dompurify/LICENSE b/lib/dompurify/LICENSE new file mode 100644 index 000..e099aad --- /dev/null +++ b/lib/dompurify/LICENSE @@ -0,0 +1,378 @@ +DOMPurify +Copyright 2015 Mario Heiderich + +DOMPurify is free software; you can redistribute it and/or modify it under the +terms of either: + +a) the Apache License Version 2.0, or +b) the Mozilla Public License Version 2.0 + +- + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +- +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in +Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version +1.1 or earlier of the License, but not also under the terms of a +Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion +from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License,
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialActiveUsers: escape group names
jenkins-bot has submitted this change and it was merged. Change subject: SpecialActiveUsers: escape group names .. SpecialActiveUsers: escape group names Change-Id: I1a4d1501b8481d9f670916818fe7f75e983c2800 --- M includes/specials/SpecialActiveusers.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 7e29be0..a01e9b2 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -86,7 +86,7 @@ $groups = User::getAllGroups(); foreach ( $groups as $group ) { - $msg = User::getGroupName( $group ); + $msg = htmlspecialchars( User::getGroupName( $group ) ); $options[$msg] = $group; } -- To view, visit https://gerrit.wikimedia.org/r/324443 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a4d1501b8481d9f670916818fe7f75e983c2800 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Florianschmidtwelzow 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] mediawiki...SpamRegex[master]: Use the EditFilterMergedContent hook to run page creations t...
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324859 Change subject: Use the EditFilterMergedContent hook to run page creations through SpamRegex .. Use the EditFilterMergedContent hook to run page creations through SpamRegex The errorbox stuff is slightly ugly-ish, but whatever, I copied that from ConfirmEdit. Bug: T152178 Change-Id: I48f6fcbf5642d2c27866a03ea32e4af96b95c902 --- M backend/SpamRegexHooks.php M extension.json 2 files changed, 44 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex refs/changes/59/324859/1 diff --git a/backend/SpamRegexHooks.php b/backend/SpamRegexHooks.php index c15501f..90231aa 100644 --- a/backend/SpamRegexHooks.php +++ b/backend/SpamRegexHooks.php @@ -9,17 +9,16 @@ /** * Main hook handler for edits * -* @param EditPage $editPage -* @param string $text Page text -* @param $section -* @param string $error Error message, if any -* @param string $editSummary User-supplied edit summary +* @param Context $Context +* @param Content $content A content object representing the page text +* @param Status $status Status object for errors etc. +* @param string $editSummary User-supplied summary for this edit +* @param User $user The User obejct representing the person who made this edit * @return bool True if the edit went through, false if it hit the spam filters */ - public static function onEditFilter( $editPage, $text, $section, &$error, $editSummary ) { - global $wgOut; + public static function onEditFilterMergedContent( $context, $content, $status, $editSummary, $user ) { + $title = $context->getTitle(); - $title = $editPage->getTitle(); // allow blocked words to be added to whitelist if ( $title->inNamespace( NS_MEDIAWIKI ) && @@ -32,22 +31,35 @@ // here we get only the phrases for blocking in summaries... $s_phrases = self::fetchRegexData( 0 ); - if ( $s_phrases && ( $editPage->summary != '' ) ) { + if ( $s_phrases && ( $editSummary != '' ) ) { // ...so let's rock with our custom spamPage to indicate that // (since some phrases can be safely in the text and not in a summary // and we do not want to confuse the good users, right?) foreach ( $s_phrases as $s_phrase ) { - if ( preg_match( $s_phrase, $editPage->summary, $s_matches ) ) { - $wgOut->setPageTitle( wfMessage( 'spamprotectiontitle' ) ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->setArticleRelated( false ); + if ( preg_match( $s_phrase, $editSummary, $s_matches ) ) { + $status->value = EditPage::AS_HOOK_ERROR_EXPECTED; + $status->fatal( + new RawMessage( + $context->msg( 'spamprotectiontext' ) . + '' . + Html::element( + 'div', + [ 'class' => 'errorbox' ], + $context->msg( 'spamprotectionmatch', "{$s_matches[0]}" )->parse() + ) . + '' . + $context->msg( 'spamregex-summary' ) + ) + ); - $wgOut->addWikiMsg( 'spamprotectiontext' ); - $wgOut->addWikiMsg( 'spamprotectionmatch', "{$s_matches[0]}" ); - $wgOut->addWikiMsg( 'spamregex-summary' ); + $out = $context->getOutput(); + // These two (maybe three?) lines appear not to be working + // anymore; remove? + $out->setPageTitle( wfMessage( 'spamprotectiontitle' ) ); + $out->setRobotPolicy( 'noindex,nofollow' ); + $out->setArticleRelated( false ); -
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: build: Configure phpcs and fix some small errors
jenkins-bot has submitted this change and it was merged. Change subject: build: Configure phpcs and fix some small errors .. build: Configure phpcs and fix some small errors Some errors were ignored for now and will be fixed in follow-ups. Change-Id: I3f13d23dafa0b13d6af04bf94a931c745087df2b --- M CheckUser.hooks.php M api/ApiQueryCheckUser.php M composer.json M maintenance/importCheckUserLogs.php M maintenance/populateCheckUserTable.php M maintenance/purgeOldData.php A phpcs.xml 7 files changed, 34 insertions(+), 12 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php index 4797c99..00730b4 100755 --- a/CheckUser.hooks.php +++ b/CheckUser.hooks.php @@ -461,7 +461,7 @@ $res = $dbr->select( 'cu_changes', array( 'cuc_ip' ), array( 'cuc_user' => $user->getId() ), - __METHOD__ , + __METHOD__, $options ); @@ -469,7 +469,9 @@ foreach ( $res as $row ) { if ( $row->cuc_ip ) { $id = $block->doAutoblock( $row->cuc_ip ); - if ( $id ) $blockIds[] = $id; + if ( $id ) { + $blockIds[] = $id; + } } } diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php index e315adb..66a4311 100644 --- a/api/ApiQueryCheckUser.php +++ b/api/ApiQueryCheckUser.php @@ -89,7 +89,7 @@ } else { $log_type[] = 'ipedits'; } - $log_type[] = 'ip' ; + $log_type[] = 'ip'; } else { $user_id = User::idFromName( $target ); if ( !$user_id ) { @@ -140,7 +140,7 @@ break; case 'ipusers': - if ( IP::isIPAddress( $target ) ) { + if ( IP::isIPAddress( $target ) ) { $cond = CheckUser::getIpConds( $db, $target, isset( $xff ) ); $this->addWhere( $cond ); $log_type = 'ipusers'; diff --git a/composer.json b/composer.json index 1c63f9e..9e0d685 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,13 @@ { "require-dev": { - "jakub-onderka/php-parallel-lint": "0.9.2" + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "0.7.2" }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" - ] + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ], + "fix": "phpcbf" } } diff --git a/maintenance/importCheckUserLogs.php b/maintenance/importCheckUserLogs.php index f1006ee..14eed61 100644 --- a/maintenance/importCheckUserLogs.php +++ b/maintenance/importCheckUserLogs.php @@ -4,7 +4,7 @@ if ( $IP === false ) { $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); /** * CheckUser old log file importer. diff --git a/maintenance/populateCheckUserTable.php b/maintenance/populateCheckUserTable.php index af87476..edca88b 100644 --- a/maintenance/populateCheckUserTable.php +++ b/maintenance/populateCheckUserTable.php @@ -4,7 +4,7 @@ if ( $IP === false ) { $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); /** * Populate the cu_changes table needed for CheckUser queries with diff --git a/maintenance/purgeOldData.php b/maintenance/purgeOldData.php index d751305..e164c18 100644 --- a/maintenance/purgeOldData.php +++ b/maintenance/purgeOldData.php @@ -2,9 +2,9 @@ if ( getenv( 'MW_INSTALL_PATH' ) ) { $IP = getenv( 'MW_INSTALL_PATH' ); } else { - $IP = dirname( __FILE__ ) . '/../../..'; + $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); class PurgeOldIPAddressData extends Maintenance { public function __construct() { @@ -66,4 +66,4 @@ } $maintClass = "PurgeOldIPAddressData"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 000..4fe
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove Atomic methods from ConnectionManagers
jenkins-bot has submitted this change and it was merged. Change subject: Remove Atomic methods from ConnectionManagers .. Remove Atomic methods from ConnectionManagers Change-Id: I697f63f45975b13af52bc22fced6e4d07e35115f Depends-On: I4341a1b4ff6a67e4c1770faae38e9b126f1bf0bf --- M includes/libs/rdbms/connectionmanager/ConnectionManager.php M includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php M tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php 3 files changed, 0 insertions(+), 116 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/connectionmanager/ConnectionManager.php b/includes/libs/rdbms/connectionmanager/ConnectionManager.php index 6d5d8ab..4f72f77 100644 --- a/includes/libs/rdbms/connectionmanager/ConnectionManager.php +++ b/includes/libs/rdbms/connectionmanager/ConnectionManager.php @@ -138,43 +138,4 @@ return $this->getConnectionRef( DB_REPLICA, $groups ); } - /** -* Begins an atomic section and returns a database connection to the master DB, for updating. -* -* @since 1.29 -* -* @param string $fname -* -* @return Database -*/ - public function beginAtomicSection( $fname ) { - $db = $this->getWriteConnection(); - $db->startAtomic( $fname ); - - return $db; - } - - /** -* @since 1.29 -* -* @param IDatabase $db -* @param string $fname -*/ - public function commitAtomicSection( IDatabase $db, $fname ) { - $db->endAtomic( $fname ); - $this->releaseConnection( $db ); - } - - /** -* @since 1.29 -* -* @param IDatabase $db -* @param string $fname -*/ - public function rollbackAtomicSection( IDatabase $db, $fname ) { - // FIXME: there does not seem to be a clean way to roll back an atomic section?! - $db->rollback( $fname, 'flush' ); - $this->releaseConnection( $db ); - } - } diff --git a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php index 02972e5..e183823 100644 --- a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php +++ b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php @@ -37,7 +37,6 @@ /** * Forces all future calls to getReadConnection() to return a write connection. * Use this before performing read operations that are critical for a future update. -* Calling beginAtomicSection() implies a call to prepareForUpdates(). * * @since 1.29 */ @@ -93,26 +92,6 @@ public function getWriteConnectionRef() { $this->prepareForUpdates(); return parent::getWriteConnectionRef(); - } - - /** -* Begins an atomic section and returns a database connection to the master DB, for updating. -* -* @since 1.29 -* -* @note: This causes all future calls to getReadConnection() to return a connection -* to the master DB, even after commitAtomicSection() or rollbackAtomicSection() have -* been called. -* -* @param string $fname -* -* @return Database -*/ - public function beginAtomicSection( $fname ) { - // Once we have written to master, do not read from replica. - $this->prepareForUpdates(); - - return parent::beginAtomicSection( $fname ); } } diff --git a/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php index 4dcab82..0d54659 100644 --- a/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php +++ b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php @@ -105,60 +105,4 @@ $manager = new SessionConsistentConnectionManager( $lb ); $manager->releaseConnection( $database ); } - - public function testBeginAtomicSection() { - $database = $this->getIDatabaseMock(); - $lb = $this->getLoadBalancerMock(); - - $lb->expects( $this->exactly( 2 ) ) - ->method( 'getConnection' ) - ->with( DB_MASTER ) - ->will( $this->returnValue( $database ) ); - - $database->expects( $this->once() ) - ->method( 'startAtomic' ) - ->will( $this->returnV
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Add test coverage for ResourceLoaderContext:...
jenkins-bot has submitted this change and it was merged. Change subject: resourceloader: Add test coverage for ResourceLoaderContext::msg() .. resourceloader: Add test coverage for ResourceLoaderContext::msg() Brings ResourceLoaderContext coverage to 100%. Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036 --- M tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php index 1093039..baf0b69 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php @@ -104,4 +104,13 @@ $this->assertSame( 'Example', $ctx->getUser() ); $this->assertEquals( 'Example', $ctx->getUserObj()->getName() ); } + + public function testMsg() { + $ctx = new ResourceLoaderContext( $this->getResourceLoader(), new FauxRequest( [ + 'lang' => 'en' + ] ) ); + $msg = $ctx->msg( 'mainpage' ); + $this->assertInstanceOf( Message::class, $msg ); + $this->assertSame( 'Main Page', $msg->useDatabase( false )->plain() ); + } } -- To view, visit https://gerrit.wikimedia.org/r/324858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Add test coverage for ResourceLoaderContext:...
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/324858 Change subject: resourceloader: Add test coverage for ResourceLoaderContext::msg() .. resourceloader: Add test coverage for ResourceLoaderContext::msg() Brings ResourceLoaderContext coverage to 100%. Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036 --- M tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/324858/1 diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php index 1093039..baf0b69 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php @@ -104,4 +104,13 @@ $this->assertSame( 'Example', $ctx->getUser() ); $this->assertEquals( 'Example', $ctx->getUserObj()->getName() ); } + + public function testMsg() { + $ctx = new ResourceLoaderContext( $this->getResourceLoader(), new FauxRequest( [ + 'lang' => 'en' + ] ) ); + $msg = $ctx->msg( 'mainpage' ); + $this->assertInstanceOf( Message::class, $msg ); + $this->assertSame( 'Main Page', $msg->useDatabase( false )->plain() ); + } } -- To view, visit https://gerrit.wikimedia.org/r/324858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Correctly register WikiLove before toolbarView
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/324857 Change subject: Correctly register WikiLove before toolbarView .. Correctly register WikiLove before toolbarView Avoids a race condition Change-Id: I807bd551e628d8bd6cef567299dde34f842ea16e --- M PageTriage.hooks.php 1 file changed, 27 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/57/324857/1 diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php index 9275685..b5ac024 100644 --- a/PageTriage.hooks.php +++ b/PageTriage.hooks.php @@ -550,6 +550,26 @@ 'remoteExtPath' => 'PageTriage/modules' ]; + $toolBaseClass = [ + 'ext.pageTriage.views.toolbar/ext.pageTriage.toolView.js', // abstract class first + ]; + + // Individual tools on toolbar + $tools = [ + 'ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js', // article metadata + 'ext.pageTriage.views.toolbar/ext.pageTriage.minimize.js', // minimize + 'ext.pageTriage.views.toolbar/ext.pageTriage.tags.js', // tagging + 'ext.pageTriage.views.toolbar/ext.pageTriage.mark.js', // mark as reviewed + 'ext.pageTriage.views.toolbar/ext.pageTriage.next.js', // next article + 'ext.pageTriage.views.toolbar/ext.pageTriage.delete.js', // mark for deletion + ]; + + $afterTools = [ + 'ext.pageTriage.views.toolbar/ext.pageTriage.toolbarView.js', // overall toolbar view last + 'external/jquery.effects.core.js', + 'external/jquery.effects.squish.js', + ]; + $module = $template + [ 'dependencies' => [ 'mediawiki.jqueryMsg', @@ -562,18 +582,6 @@ 'jquery.client', 'ext.pageTriage.externalTagsOptions', 'ext.pageTriage.externalDeletionTagsOptions' - ], - 'scripts' => [ - 'ext.pageTriage.views.toolbar/ext.pageTriage.toolView.js', // abstract class first - 'ext.pageTriage.views.toolbar/ext.pageTriage.articleInfo.js', // article metadata - 'ext.pageTriage.views.toolbar/ext.pageTriage.minimize.js', // minimize - 'ext.pageTriage.views.toolbar/ext.pageTriage.tags.js', // tagging - 'ext.pageTriage.views.toolbar/ext.pageTriage.mark.js', // mark as reviewed - 'ext.pageTriage.views.toolbar/ext.pageTriage.next.js', // next article - 'ext.pageTriage.views.toolbar/ext.pageTriage.delete.js', // mark for deletion - 'ext.pageTriage.views.toolbar/ext.pageTriage.toolbarView.js', // overall toolbar view last - 'external/jquery.effects.core.js', - 'external/jquery.effects.squish.js', ], 'styles' => [ 'ext.pageTriage.css', // stuff that's shared across all views @@ -665,7 +673,7 @@ ]; if ( ExtensionRegistry::getInstance()->isLoaded( 'WikiLove' ) ) { - $module['scripts'][] = 'ext.pageTriage.views.toolbar/ext.pageTriage.wikilove.js'; + $tools[] = 'ext.pageTriage.views.toolbar/ext.pageTriage.wikilove.js'; $module['styles'][] = 'ext.pageTriage.views.toolbar/ext.pageTriage.wikilove.css'; $module['messages'] = array_merge( $module['messages'], [ 'pagetriage-wikilove-page-creator', @@ -678,6 +686,12 @@ ] ); } + $module['scripts'] = array_merge( + $toolBaseClass, + $tools, + $afterTools + ); + $resourceLoader->register( 'ext.pageTriage.views.toolbar', $module ); } -- To view, visit https://gerrit.wikimedia.org/r/324857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I807bd551e628d8bd6cef567299dde34f842ea16e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: i18n tweaks requested by Sam
Jack Phoenix has submitted this change and it was merged. Change subject: i18n tweaks requested by Sam .. i18n tweaks requested by Sam Change-Id: I29d6e078756bf5560834bac356bc5891e90717aa --- M backend/spamRegexList.php M i18n/en.json 2 files changed, 6 insertions(+), 5 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 601ea1e..0f13c0f 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -130,10 +130,10 @@ } if ( $row->spam_summary == 1 ) { - if ( $row->spam_textbox == 1 ) { - $desc .= $this->context->msg( 'word-separator' )->escaped(); - } $desc .= $this->context->msg( 'spamregex-summary-log' )->plain(); + if ( $row->spam_textbox == 1 ) { + $desc = $this->context->msg( 'spamregex-text-and-summary-log' )->plain(); + } } $out->addHTML( '' ); diff --git a/i18n/en.json b/i18n/en.json index 2df42fb..30417b0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -30,8 +30,9 @@ "spamregex-phrase-block-text": "block phrase in page text", "spamregex-phrase-block-summary": "block phrase in summary", "spamregex-block-submit": "Block this phrase", - "spamregex-text": "(Text)", - "spamregex-summary-log": "(Summary)", + "spamregex-text": "(text)", + "spamregex-text-and-summary-log": "(text, summary)", + "spamregex-summary-log": "(summary)", "action-spamregex": "block spam phrases", "right-spamregex": "Block spam phrases through [[Special:SpamRegex]]" } -- To view, visit https://gerrit.wikimedia.org/r/324856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29d6e078756bf5560834bac356bc5891e90717aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: i18n tweaks requested by Sam
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324856 Change subject: i18n tweaks requested by Sam .. i18n tweaks requested by Sam Change-Id: I29d6e078756bf5560834bac356bc5891e90717aa --- M backend/spamRegexList.php M i18n/en.json 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex refs/changes/56/324856/1 diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 601ea1e..0f13c0f 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -130,10 +130,10 @@ } if ( $row->spam_summary == 1 ) { - if ( $row->spam_textbox == 1 ) { - $desc .= $this->context->msg( 'word-separator' )->escaped(); - } $desc .= $this->context->msg( 'spamregex-summary-log' )->plain(); + if ( $row->spam_textbox == 1 ) { + $desc = $this->context->msg( 'spamregex-text-and-summary-log' )->plain(); + } } $out->addHTML( '' ); diff --git a/i18n/en.json b/i18n/en.json index 2df42fb..30417b0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -30,8 +30,9 @@ "spamregex-phrase-block-text": "block phrase in page text", "spamregex-phrase-block-summary": "block phrase in summary", "spamregex-block-submit": "Block this phrase", - "spamregex-text": "(Text)", - "spamregex-summary-log": "(Summary)", + "spamregex-text": "(text)", + "spamregex-text-and-summary-log": "(text, summary)", + "spamregex-summary-log": "(summary)", "action-spamregex": "block spam phrases", "right-spamregex": "Block spam phrases through [[Special:SpamRegex]]" } -- To view, visit https://gerrit.wikimedia.org/r/324856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29d6e078756bf5560834bac356bc5891e90717aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: Version 1.4: Allow (or more accurately, require) providing a...
Jack Phoenix has submitted this change and it was merged. Change subject: Version 1.4: Allow (or more accurately, require) providing a reason for blocking a phrase .. Version 1.4: Allow (or more accurately, require) providing a reason for blocking a phrase Per Samantha, empty reasons are not allowed. Bug: T152168 Change-Id: Ibea6f90826a23795836aed1c7f91dedb67928458 --- M backend/spamRegexForm.php M backend/spamRegexList.php M extension.json M i18n/en.json M sql/spam_regex.sql M templates/ui.tmpl.php 6 files changed, 28 insertions(+), 5 deletions(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/backend/spamRegexForm.php b/backend/spamRegexForm.php index 5f9a3f0..98423d0 100644 --- a/backend/spamRegexForm.php +++ b/backend/spamRegexForm.php @@ -11,6 +11,11 @@ public $mBlockedPhrase; /** +* @var string $mBlockedReason Reason for blocking a phrase +*/ + public $mBlockedReason; + + /** * @var bool $mBlockedTextbox Is the phrase to be blocked in article text? */ public $mBlockedTextbox; @@ -36,6 +41,7 @@ // urldecode() to avoid *displaying* \ as %5C etc.; even w/o it the // entries are saved correctly to the DB $this->mBlockedPhrase = $request->getVal( 'wpBlockedPhrase', urldecode( $request->getVal( 'text', $par ) ) ); + $this->mBlockedReason = $request->getVal( 'wpBlockedReason' ); $this->mBlockedTextbox = $request->getCheck( 'wpBlockedTextbox' ) ? 1 : 0; $this->mBlockedSummary = $request->getCheck( 'wpBlockedSummary' ) ? 1 : 0; $this->context = $context; @@ -104,6 +110,12 @@ return; } + /* make sure that we have a good reason for doing all this... */ + if ( !$this->mBlockedReason ) { + $this->showForm( $this->context->msg( 'spamregex-error-no-reason' )->escaped() ); + return; + } + /* insert to memc */ if ( !empty( $this->mBlockedTextbox ) ) { spamRegexList::updateMemcKeys( 'add', $this->mBlockedPhrase, 0 ); @@ -121,7 +133,8 @@ 'spam_timestamp' => wfTimestampNow(), 'spam_user' => $this->context->getUser()->getName(), 'spam_textbox' => $this->mBlockedTextbox, - 'spam_summary' => $this->mBlockedSummary + 'spam_summary' => $this->mBlockedSummary, + 'spam_reason' => $this->mBlockedReason ), __METHOD__, array( 'IGNORE' ) diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 9668145..601ea1e 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -145,7 +145,8 @@ $unblock_phrase, $row->spam_user, $date, - $time + $time, + $row->spam_reason ); $out->addHTML( '' ); } diff --git a/extension.json b/extension.json index 7b95c52..298406c 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Regular Expression Spam Block", - "version": "1.3", + "version": "1.4", "author": [ "Bartek Łapiński", "Alexandre Emsenhuber", diff --git a/i18n/en.json b/i18n/en.json index 4aab62a..2df42fb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -13,7 +13,7 @@ "spamregex-currently-blocked": "'''Currently blocked phrases:'''", "spamregex-move": "The reason you entered contained a blocked phrase.", "spamregex-no-currently-blocked": "'''There are no blocked phrases.'''", - "spamregex-log": "* '''$1''' $2 ([{{SERVER}}$3&text=$4 remove]) added by $5 on $6 at $7", + "spamregex-log": "* '''$1''' $2 ([{{SERVER}}$3&text=$4 remove]) added by $5 on $6 at $7 (reason: $8)", "spamregex-page-title-1": "Block phrase using regular expressions", "spamregex-unblock-success": "Unblock succedeed", "spamregex-unblock-message": "Phrase '''$1''' has been unblocked from editing.", @@ -25,6 +25,8 @@ "spamregex-warning-2": "Please check at least one blocking mode.", "spamregex-already-blocked": "\"$1\" is already blocked", "spamregex-phrase-block": "Phrase to block:", + "spamregex-reason": "Reason:", + "spamregex-error-no-reason": "You need to provide a reason for blocking a phrase!", "spamregex-phrase
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Clear preview when document is modified
jenkins-bot has submitted this change and it was merged. Change subject: Clear preview when document is modified .. Clear preview when document is modified Use same logic for 'Show preview' as for 'Show changes' Change-Id: I69510b426548fca46dc9b0d113b77ad206502b21 --- M modules/ve-mw/init/ve.init.mw.ArticleTarget.js 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: DLynch: 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/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 9e60820..d32c61a 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1001,6 +1001,9 @@ ve.msg( 'visualeditor-loaderror-message', ve.getProp( details, 'error', 'info' ) || 'Failed to connect' ) ).html() ); } + target.getSurface().getModel().getDocument().once( 'transact', + target.saveDialog.clearDiff.bind( target.saveDialog ) + ); } ); } else { this.saveDialog.swapPanel( 'preview' ); -- To view, visit https://gerrit.wikimedia.org/r/323859 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69510b426548fca46dc9b0d113b77ad206502b21 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-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...SpamRegex[master]: Version 1.4: Allow (or more accurately, require) providing a...
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324855 Change subject: Version 1.4: Allow (or more accurately, require) providing a reason for blocking a phrase .. Version 1.4: Allow (or more accurately, require) providing a reason for blocking a phrase Per Samantha, empty reasons are not allowed. Bug: T152168 Change-Id: Ibea6f90826a23795836aed1c7f91dedb67928458 --- M backend/spamRegexForm.php M backend/spamRegexList.php M extension.json M i18n/en.json M sql/spam_regex.sql M templates/ui.tmpl.php 6 files changed, 28 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex refs/changes/55/324855/1 diff --git a/backend/spamRegexForm.php b/backend/spamRegexForm.php index 5f9a3f0..98423d0 100644 --- a/backend/spamRegexForm.php +++ b/backend/spamRegexForm.php @@ -11,6 +11,11 @@ public $mBlockedPhrase; /** +* @var string $mBlockedReason Reason for blocking a phrase +*/ + public $mBlockedReason; + + /** * @var bool $mBlockedTextbox Is the phrase to be blocked in article text? */ public $mBlockedTextbox; @@ -36,6 +41,7 @@ // urldecode() to avoid *displaying* \ as %5C etc.; even w/o it the // entries are saved correctly to the DB $this->mBlockedPhrase = $request->getVal( 'wpBlockedPhrase', urldecode( $request->getVal( 'text', $par ) ) ); + $this->mBlockedReason = $request->getVal( 'wpBlockedReason' ); $this->mBlockedTextbox = $request->getCheck( 'wpBlockedTextbox' ) ? 1 : 0; $this->mBlockedSummary = $request->getCheck( 'wpBlockedSummary' ) ? 1 : 0; $this->context = $context; @@ -104,6 +110,12 @@ return; } + /* make sure that we have a good reason for doing all this... */ + if ( !$this->mBlockedReason ) { + $this->showForm( $this->context->msg( 'spamregex-error-no-reason' )->escaped() ); + return; + } + /* insert to memc */ if ( !empty( $this->mBlockedTextbox ) ) { spamRegexList::updateMemcKeys( 'add', $this->mBlockedPhrase, 0 ); @@ -121,7 +133,8 @@ 'spam_timestamp' => wfTimestampNow(), 'spam_user' => $this->context->getUser()->getName(), 'spam_textbox' => $this->mBlockedTextbox, - 'spam_summary' => $this->mBlockedSummary + 'spam_summary' => $this->mBlockedSummary, + 'spam_reason' => $this->mBlockedReason ), __METHOD__, array( 'IGNORE' ) diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 9668145..601ea1e 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -145,7 +145,8 @@ $unblock_phrase, $row->spam_user, $date, - $time + $time, + $row->spam_reason ); $out->addHTML( '' ); } diff --git a/extension.json b/extension.json index 7b95c52..298406c 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Regular Expression Spam Block", - "version": "1.3", + "version": "1.4", "author": [ "Bartek Łapiński", "Alexandre Emsenhuber", diff --git a/i18n/en.json b/i18n/en.json index 4aab62a..2df42fb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -13,7 +13,7 @@ "spamregex-currently-blocked": "'''Currently blocked phrases:'''", "spamregex-move": "The reason you entered contained a blocked phrase.", "spamregex-no-currently-blocked": "'''There are no blocked phrases.'''", - "spamregex-log": "* '''$1''' $2 ([{{SERVER}}$3&text=$4 remove]) added by $5 on $6 at $7", + "spamregex-log": "* '''$1''' $2 ([{{SERVER}}$3&text=$4 remove]) added by $5 on $6 at $7 (reason: $8)", "spamregex-page-title-1": "Block phrase using regular expressions", "spamregex-unblock-success": "Unblock succedeed", "spamregex-unblock-message": "Phrase '''$1''' has been unblocked from editing.", @@ -25,6 +25,8 @@ "spamregex-warning-2": "Please check at least one blocking mode.", "spamregex-already-blocked": "\"$1\" is already blocked", "spamregex-phrase-block": "Phrase to block:", + "spamregex-reason": "Reason:", + "spamregex-error-no-reason": "You need to
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: build: Configure phpcs and fix some small errors
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/324853 Change subject: build: Configure phpcs and fix some small errors .. build: Configure phpcs and fix some small errors Some errors were ignored for now and will be fixed in follow-ups. Change-Id: I3f13d23dafa0b13d6af04bf94a931c745087df2b --- M CheckUser.hooks.php M api/ApiQueryCheckUser.php M composer.json M maintenance/importCheckUserLogs.php M maintenance/populateCheckUserTable.php M maintenance/purgeOldData.php A phpcs.xml 7 files changed, 34 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/53/324853/1 diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php index 4797c99..00730b4 100755 --- a/CheckUser.hooks.php +++ b/CheckUser.hooks.php @@ -461,7 +461,7 @@ $res = $dbr->select( 'cu_changes', array( 'cuc_ip' ), array( 'cuc_user' => $user->getId() ), - __METHOD__ , + __METHOD__, $options ); @@ -469,7 +469,9 @@ foreach ( $res as $row ) { if ( $row->cuc_ip ) { $id = $block->doAutoblock( $row->cuc_ip ); - if ( $id ) $blockIds[] = $id; + if ( $id ) { + $blockIds[] = $id; + } } } diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php index e315adb..66a4311 100644 --- a/api/ApiQueryCheckUser.php +++ b/api/ApiQueryCheckUser.php @@ -89,7 +89,7 @@ } else { $log_type[] = 'ipedits'; } - $log_type[] = 'ip' ; + $log_type[] = 'ip'; } else { $user_id = User::idFromName( $target ); if ( !$user_id ) { @@ -140,7 +140,7 @@ break; case 'ipusers': - if ( IP::isIPAddress( $target ) ) { + if ( IP::isIPAddress( $target ) ) { $cond = CheckUser::getIpConds( $db, $target, isset( $xff ) ); $this->addWhere( $cond ); $log_type = 'ipusers'; diff --git a/composer.json b/composer.json index 1c63f9e..9e0d685 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,13 @@ { "require-dev": { - "jakub-onderka/php-parallel-lint": "0.9.2" + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "0.7.2" }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" - ] + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ], + "fix": "phpcbf" } } diff --git a/maintenance/importCheckUserLogs.php b/maintenance/importCheckUserLogs.php index f1006ee..14eed61 100644 --- a/maintenance/importCheckUserLogs.php +++ b/maintenance/importCheckUserLogs.php @@ -4,7 +4,7 @@ if ( $IP === false ) { $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); /** * CheckUser old log file importer. diff --git a/maintenance/populateCheckUserTable.php b/maintenance/populateCheckUserTable.php index af87476..edca88b 100644 --- a/maintenance/populateCheckUserTable.php +++ b/maintenance/populateCheckUserTable.php @@ -4,7 +4,7 @@ if ( $IP === false ) { $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); /** * Populate the cu_changes table needed for CheckUser queries with diff --git a/maintenance/purgeOldData.php b/maintenance/purgeOldData.php index d751305..e164c18 100644 --- a/maintenance/purgeOldData.php +++ b/maintenance/purgeOldData.php @@ -2,9 +2,9 @@ if ( getenv( 'MW_INSTALL_PATH' ) ) { $IP = getenv( 'MW_INSTALL_PATH' ); } else { - $IP = dirname( __FILE__ ) . '/../../..'; + $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); class PurgeOldIPAddressData extends Maintenance { public function __construct() { @@ -66,4 +66,4 @@ } $maintClass = "PurgeOldIPAddressData"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/phpcs
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Convert array() to []
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/324854 Change subject: Convert array() to [] .. Convert array() to [] Change-Id: I915817daedb7cd9201da5fee5fe0db57f90f0f84 --- M CheckUser.hooks.php M CheckUser.php M CheckUserEncryptedData.php M CheckUserLogPager.php M api/ApiQueryCheckUser.php M api/ApiQueryCheckUserLog.php M maintenance/importCheckUserLogs.php M maintenance/populateCheckUserTable.php M maintenance/purgeOldData.php M phpcs.xml M specials/SpecialCheckUser.php M specials/SpecialCheckUserLog.php 12 files changed, 271 insertions(+), 274 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/54/324854/1 diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php index 00730b4..fcf6fdd 100755 --- a/CheckUser.hooks.php +++ b/CheckUser.hooks.php @@ -56,7 +56,7 @@ $dbw = wfGetDB( DB_MASTER ); $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' ); - $rcRow = array( + $rcRow = [ 'cuc_id' => $cuc_id, 'cuc_namespace' => $attribs['rc_namespace'], 'cuc_title' => $attribs['rc_title'], @@ -74,13 +74,13 @@ 'cuc_xff'=> !$isSquidOnly ? $xff : '', 'cuc_xff_hex'=> ( $xff_ip && !$isSquidOnly ) ? IP::toHex( $xff_ip ) : null, 'cuc_agent' => $agent - ); + ]; # On PG, MW unsets cur_id due to schema incompatibilites. So it may not be set! if ( isset( $attribs['rc_cur_id'] ) ) { $rcRow['cuc_page_id'] = $attribs['rc_cur_id']; } - Hooks::run( 'CheckUserInsertForRecentChange', array( $rc, &$rcRow ) ); + Hooks::run( 'CheckUserInsertForRecentChange', [ $rc, &$rcRow ] ); $dbw->insert( 'cu_changes', $rcRow, __METHOD__ ); return true; @@ -105,7 +105,7 @@ $agent = $wgRequest->getHeader( 'User-Agent' ); $dbw = wfGetDB( DB_MASTER ); $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' ); - $rcRow = array( + $rcRow = [ 'cuc_id' => $cuc_id, 'cuc_namespace' => NS_USER, 'cuc_title' => '', @@ -124,7 +124,7 @@ 'cuc_xff'=> !$isSquidOnly ? $xff : '', 'cuc_xff_hex'=> ( $xff_ip && !$isSquidOnly ) ? IP::toHex( $xff_ip ) : null, 'cuc_agent' => $agent - ); + ]; $dbw->insert( 'cu_changes', $rcRow, __METHOD__ ); return true; @@ -160,7 +160,7 @@ $agent = $wgRequest->getHeader( 'User-Agent' ); $dbw = wfGetDB( DB_MASTER ); $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' ); - $rcRow = array( + $rcRow = [ 'cuc_id' => $cuc_id, 'cuc_namespace' => NS_USER, 'cuc_title' => '', @@ -179,11 +179,11 @@ 'cuc_xff'=> !$isSquidOnly ? $xff : '', 'cuc_xff_hex'=> ( $xff_ip && !$isSquidOnly ) ? IP::toHex( $xff_ip ) : null, 'cuc_agent' => $agent - ); + ]; if ( trim( $wgCUPublicKey ) != '' ) { $privateData = $userTo->getEmail() . ":" . $userTo->getId(); $encryptedData = new CheckUserEncryptedData( $privateData, $wgCUPublicKey ); - $rcRow = array_merge( $rcRow, array( 'cuc_private' => serialize( $encryptedData ) ) ); + $rcRow = array_merge( $rcRow, [ 'cuc_private' => serialize( $encryptedData ) ] ); } $dbw->insert( 'cu_changes', $rcRow, __METHOD__ ); @@ -223,7 +223,7 @@ $agent = $wgRequest->getHeader( 'User-Agent' ); $dbw = wfGetDB( DB_MASTER ); $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' ); - $rcRow = array( + $rcRow = [ 'cuc_id' => $cuc_id, 'cuc_page_id'=> 0, 'cuc_namespace' => NS_USER, @@ -242,7 +242,7 @@ 'cuc_xff'=> !$isSquidOnly ? $xff : '', 'cuc_xff_hex'=> ( $xff_ip && !$isSquidOnly ) ? IP::toHex( $xff_ip ) : null, 'cuc_agent' => $agent - ); + ]; $dbw->insert( 'cu_changes', $rcRow, __METHOD__ ); return true; @@ -262,13 +262,13 @@
[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Add Czech aliases of CheckUser special pages
jenkins-bot has submitted this change and it was merged. Change subject: Add Czech aliases of CheckUser special pages .. Add Czech aliases of CheckUser special pages Change-Id: Ib00a4f6a761a7c902e8cbc32cae2dc78ac3c9844 --- M CheckUser.alias.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/CheckUser.alias.php b/CheckUser.alias.php index 7076256..01411b7 100644 --- a/CheckUser.alias.php +++ b/CheckUser.alias.php @@ -89,6 +89,11 @@ 'CheckUserLog' => array( 'Декъашхойн_нисдарийн_тептар' ), ); +$specialPageAliases['cs'] = array( + 'CheckUser' => array('Zkontrolovat uživatele'), + 'CheckUserLog' => array('Protokolovací záznamy kontrol uživatele'), +); + /** German (Deutsch) */ $specialPageAliases['de'] = array( 'CheckUser' => array( 'Checkuser' ), @@ -460,4 +465,4 @@ $specialPageAliases['zh-hk'] = array( 'CheckUser' => array( '用戶查核' ), 'CheckUserLog' => array( '用戶查核日誌' ), -); \ No newline at end of file +); -- To view, visit https://gerrit.wikimedia.org/r/313845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib00a4f6a761a7c902e8cbc32cae2dc78ac3c9844 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: Urbanecm 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] search/extra[master]: [WIP] Port learn to rank from solr cloud
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324852 Change subject: [WIP] Port learn to rank from solr cloud .. [WIP] Port learn to rank from solr cloud https://issues.apache.org/jira/browse/SOLR-8542 This does not in any way work yet. But it does compile (without the tests...). Needs REST api's implemented for uploading models. Needs MultipleAdditiveTree's ported to use ranklib LambdaMART models. The model and feature store's need to be properly managed with the elasticsearch lifecycle. Probably lots more. This might also make more sense in a separate repository. But for the moment this was an easy place to get started working out what might be possible. Change-Id: I00c499c207ba7de05b396c928d7c1c172ac72431 --- M src/main/java/org/wikimedia/search/extra/ExtraPlugin.java A src/main/java/org/wikimedia/search/extra/ltr/.LTRScoringQueryBuilder.java.swp A src/main/java/org/wikimedia/search/extra/ltr/DocInfo.java A src/main/java/org/wikimedia/search/extra/ltr/FeatureLogger.java A src/main/java/org/wikimedia/search/extra/ltr/LTRScoringQuery.java A src/main/java/org/wikimedia/search/extra/ltr/LTRScoringQueryBuilder.java A src/main/java/org/wikimedia/search/extra/ltr/LTRScoringQueryParser.java A src/main/java/org/wikimedia/search/extra/ltr/feature/Feature.java A src/main/java/org/wikimedia/search/extra/ltr/feature/FeatureException.java A src/main/java/org/wikimedia/search/extra/ltr/feature/FieldLengthFeature.java A src/main/java/org/wikimedia/search/extra/ltr/feature/FieldValueFeature.java A src/main/java/org/wikimedia/search/extra/ltr/feature/ValueFeature.java A src/main/java/org/wikimedia/search/extra/ltr/feature/package-info.java A src/main/java/org/wikimedia/search/extra/ltr/model/LTRScoringModel.java A src/main/java/org/wikimedia/search/extra/ltr/model/LinearModel.java A src/main/java/org/wikimedia/search/extra/ltr/model/ModelException.java A src/main/java/org/wikimedia/search/extra/ltr/model/package-info.java A src/main/java/org/wikimedia/search/extra/ltr/norm/IdentityNormalizer.java A src/main/java/org/wikimedia/search/extra/ltr/norm/MinMaxNormalizer.java A src/main/java/org/wikimedia/search/extra/ltr/norm/Normalizer.java A src/main/java/org/wikimedia/search/extra/ltr/norm/NormalizerException.java A src/main/java/org/wikimedia/search/extra/ltr/norm/StandardNormalizer.java A src/main/java/org/wikimedia/search/extra/ltr/norm/package-info.java A src/main/java/org/wikimedia/search/extra/ltr/package-info.java A src/main/java/org/wikimedia/search/extra/ltr/store/FeatureStore.java A src/main/java/org/wikimedia/search/extra/ltr/store/LTRStoreService.java A src/main/java/org/wikimedia/search/extra/ltr/store/ModelStore.java A src/main/java/org/wikimedia/search/extra/ltr/store/package-info.java 28 files changed, 2,839 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/search/extra refs/changes/52/324852/1 diff --git a/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java b/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java index 7e993db..c19e5f0 100644 --- a/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java +++ b/src/main/java/org/wikimedia/search/extra/ExtraPlugin.java @@ -14,6 +14,8 @@ import org.wikimedia.search.extra.analysis.filters.PreserveOriginalFilterFactory; import org.wikimedia.search.extra.fuzzylike.FuzzyLikeThisQueryParser; import org.wikimedia.search.extra.idhashmod.IdHashModQueryParser; +//import org.wikimedia.search.extra.ltr.LTRScoringQueryParser; +//import org.wikimedia.search.extra.ltr.store.LTRStoreService; import org.wikimedia.search.extra.levenshtein.LevenshteinDistanceScoreParser; import org.wikimedia.search.extra.regex.SourceRegexQueryParser; import org.wikimedia.search.extra.superdetectnoop.ChangeHandler; @@ -43,6 +45,7 @@ module.registerQueryParser(SourceRegexQueryParser.class); module.registerQueryParser(IdHashModQueryParser.class); module.registerQueryParser(FuzzyLikeThisQueryParser.class); +//module.registerQueryParser(LTRScoringQueryParser.class); } /** @@ -70,7 +73,9 @@ @Override public Collection nodeModules() { -return Collections.singleton(new CloseEnoughDetectorsModule()); +return Collections.singleton( +new CloseEnoughDetectorsModule()); +//new LTRStoreModule()); } public static class CloseEnoughDetectorsModule extends AbstractModule { @@ -84,4 +89,11 @@ handlers.addBinding().toInstance(new SetHandler.Recognizer()); } } + +public static class LTRStoreModule extends AbstractModule { +@Override +protected void configure() { +//bind(LTRStoreService.class).asEagerSingleton(); +} +} } diff --git a/src/main/java/org/wikimedia/search/extra/ltr/.LTRScoringQueryBuilder.java.swp b/src/main/java/org/wikimedia/search/extra/ltr/.LTRScoringQueryBuilder
[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: cluster.addresses to whitelist iridium and phab...
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/324851 Change subject: phabricator: cluster.addresses to whitelist iridium and phab2001 .. phabricator: cluster.addresses to whitelist iridium and phab2001 Bug: T137928 Change-Id: Ic606ed8554e21ce10fdfc777fcf0e0cf9afeea78 --- M modules/phabricator/data/fixed_settings.yaml 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/324851/1 diff --git a/modules/phabricator/data/fixed_settings.yaml b/modules/phabricator/data/fixed_settings.yaml index cec1952..8417330 100644 --- a/modules/phabricator/data/fixed_settings.yaml +++ b/modules/phabricator/data/fixed_settings.yaml @@ -5,6 +5,10 @@ # in Phabricator but only for administrators. If you do not have the ability to restart the # associated daemons do not merge changes to this file. +cluster.addresses: + - 10.192.32.147/32 + - 10.64.32.150/32 + ui.logo: 'logoImagePHID': 'PHID-FILE-rs3pf2brupiulr6zcnrg' 'wordmarkText': 'Phabricator' -- To view, visit https://gerrit.wikimedia.org/r/324851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic606ed8554e21ce10fdfc777fcf0e0cf9afeea78 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: Cache fix to ensure that the list of blocked entries shows u...
Jack Phoenix has submitted this change and it was merged. Change subject: Cache fix to ensure that the list of blocked entries shows up correctly .. Cache fix to ensure that the list of blocked entries shows up correctly Previously on cache miss the whole "query DB for accurate data" loop would be skipped altogether and $results (which is set to 0 just above the aforementioned loop) would be returned, hence the UI wrongly claiming that there are no blocked entries when in fact the spam_regex table had some entries. HT SamanthaNguyen Change-Id: I2d2db935df59f1b0c029b23c31f922a0528e1bec --- M backend/spamRegexList.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 4e782ce..9668145 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -199,7 +199,7 @@ $cached = $wgMemc->get( $key ); $results = 0; - if ( is_null( $cached ) || $cached === false ) { + if ( !$cached || is_null( $cached ) || $cached === false ) { $dbr = wfGetDB( DB_SLAVE ); $results = $dbr->selectField( 'spam_regex', 'COUNT(*)', '', __METHOD__ ); $wgMemc->set( $key, $results, 0 ); -- To view, visit https://gerrit.wikimedia.org/r/324850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d2db935df59f1b0c029b23c31f922a0528e1bec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: Cache fix to ensure that the list of blocked entries shows u...
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324850 Change subject: Cache fix to ensure that the list of blocked entries shows up correctly .. Cache fix to ensure that the list of blocked entries shows up correctly Previously on cache miss the whole "query DB for accurate data" loop would be skipped altogether and $results (which is set to 0 just above the aforementioned loop) would be returned, hence the UI wrongly claiming that there are no blocked entries when in fact the spam_regex table had some entries. HT SamanthaNguyen Change-Id: I2d2db935df59f1b0c029b23c31f922a0528e1bec --- M backend/spamRegexList.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex refs/changes/50/324850/1 diff --git a/backend/spamRegexList.php b/backend/spamRegexList.php index 4e782ce..9668145 100644 --- a/backend/spamRegexList.php +++ b/backend/spamRegexList.php @@ -199,7 +199,7 @@ $cached = $wgMemc->get( $key ); $results = 0; - if ( is_null( $cached ) || $cached === false ) { + if ( !$cached || is_null( $cached ) || $cached === false ) { $dbr = wfGetDB( DB_SLAVE ); $results = $dbr->selectField( 'spam_regex', 'COUNT(*)', '', __METHOD__ ); $wgMemc->set( $key, $results, 0 ); -- To view, visit https://gerrit.wikimedia.org/r/324850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d2db935df59f1b0c029b23c31f922a0528e1bec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Fix closing map by going back sometimes not working
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/324849 Change subject: Fix closing map by going back sometimes not working .. Fix closing map by going back sometimes not working Bug: T151915 Change-Id: I478719a682f4001dc089f5a7439c728c3cf623cf --- M modules/dialog/index.js 1 file changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/49/324849/1 diff --git a/modules/dialog/index.js b/modules/dialog/index.js index 5de18ec..34c705e 100644 --- a/modules/dialog/index.js +++ b/modules/dialog/index.js @@ -32,6 +32,13 @@ windowManager = null; } + function closeIfMapRoute( routeEv ) { + var isMapRoute = routeEv.path.slice( 0, 5 ) === '/map/' || routeEv.path.slice( 0, 9 ) === '/maplink/'; + if ( !isMapRoute ) { + close(); + } + } + return { /** * Opens the map dialog and renders the map. @@ -44,9 +51,7 @@ dialog = getMapDialog(); if ( map.useRouter && !routerEnabled ) { - router.route( '', function () { - close(); - } ); + router.on( 'route', closeIfMapRoute ); } if ( !window.opened ) { @@ -90,9 +95,7 @@ map = mw.loader.require( 'ext.kartographer.box' ).map( mapObject ); if ( map.useRouter && !routerEnabled ) { - router.route( '', function () { - close(); - } ); + router.on( 'route', closeIfMapRoute ); } dialog.setup.call( dialog, { map: map } ); -- To view, visit https://gerrit.wikimedia.org/r/324849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I478719a682f4001dc089f5a7439c728c3cf623cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: JGirault ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Basic PatchManager unit tests
jenkins-bot has submitted this change and it was merged. Change subject: Basic PatchManager unit tests .. Basic PatchManager unit tests Tests to make sure it generates proper diff output. Bug: T130805 Change-Id: Ic85d8f41583ad1c64ab1316e92528c6773db15cd --- M tests/diff_tests.py 1 file changed, 86 insertions(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/diff_tests.py b/tests/diff_tests.py index a96921d..cbdc76d 100644 --- a/tests/diff_tests.py +++ b/tests/diff_tests.py @@ -11,7 +11,7 @@ import sys -from pywikibot.diff import html_comparator +from pywikibot.diff import html_comparator, PatchManager from pywikibot.tools import PY2 from tests import join_html_data_path @@ -97,7 +97,7 @@ side_effect=ImportError, autospec=True) class TestNoBeautifulSoup(TestCase): -"""Test functions when BeautifulSoup is not installes.""" +"""Test functions when BeautifulSoup is not installed.""" net = False @@ -108,6 +108,90 @@ self.assertIn('bs4', mocked_import.call_args[0]) +class TestPatchManager(TestCase): + +"""Test PatchManager class with given strings as test cases.""" + +net = False + +# each tuple: (before, after, expected hunks +cases = [(' test', + '_test', + {0: '@@ -1 +1 @@\n\n' + '- test\n' + '? ^\n' + '+ _test\n' + '? ^\n'}), + ('The quick brown fox jumps over the lazy dog.', + 'quick brown dog jumps quickly over the lazy fox.', + {0: '@@ -1 +1 @@\n\n' + '- The quick brown fox jumps over the lazy dog.\n' + '? ^ ^ ^ ^\n' + '+ quick brown dog jumps quickly over the lazy fox.\n' + '? ^ ^ ^ ^\n'}), + ('spam', + 'eggs', + {0: '@@ -1 +1 @@\n\n' + '- spam\n' + '+ eggs\n'}), + ('Lorem\n' + 'ipsum\n' + 'dolor', + 'Quorem\n' + 'ipsum\n' + 'dolom', + {0: '@@ -1 +1 @@\n\n' + '- Lorem\n' + '? ^\n' + '+ Quorem\n' + '? ^^\n', + 1: '@@ -3 +3 @@\n\n' + '- dolor\n' + '? ^\n' + '+ dolom\n' + '? ^\n'}), + ('.foola.Pywikipediabot', + '.foo.Pywikipediabot.foo.', + {0: '@@ -1 +1 @@\n\n' + '- .foola.Pywikipediabot\n' + '? --\n' + '+ .foo.Pywikipediabot.foo.\n' + '?+\n'}), + ('{foola}Pywikipediabot', + '{foo}Pywikipediabot{foo}', + {0: '@@ -1 +1 @@\n\n' + '- {foola}Pywikipediabot\n' + '? --\n' + '+ {foo}Pywikipediabot{foo}\n' + '?+\n'}), + ('{default}Foo bar Pywikipediabot foo bar', + '{default}Foo bar Pywikipediabot foo bar', + {0: '@@ -1 +1 @@\n\n' + '- {default}Foo bar Pywikipediabot foo bar\n' + '+ {default}Foo bar Pywikipediabot foo bar\n' + '? + +++\n'}), + ('Pywikipediabot foo', + 'Pywikipediabot foo', + {0: '@@ -1 +1 @@\n\n' + '- Pywikipediabot foo\n' + '+ Pywikipediabot foo\n' + '?+\n'}), + (' Pywikipediabot', + ' Pywikipediabot ', + {0: '@@ -1 +1 @@\n\n' + '- Pywikipediabot\n' + '?-\n' + '+Pywikipediabot \n' + '? +\n'})] + +def test_patch_manager(self): +"""Test PatchManager.""" +for case in self.cases: +p = PatchManager(case[0], case[1]) +for key in case[2].keys(): # for each hunk +self.assertEqual(p.hunks[key].diff_plain_text, case[2][key]) + + if __name__ == '__main__': # pragma: no cover try: unittest.main() -- To view, visit https://gerrit.wikimedia.org/r/324724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic85d8f41583ad1c64ab1316e92528c6773db15cd Gerrit-PatchSet: 5 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Sn1per Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Sn1per Gerrit-Reviewer: XZise Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mail
[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Address sub-pixel rendering issues of Radio...
VolkerE has uploaded a new change for review. https://gerrit.wikimedia.org/r/324848 Change subject: MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets .. MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets Replace fixed `em` value with computed one based on OOjs UI's root default font-size. Bug: T148941 Change-Id: I8e073e0a21c8e0f55724089323e76a54d8246c9d --- M src/themes/mediawiki/common.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/48/324848/1 diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less index 3553a94..60f14ca 100644 --- a/src/themes/mediawiki/common.less +++ b/src/themes/mediawiki/common.less @@ -124,7 +124,7 @@ // Binary Input Widgets (CheckboxInput, RadioInput, ToggleSwitch) @background-color-input-binary-active: @color-progressive-active; @background-color-input-binary-on: @color-progressive; -@size-input-binary: 1.6em; +@size-input-binary: 20 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // equals `1.5625em`≈`20px` at base `font-size: 12.8px` @border-input-binary: @border-width-default solid @border-color-input-binary; @border-color-input-binary: @border-color-default-active; @border-color-input-binary-active: @color-progressive-active; -- To view, visit https://gerrit.wikimedia.org/r/324848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e073e0a21c8e0f55724089323e76a54d8246c9d Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: Fix path to the SQL file
Jack Phoenix has submitted this change and it was merged. Change subject: Fix path to the SQL file .. Fix path to the SQL file Change-Id: I47c3a5a76843a1e95e9571ace587899264ff54ac --- M backend/SpamRegexHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jack Phoenix: Verified; Looks good to me, approved diff --git a/backend/SpamRegexHooks.php b/backend/SpamRegexHooks.php index cbb3c4e..c15501f 100644 --- a/backend/SpamRegexHooks.php +++ b/backend/SpamRegexHooks.php @@ -148,7 +148,7 @@ * @return bool */ public static function onLoadExtensionSchemaUpdates( $updater ) { - $dir = __DIR__ . '/sql'; + $dir = __DIR__ . '/../sql'; $dbType = $updater->getDB()->getType(); -- To view, visit https://gerrit.wikimedia.org/r/324847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47c3a5a76843a1e95e9571ace587899264ff54ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Properly pass query options when using multi search
jenkins-bot has submitted this change and it was merged. Change subject: Properly pass query options when using multi search .. Properly pass query options when using multi search This looks like a bug in Elastica where all the search options (timeout, terminate_after...) are passed in the header section of the multisearch syntax. Only few options need to go into the header others must be passed in the search request body otherwise they are inneffective. This patch is backport of a PR suggested to ruflin. Change-Id: I7a1e818c7ead0188516771f1f4ba82d2937cb8cc --- M autoload.php M includes/BuildDocument/RedirectsAndIncomingLinks.php A includes/Elastica/MultiSearch.php M includes/OtherIndexes.php M includes/Searcher.php M maintenance/updateSuggesterIndex.php 6 files changed, 42 insertions(+), 5 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 4f493e9..bef7cd0 100644 --- a/autoload.php +++ b/autoload.php @@ -38,6 +38,7 @@ 'CirrusSearch\\DataSender' => __DIR__ . '/includes/DataSender.php', 'CirrusSearch\\Dump' => __DIR__ . '/includes/Dump.php', 'CirrusSearch\\ElasticaErrorHandler' => __DIR__ . '/includes/ElasticaErrorHandler.php', + 'CirrusSearch\\Elastica\\MultiSearch' => __DIR__ . '/includes/Elastica/MultiSearch.php', 'CirrusSearch\\Elastica\\PooledHttp' => __DIR__ . '/includes/Elastica/PooledHttp.php', 'CirrusSearch\\Elastica\\PooledHttps' => __DIR__ . '/includes/Elastica/PooledHttps.php', 'CirrusSearch\\ElasticsearchIntermediary' => __DIR__ . '/includes/ElasticsearchIntermediary.php', diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php b/includes/BuildDocument/RedirectsAndIncomingLinks.php index 80a4ead..0c963f8 100644 --- a/includes/BuildDocument/RedirectsAndIncomingLinks.php +++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php @@ -6,6 +6,7 @@ use CirrusSearch\SearchConfig; use CirrusSearch\SearchRequestLog; use CirrusSearch\Connection; +use CirrusSearch\Elastica\MultiSearch as MultiSearch; use Elastica\Query\BoolQuery; use Elastica\Query\Terms; use MediaWiki\Logger\LoggerFactory; @@ -45,7 +46,7 @@ private $config; /** -* @var \Elastica\Multi\Search +* @var MultiSearch */ private $linkCountMultiSearch; @@ -95,7 +96,7 @@ protected function __construct( SearchConfig $config, Connection $conn ) { parent::__construct( $conn, null, 0 ); $this->config = $config; - $this->linkCountMultiSearch = new \Elastica\Multi\Search( $conn->getClient() ); + $this->linkCountMultiSearch = new MultiSearch( $conn->getClient() ); } private function realBuildDocument( \Elastica\Document $doc, Title $title ) { diff --git a/includes/Elastica/MultiSearch.php b/includes/Elastica/MultiSearch.php new file mode 100644 index 000..070a600 --- /dev/null +++ b/includes/Elastica/MultiSearch.php @@ -0,0 +1,32 @@ +https://github.com/ruflin/Elastica/pull/1224 + */ +class MultiSearch extends \Elastica\Multi\Search { + /** +* @param \Elastica\Search $search +* +* @return string +*/ + protected function _getSearchData(\Elastica\Search $search) { + $header = $this->_getSearchDataHeader($search); + $header = (empty($header)) ? new \stdClass() : $header; + $query = $search->getQuery(); + $toKeep = [ + 'index' => true, + 'types' => true, + 'search_type' => true, + 'routing' => true, + 'preference' => true, + ]; + $queryOptions = array_diff_key( $header, $toKeep ); + $actualHeader = array_intersect_key( $header, $toKeep );; + $data = \Elastica\JSON::stringify($actualHeader)."\n"; + $queryBody = $query->toArray() + $queryOptions; + $data .= \Elastica\JSON::stringify($queryBody)."\n"; + return $data; + } +} diff --git a/includes/OtherIndexes.php b/includes/OtherIndexes.php index 73ec5e7..188c02b 100644 --- a/includes/OtherIndexes.php +++ b/includes/OtherIndexes.php @@ -3,6 +3,7 @@ namespace CirrusSearch; use MediaWiki\Logger\LoggerFactory; +use CirrusSearch\Elastica\MultiSearch as MultiSearch; use Title; /** @@ -84,7 +85,7 @@ $updates = []; // Build multisearch to find ids to update - $findIdsMultiSearch = new \Elastica\Multi\Search( $this->connection->getClient() ); + $findIdsMultiSearch = new MultiSearch( $this->connection->getClient() ); $findIdsClosures = []; foreach ( $ti
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Fix the event sampling being overriden by other events
jenkins-bot has submitted this change and it was merged. Change subject: Fix the event sampling being overriden by other events .. Fix the event sampling being overriden by other events Bug: T152162 Change-Id: I8e9a7240766e6631d7426d46b8c96e73baf66c75 --- M modules/ext.wikimediaEvents.kartographer.js 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.kartographer.js b/modules/ext.wikimediaEvents.kartographer.js index d49789c..41d14fd 100644 --- a/modules/ext.wikimediaEvents.kartographer.js +++ b/modules/ext.wikimediaEvents.kartographer.js @@ -152,16 +152,16 @@ switch ( data.action ) { case 'initialize': data.feature.on( 'click contextmenu', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'map-click', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'map-click', data.isFullScreen, opts ); } ); data.feature.on( 'zoomend', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'zoom', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'zoom', data.isFullScreen, opts ); } ); data.feature.on( 'dragend', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'drag', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'drag', data.isFullScreen, opts ); } ); data.feature.on( 'popupopen', function () { logEvent( data.feature.featureType, 'marker-click', data.isFullScreen, options ); -- To view, visit https://gerrit.wikimedia.org/r/324846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e9a7240766e6631d7426d46b8c96e73baf66c75 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: JGirault Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SpamRegex[master]: Fix path to the SQL file
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324847 Change subject: Fix path to the SQL file .. Fix path to the SQL file Change-Id: I47c3a5a76843a1e95e9571ace587899264ff54ac --- M backend/SpamRegexHooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex refs/changes/47/324847/1 diff --git a/backend/SpamRegexHooks.php b/backend/SpamRegexHooks.php index cbb3c4e..c15501f 100644 --- a/backend/SpamRegexHooks.php +++ b/backend/SpamRegexHooks.php @@ -148,7 +148,7 @@ * @return bool */ public static function onLoadExtensionSchemaUpdates( $updater ) { - $dir = __DIR__ . '/sql'; + $dir = __DIR__ . '/../sql'; $dbType = $updater->getDB()->getType(); -- To view, visit https://gerrit.wikimedia.org/r/324847 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47c3a5a76843a1e95e9571ace587899264ff54ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SpamRegex Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DPLforum[master]: Extension registration support & some cleanup
jenkins-bot has submitted this change and it was merged. Change subject: Extension registration support & some cleanup .. Extension registration support & some cleanup * Moved hooks into their own file, inside the brand new DPLForumHooks class * Added extension.json file for extension registration support * Some random coding style tweaks in DPLforum_body.php * Removed unused $skin variable from DPLForum::buildOutput() * Bumped version number to 3.6.0 Change-Id: I3a43cac50923a9ca56672c5d8f202a4bf0b3fae7 --- A DPLForumHooks.php M DPLforum.php M DPLforum_body.php A extension.json 4 files changed, 109 insertions(+), 56 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/DPLForumHooks.php b/DPLForumHooks.php new file mode 100644 index 000..f2939cf --- /dev/null +++ b/DPLForumHooks.php @@ -0,0 +1,37 @@ + tag with the parser. +* +* @param Parser $parser +* @return bool +*/ + public static function onParserFirstCallInit( &$parser ) { + $parser->setHook( 'forum', array( __CLASS__, 'parseForum' ) ); + $parser->setFunctionHook( 'forumlink', array( new DPLForum(), 'link' ) ); + return true; + } + + /** +* Callback for onParserFirstCallInit() above. +*/ + public static function parseForum( $input, $argv, $parser ) { + $f = new DPLForum(); + return $f->parse( $input, $parser ); + } + + /** +* Register the canonical names for our namespace and its talkspace. +* +* @param array $list Array of namespace numbers with corresponding +* canonical names +* @return bool true +*/ + public static function onCanonicalNamespaces( &$list ) { + $list[NS_FORUM] = 'Forum'; + $list[NS_FORUM_TALK] = 'Forum_talk'; + return true; + } + +} \ No newline at end of file diff --git a/DPLforum.php b/DPLforum.php index d1c60be..2c287ee 100644 --- a/DPLforum.php +++ b/DPLforum.php @@ -32,7 +32,7 @@ 'path' => __FILE__, 'name' => 'DPLforum', 'author' => 'Ross McClure', - 'version' => '3.5.0', + 'version' => '3.6.0', 'url' => 'https://www.mediawiki.org/wiki/Extension:DPLforum', 'descriptionmsg' => 'dplforum-desc', ); @@ -42,41 +42,13 @@ define( 'NS_FORUM_TALK', 111 ); // Hooked functions -$wgHooks['ParserFirstCallInit'][] = 'wfDPLinit'; -$wgHooks['CanonicalNamespaces'][] = 'wfDPLforumCanonicalNamespaces'; +$wgHooks['ParserFirstCallInit'][] = 'DPLForumHooks::onParserFirstCallInit'; +$wgHooks['CanonicalNamespaces'][] = 'DPLForumHooks::onCanonicalNamespaces'; // Set up i18n and autoload the main class -$dir = dirname( __FILE__ ) . '/'; $wgMessagesDirs['DPLforum'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['DPLforum'] = $dir . 'DPLforum.i18n.php'; -$wgExtensionMessagesFiles['DPLforumMagic'] = $dir . 'DPLforum.i18n.magic.php'; -$wgExtensionMessagesFiles['DPLforumNamespaces'] = $dir . 'DPLforum.namespaces.php'; -$wgAutoloadClasses['DPLForum'] = $dir . 'DPLforum_body.php'; - -/** - * @param Parser $parser - * @return bool - */ -function wfDPLinit( &$parser ) { - $parser->setHook( 'forum', 'parseForum' ); - $parser->setFunctionHook( 'forumlink', array( new DPLForum(), 'link' ) ); - return true; -} - -function parseForum( $input, $argv, $parser ) { - $f = new DPLForum(); - return $f->parse( $input, $parser ); -} - -/** - * Register the canonical names for our namespace and its talkspace. - * - * @param array $list array of namespace numbers with corresponding - * canonical names - * @return bool true - */ -function wfDPLforumCanonicalNamespaces( &$list ) { - $list[NS_FORUM] = 'Forum'; - $list[NS_FORUM_TALK] = 'Forum_talk'; - return true; -} +$wgExtensionMessagesFiles['DPLforum'] = __DIR__ . '/DPLforum.i18n.php'; +$wgExtensionMessagesFiles['DPLforumMagic'] = __DIR__ . '/DPLforum.i18n.magic.php'; +$wgExtensionMessagesFiles['DPLforumNamespaces'] = __DIR__ . '/DPLforum.namespaces.php'; +$wgAutoloadClasses['DPLForum'] = __DIR__ . '/DPLforum_body.php'; +$wgAutoloadClasses['DPLForumHooks'] = __DIR__ . '/DPLForumHooks.php'; diff --git a/DPLforum_body.php b/DPLforum_body.php index e620fc6..78a9ef6 100644 --- a/DPLforum_body.php +++ b/DPLforum_body.php @@ -153,7 +153,7 @@ if ( preg_match( "/\\d+(\\D+)(\\d+)/", $cond, $m ) ) { $m[1] = strtr( $m[1], array( ( '&l' . 't;' ) => '<', ( '&g' . 't;' ) => '>' ) ); $m[2] = intval( $m[2] ) - 1; - switch( $m[1] ) { + switch ( $m[1] ) { case '<': return ( $page >= $m[2] ); case '>': @@
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Fix the event sampling being overriden by other events
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/324846 Change subject: Fix the event sampling being overriden by other events .. Fix the event sampling being overriden by other events Bug: T152162 Change-Id: I8e9a7240766e6631d7426d46b8c96e73baf66c75 --- M modules/ext.wikimediaEvents.kartographer.js 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/46/324846/1 diff --git a/modules/ext.wikimediaEvents.kartographer.js b/modules/ext.wikimediaEvents.kartographer.js index d49789c..41d14fd 100644 --- a/modules/ext.wikimediaEvents.kartographer.js +++ b/modules/ext.wikimediaEvents.kartographer.js @@ -152,16 +152,16 @@ switch ( data.action ) { case 'initialize': data.feature.on( 'click contextmenu', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'map-click', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'map-click', data.isFullScreen, opts ); } ); data.feature.on( 'zoomend', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'zoom', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'zoom', data.isFullScreen, opts ); } ); data.feature.on( 'dragend', function () { - options = $.extend( {}, options, { sampling: 100 } ); - logEvent( data.feature.featureType, 'drag', data.isFullScreen, options ); + var opts = $.extend( {}, options, { sampling: 100 } ); + logEvent( data.feature.featureType, 'drag', data.isFullScreen, opts ); } ); data.feature.on( 'popupopen', function () { logEvent( data.feature.featureType, 'marker-click', data.isFullScreen, options ); -- To view, visit https://gerrit.wikimedia.org/r/324846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e9a7240766e6631d7426d46b8c96e73baf66c75 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: JGirault ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Convert to new array syntax
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324845 Change subject: Convert to new array syntax .. Convert to new array syntax Change-Id: Iaec0c9ad47d28559adb8c46a82a00a61fba3602d --- M PageImages.i18n.php M includes/ApiQueryPageImages.php M maintenance/initImageData.php M tests/phpunit/ApiQueryPageImagesTest.php M tests/phpunit/LinksUpdateHookHandlerTest.php 5 files changed, 115 insertions(+), 116 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/45/324845/1 diff --git a/PageImages.i18n.php b/PageImages.i18n.php index d099936..5bb744c 100644 --- a/PageImages.i18n.php +++ b/PageImages.i18n.php @@ -10,12 +10,12 @@ * * This shim maintains compatibility back to MediaWiki 1.17. */ -$messages = array(); +$messages = []; if ( !function_exists( 'wfJsonI18nShim74e07e31dc460199' ) ) { function wfJsonI18nShim74e07e31dc460199( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + $codeSequence = array_merge( [ $code ], $cachedData['fallbackSequence'] ); foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; + $fileName = __DIR__ . "/i18n/$csCode.json"; if ( is_readable( $fileName ) ) { $data = FormatJson::decode( file_get_contents( $fileName ), true ); foreach ( array_keys( $data ) as $key ) { diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index a83f79d..00cf969 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -74,9 +74,9 @@ $params = $this->extractRequestParams(); $prop = array_flip( $params['prop'] ); if ( !count( $prop ) ) { - if ( is_callable( array( $this, 'dieWithError' ) ) ) { + if ( is_callable( [ $this, 'dieWithError' ] ) ) { $this->dieWithError( - array( 'apierror-paramempty', $this->encodeParamName( 'prop' ) ), 'noprop' + [ 'apierror-paramempty', $this->encodeParamName( 'prop' ) ], 'noprop' ); } else { $this->dieUsage( 'No properties selected', '_noprop' ); diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index 9f2af9e..af3453d 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -4,7 +4,7 @@ if ( $IP === false ) { $IP = __DIR__ . '/../../..'; } -require_once( "$IP/maintenance/Maintenance.php" ); +require_once ( "$IP/maintenance/Maintenance.php" ); use MediaWiki\MediaWikiServices; @@ -31,16 +31,16 @@ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); do { - $tables = array( 'page', 'imagelinks' ); - $conds = array( + $tables = [ 'page', 'imagelinks' ]; + $conds = [ 'page_id > ' . (int) $id, 'il_from IS NOT NULL', 'page_is_redirect' => 0, - ); - $fields = array( 'page_id' ); - $joinConds = array( 'imagelinks' => array( + ]; + $fields = [ 'page_id' ]; + $joinConds = [ 'imagelinks' => [ 'LEFT JOIN', 'page_id = il_from', - ) ); + ] ]; $dbr = wfGetDB( DB_SLAVE ); if ( $this->hasOption( 'namespaces' ) ) { @@ -69,4 +69,4 @@ } $maintClass = 'InitImageData'; -require_once( DO_MAINTENANCE ); +require_once ( DO_MAINTENANCE ); diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 1359279..de22c8a 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -94,7 +94,7 @@ public function testGetCacheMode() { $instance = $this->newInstance(); - $this->assertSame( 'public', $instance->getCacheMode( array() ) ); + $this->assertSame( 'public', $instance->getCacheMode( [] ) ); } public function testGetAllowedParams() { @@ -104,7 +104,7 @@ $this->assertNotEmpty( $params ); $this->assertContainsOnly( 'array', $params ); $this->assertArrayHasKey( 'license', $params ); - $this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], ['f
[MediaWiki-commits] [Gerrit] mediawiki...DPLforum[master]: Extension registration support & some cleanup
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/324844 Change subject: Extension registration support & some cleanup .. Extension registration support & some cleanup * Moved hooks into their own file, inside the brand new DPLForumHooks class * Added extension.json file for extension registration support * Some random coding style tweaks in DPLforum_body.php * Removed unused $skin variable from DPLForum::buildOutput() * Bumped version number to 3.6.0 Change-Id: I3a43cac50923a9ca56672c5d8f202a4bf0b3fae7 --- A DPLForumHooks.php M DPLforum.php M DPLforum_body.php A extension.json 4 files changed, 109 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DPLforum refs/changes/44/324844/1 diff --git a/DPLForumHooks.php b/DPLForumHooks.php new file mode 100644 index 000..f2939cf --- /dev/null +++ b/DPLForumHooks.php @@ -0,0 +1,37 @@ + tag with the parser. +* +* @param Parser $parser +* @return bool +*/ + public static function onParserFirstCallInit( &$parser ) { + $parser->setHook( 'forum', array( __CLASS__, 'parseForum' ) ); + $parser->setFunctionHook( 'forumlink', array( new DPLForum(), 'link' ) ); + return true; + } + + /** +* Callback for onParserFirstCallInit() above. +*/ + public static function parseForum( $input, $argv, $parser ) { + $f = new DPLForum(); + return $f->parse( $input, $parser ); + } + + /** +* Register the canonical names for our namespace and its talkspace. +* +* @param array $list Array of namespace numbers with corresponding +* canonical names +* @return bool true +*/ + public static function onCanonicalNamespaces( &$list ) { + $list[NS_FORUM] = 'Forum'; + $list[NS_FORUM_TALK] = 'Forum_talk'; + return true; + } + +} \ No newline at end of file diff --git a/DPLforum.php b/DPLforum.php index d1c60be..2c287ee 100644 --- a/DPLforum.php +++ b/DPLforum.php @@ -32,7 +32,7 @@ 'path' => __FILE__, 'name' => 'DPLforum', 'author' => 'Ross McClure', - 'version' => '3.5.0', + 'version' => '3.6.0', 'url' => 'https://www.mediawiki.org/wiki/Extension:DPLforum', 'descriptionmsg' => 'dplforum-desc', ); @@ -42,41 +42,13 @@ define( 'NS_FORUM_TALK', 111 ); // Hooked functions -$wgHooks['ParserFirstCallInit'][] = 'wfDPLinit'; -$wgHooks['CanonicalNamespaces'][] = 'wfDPLforumCanonicalNamespaces'; +$wgHooks['ParserFirstCallInit'][] = 'DPLForumHooks::onParserFirstCallInit'; +$wgHooks['CanonicalNamespaces'][] = 'DPLForumHooks::onCanonicalNamespaces'; // Set up i18n and autoload the main class -$dir = dirname( __FILE__ ) . '/'; $wgMessagesDirs['DPLforum'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['DPLforum'] = $dir . 'DPLforum.i18n.php'; -$wgExtensionMessagesFiles['DPLforumMagic'] = $dir . 'DPLforum.i18n.magic.php'; -$wgExtensionMessagesFiles['DPLforumNamespaces'] = $dir . 'DPLforum.namespaces.php'; -$wgAutoloadClasses['DPLForum'] = $dir . 'DPLforum_body.php'; - -/** - * @param Parser $parser - * @return bool - */ -function wfDPLinit( &$parser ) { - $parser->setHook( 'forum', 'parseForum' ); - $parser->setFunctionHook( 'forumlink', array( new DPLForum(), 'link' ) ); - return true; -} - -function parseForum( $input, $argv, $parser ) { - $f = new DPLForum(); - return $f->parse( $input, $parser ); -} - -/** - * Register the canonical names for our namespace and its talkspace. - * - * @param array $list array of namespace numbers with corresponding - * canonical names - * @return bool true - */ -function wfDPLforumCanonicalNamespaces( &$list ) { - $list[NS_FORUM] = 'Forum'; - $list[NS_FORUM_TALK] = 'Forum_talk'; - return true; -} +$wgExtensionMessagesFiles['DPLforum'] = __DIR__ . '/DPLforum.i18n.php'; +$wgExtensionMessagesFiles['DPLforumMagic'] = __DIR__ . '/DPLforum.i18n.magic.php'; +$wgExtensionMessagesFiles['DPLforumNamespaces'] = __DIR__ . '/DPLforum.namespaces.php'; +$wgAutoloadClasses['DPLForum'] = __DIR__ . '/DPLforum_body.php'; +$wgAutoloadClasses['DPLForumHooks'] = __DIR__ . '/DPLForumHooks.php'; diff --git a/DPLforum_body.php b/DPLforum_body.php index e620fc6..78a9ef6 100644 --- a/DPLforum_body.php +++ b/DPLforum_body.php @@ -153,7 +153,7 @@ if ( preg_match( "/\\d+(\\D+)(\\d+)/", $cond, $m ) ) { $m[1] = strtr( $m[1], array( ( '&l' . 't;' ) => '<', ( '&g' . 't;' ) => '>' ) ); $m[2] = intval( $m[2] ) - 1; - switch( $m[1] ) { + switch ( $m[1] ) { case '<': return ( $page >
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[wmf/1.29.0-wmf.4]: Cleanup InitImageData
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup InitImageData .. Cleanup InitImageData * Use standard --batch-size parameter * Added --start parameter * Use MediaWikiServices Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 (cherry picked from commit e69dcb670affaaff4df3b14fc11fb97546bc8069) --- M maintenance/initImageData.php 1 file changed, 12 insertions(+), 7 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index b87b1e5..9f2af9e 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -6,24 +6,29 @@ } require_once( "$IP/maintenance/Maintenance.php" ); +use MediaWiki\MediaWikiServices; + /** * @license WTFPL 2.0 * @author Max Semenik */ class InitImageData extends Maintenance { - const BATCH_SIZE = 100; - public function __construct() { parent::__construct(); $this->mDescription = 'Initializes PageImages data'; - $this->addOption( 'namespaces', 'Comma-separated list of namespace(s) to refresh', false, true ); - $this->addOption( 'earlier-than', 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'namespaces', + 'Comma-separated list of namespace(s) to refresh', false, true ); + $this->addOption( 'earlier-than', + 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'start', 'Starting page ID', false, true ); + $this->setBatchSize( 100 ); } public function execute() { global $wgPageImagesNamespaces; - $id = 0; + $id = $this->getOption( 'start', 0 ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); do { $tables = array( 'page', 'imagelinks' ); @@ -49,13 +54,13 @@ . $dbr->addQuotes( $this->getOption( 'earlier-than' ) ); } $res = $dbr->select( $tables, $fields, $conds, __METHOD__, - array( 'LIMIT' => self::BATCH_SIZE, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ), + [ 'LIMIT' => $this->mBatchSize, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ], $joinConds ); foreach ( $res as $row ) { $id = $row->page_id; RefreshLinks::fixLinksFromArticle( $id ); - wfWaitForSlaves(); + $lbFactory->waitForReplication(); } $this->output( "$id\n" ); } while ( $res->numRows() ); -- To view, visit https://gerrit.wikimedia.org/r/324842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: EBernhardson Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: EBernhardson 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...Kartographer[master]: Implement third phase of event logging (Wikivoyage specific)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/324843 Change subject: Implement third phase of event logging (Wikivoyage specific) .. Implement third phase of event logging (Wikivoyage specific) * Data layers now have a convenient reference to their corresponding data group Bug: T151929 Change-Id: I2545a2258dfc3772acf56a5c0589002e18be1b30 --- M modules/box/Map.js M modules/wikivoyage/ControlLayers.js M modules/wikivoyage/ControlNearby.js M modules/wikivoyage/WVMapLayers.js M modules/wikivoyage/wikivoyage.js 5 files changed, 77 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/43/324843/1 diff --git a/modules/box/Map.js b/modules/box/Map.js index 9de5370..7309392 100644 --- a/modules/box/Map.js +++ b/modules/box/Map.js @@ -296,7 +296,8 @@ if ( this.parentMap ) { $.each( this.parentMap.dataLayers, function ( groupId, layer ) { - map.addGeoJSONLayer( groupId, layer.getGeoJSON(), layer.options ); + var newLayer = map.addGeoJSONLayer( groupId, layer.getGeoJSON(), layer.options ); + newLayer.dataGroup = layer.group; } ); ready(); return; @@ -387,13 +388,15 @@ $.each( dataGroups, function ( key, group ) { var layerOptions = { - attribution: group.attribution - }; + attribution: group.attribution + }, + layer; if ( group.isExternal ) { layerOptions.name = group.attribution; } if ( !$.isEmptyObject( group.getGeoJSON() ) ) { - map.addGeoJSONLayer( group.id, group.getGeoJSON(), layerOptions ); + layer = map.addGeoJSONLayer( group.id, group.getGeoJSON(), layerOptions ); + layer.dataGroup = group; } else { mw.log.warn( 'Layer not found or contains no data: "' + group.id + '"' ); } @@ -423,12 +426,14 @@ var groupId = inlineDataLayerKey + inlineDataLayerId++, layerOptions = { attribution: group.attribution || options.attribution - }; + }, + layer; if ( group.isExternal ) { layerOptions.name = group.attribution; } if ( !$.isEmptyObject( group.getGeoJSON() ) ) { - map.addGeoJSONLayer( groupId, group.getGeoJSON(), layerOptions ); + layer = map.addGeoJSONLayer( groupId, group.getGeoJSON(), layerOptions ); + layer.dataGroup = layer; } else { mw.log.warn( 'Layer not found or contains no data: "' + groupId + '"' ); } diff --git a/modules/wikivoyage/ControlLayers.js b/modules/wikivoyage/ControlLayers.js index de20388..351d3ca 100644 --- a/modules/wikivoyage/ControlLayers.js +++ b/modules/wikivoyage/ControlLayers.js @@ -33,6 +33,9 @@ if ( !obj.overlay && label.childNodes[ 0 ].checked ) { this._previousSelected = label.childNodes[ 0 ]; } + if ( obj.layer.dataGroup ) { + label.childNodes[ 0 ].className += ' leaflet-control-layers-data-layer'; + } }, /** @@ -41,6 +44,7 @@ */ _onInputClick: function ( event ) { var self = this, + map = this._map, proto = L.Control.Layers.prototype._onInputClick, input = event && eve
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[wmf/1.29.0-wmf.4]: Cleanup InitImageData
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324842 Change subject: Cleanup InitImageData .. Cleanup InitImageData * Use standard --batch-size parameter * Added --start parameter * Use MediaWikiServices Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 (cherry picked from commit e69dcb670affaaff4df3b14fc11fb97546bc8069) --- M maintenance/initImageData.php 1 file changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/42/324842/1 diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index b87b1e5..9f2af9e 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -6,24 +6,29 @@ } require_once( "$IP/maintenance/Maintenance.php" ); +use MediaWiki\MediaWikiServices; + /** * @license WTFPL 2.0 * @author Max Semenik */ class InitImageData extends Maintenance { - const BATCH_SIZE = 100; - public function __construct() { parent::__construct(); $this->mDescription = 'Initializes PageImages data'; - $this->addOption( 'namespaces', 'Comma-separated list of namespace(s) to refresh', false, true ); - $this->addOption( 'earlier-than', 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'namespaces', + 'Comma-separated list of namespace(s) to refresh', false, true ); + $this->addOption( 'earlier-than', + 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'start', 'Starting page ID', false, true ); + $this->setBatchSize( 100 ); } public function execute() { global $wgPageImagesNamespaces; - $id = 0; + $id = $this->getOption( 'start', 0 ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); do { $tables = array( 'page', 'imagelinks' ); @@ -49,13 +54,13 @@ . $dbr->addQuotes( $this->getOption( 'earlier-than' ) ); } $res = $dbr->select( $tables, $fields, $conds, __METHOD__, - array( 'LIMIT' => self::BATCH_SIZE, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ), + [ 'LIMIT' => $this->mBatchSize, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ], $joinConds ); foreach ( $res as $row ) { $id = $row->page_id; RefreshLinks::fixLinksFromArticle( $id ); - wfWaitForSlaves(); + $lbFactory->waitForReplication(); } $this->output( "$id\n" ); } while ( $res->numRows() ); -- To view, visit https://gerrit.wikimedia.org/r/324842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: EBernhardson Gerrit-Reviewer: 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]: phabricator: enable vcs and web user to run `git` and `ssh` ...
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/324841 Change subject: phabricator: enable vcs and web user to run `git` and `ssh` via sudo .. phabricator: enable vcs and web user to run `git` and `ssh` via sudo This is needed for repository clustering, see: https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/#configuring-sudo Change-Id: I8cb629610428f51b86006d71679c1eb4d96b0719 --- M modules/phabricator/manifests/vcs.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/324841/1 diff --git a/modules/phabricator/manifests/vcs.pp b/modules/phabricator/manifests/vcs.pp index 7581970..1ca573d 100644 --- a/modules/phabricator/manifests/vcs.pp +++ b/modules/phabricator/manifests/vcs.pp @@ -81,14 +81,14 @@ # must sudo to phd to for repo work. sudo::user { $vcs_user: privileges => [ -"ALL=(${phd_user}) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /usr/bin/svnserve", +"ALL=(${phd_user}) SETENV: NOPASSWD: /usr/bin/git, /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /usr/bin/svnserve, /usr/bin/ssh", ], require=> User[$vcs_user], } sudo::user { 'www-data': privileges => [ -"ALL=(${phd_user}) SETENV: NOPASSWD: /usr/local/bin/git-http-backend", +"ALL=(${phd_user}) SETENV: NOPASSWD: /usr/bin/git, /usr/local/bin/git-http-backend, /usr/bin/ssh", ], require=> File['/usr/local/bin/git-http-backend'], } -- To view, visit https://gerrit.wikimedia.org/r/324841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cb629610428f51b86006d71679c1eb4d96b0719 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't hard fail when we couldn't find an entry point for an ...
jenkins-bot has submitted this change and it was merged. Change subject: Don't hard fail when we couldn't find an entry point for an extension .. Don't hard fail when we couldn't find an entry point for an extension It doesn't make a ton of sense, it's just pointing out that we have a weird extension for which we cannot detect a standard entry point for. These (unfortunately) exist, but they're easily worked around using --list-file Removing the hard failure allows you to use the two options in tandem... --extension-dir for the initial pass and then --list-file for the weirdo outstanding ones Change-Id: I3d9cf1d614dacaa91fb2092019ccf1d14d61ccab --- M maintenance/mergeMessageFileList.php 1 file changed, 0 insertions(+), 10 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index a650aa0..bb47631 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -36,11 +36,6 @@ * @ingroup Maintenance */ class MergeMessageFileList extends Maintenance { - /** -* @var bool -*/ - protected $hasError; - function __construct() { parent::__construct(); $this->addOption( @@ -106,7 +101,6 @@ } if ( !$found ) { - $this->hasError = true; $this->error( "Extension {$extname} in {$extdir} lacks expected entry point: " . "extension.json, skin.json, or {$extname}.php." ); } @@ -117,10 +111,6 @@ foreach ( $wgExtensionEntryPointListFiles as $points ) { $extensionPaths = $this->readFile( $points ); $mmfl['setupFiles'] = array_merge( $mmfl['setupFiles'], $extensionPaths ); - } - - if ( $this->hasError ) { - $this->error( "Some files are missing (see above). Giving up.", 1 ); } if ( $this->hasOption( 'output' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/323982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d9cf1d614dacaa91fb2092019ccf1d14d61ccab Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Cleanup InitImageData
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup InitImageData .. Cleanup InitImageData * Use standard --batch-size parameter * Added --start parameter * Use MediaWikiServices Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 --- M maintenance/initImageData.php 1 file changed, 12 insertions(+), 7 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index b87b1e5..9f2af9e 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -6,24 +6,29 @@ } require_once( "$IP/maintenance/Maintenance.php" ); +use MediaWiki\MediaWikiServices; + /** * @license WTFPL 2.0 * @author Max Semenik */ class InitImageData extends Maintenance { - const BATCH_SIZE = 100; - public function __construct() { parent::__construct(); $this->mDescription = 'Initializes PageImages data'; - $this->addOption( 'namespaces', 'Comma-separated list of namespace(s) to refresh', false, true ); - $this->addOption( 'earlier-than', 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'namespaces', + 'Comma-separated list of namespace(s) to refresh', false, true ); + $this->addOption( 'earlier-than', + 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'start', 'Starting page ID', false, true ); + $this->setBatchSize( 100 ); } public function execute() { global $wgPageImagesNamespaces; - $id = 0; + $id = $this->getOption( 'start', 0 ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); do { $tables = array( 'page', 'imagelinks' ); @@ -49,13 +54,13 @@ . $dbr->addQuotes( $this->getOption( 'earlier-than' ) ); } $res = $dbr->select( $tables, $fields, $conds, __METHOD__, - array( 'LIMIT' => self::BATCH_SIZE, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ), + [ 'LIMIT' => $this->mBatchSize, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ], $joinConds ); foreach ( $res as $row ) { $id = $row->page_id; RefreshLinks::fixLinksFromArticle( $id ); - wfWaitForSlaves(); + $lbFactory->waitForReplication(); } $this->output( "$id\n" ); } while ( $res->numRows() ); -- To view, visit https://gerrit.wikimedia.org/r/324840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: EBernhardson 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]: Save Dialog: add shortcut for opening to the review panel
jenkins-bot has submitted this change and it was merged. Change subject: Save Dialog: add shortcut for opening to the review panel .. Save Dialog: add shortcut for opening to the review panel Create a new MWSaveDialogAction, which can be hooked up to triggers. Switch the existing save dialog accesskey to just use the trigger system. (Maintaining all the accesskey logic, so we don't change the shortcut on people.) Bug: T149914 Change-Id: I9b4ef8504148703556f802b266a517dd5098c06b --- M extension.json M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js M modules/ve-mw/init/ve.init.mw.ArticleTarget.js A modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 5 files changed, 124 insertions(+), 25 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 987cf43..d2f1ff7 100644 --- a/extension.json +++ b/extension.json @@ -498,7 +498,8 @@ "scripts": [ "modules/ve-mw/init/ve.init.mw.ArticleTarget.js", "modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js", - "modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js" + "modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js", + "modules/ve-mw/ui/actions/ve.ui.MWSaveDialogAction.js" ], "styles": [ "modules/ve-mw/init/styles/ve.init.mw.ArticleTarget.css", @@ -506,7 +507,8 @@ ], "dependencies": [ "ext.visualEditor.mediawiki", - "ext.visualEditor.core" + "ext.visualEditor.core", + "ext.visualEditor.mwcore" ], "messages": [ "accesskey-save" diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 29c9e80..e185a7f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1046,7 +1046,7 @@ * @inheritdoc */ ve.init.mw.DesktopArticleTarget.prototype.getSaveDialogOpeningData = function () { - var data = ve.init.mw.DesktopArticleTarget.super.prototype.getSaveDialogOpeningData.call( this ); + var data = ve.init.mw.DesktopArticleTarget.super.prototype.getSaveDialogOpeningData.apply( this, arguments ); data.editSummary = this.initialEditSummary; return data; }; diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index ebae4e7..b36d76b 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1773,19 +1773,24 @@ * Handle clicks on the save button in the toolbar. */ ve.init.mw.ArticleTarget.prototype.onToolbarSaveButtonClick = function () { - if ( this.edited || this.restoring ) { - this.showSaveDialog(); - } + this.showSaveDialog(); }; /** * Show a save dialog * + * @param {string} [action] Window action to trigger after opening + * @param {string} [initialPanel] Initial panel to show in the dialog + * * @fires saveWorkflowBegin */ -ve.init.mw.ArticleTarget.prototype.showSaveDialog = function () { +ve.init.mw.ArticleTarget.prototype.showSaveDialog = function ( action, initialPanel ) { var target = this, windowAction = ve.ui.actionFactory.create( 'window', this.getSurface() ); + + if ( !( this.edited || this.restoring ) ) { + return; + } this.emit( 'saveWorkflowBegin' ); @@ -1810,17 +1815,20 @@ } ); // Open the dialog - windowAction.open( 'mwSave', this.getSaveDialogOpeningData() ); + windowAction.open( 'mwSave', this.getSaveDialogOpeningData( initialPanel ), action ); }; /** * Get opening data to pass to the save dialog + * + * @param {string} [initialPanel] Initial panel to show in the dialog */ -ve.init.mw.ArticleTarget.prototype.getSaveDialogOpeningData = function () { +ve.init.mw.ArticleTarget.prototype.getSaveDialogOpeningData = function ( initialPanel ) { return { saveButtonLabel: this.getSaveButtonLabel(), checkboxFields: this.checkboxFields, - checkboxesByName: this.checkboxesByName + checkboxesByName: this.checkboxesByName, + initialPanel: initialPanel }; }; @@ -1990,17 +1998,3 @@ this.welcomeDialogPromise.reject(); } }; - -// Register save button with command help dialog -( fu
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Bump $wgJobBackoffThrottling for cache purges
jenkins-bot has submitted this change and it was merged. Change subject: Bump $wgJobBackoffThrottling for cache purges .. Bump $wgJobBackoffThrottling for cache purges Change-Id: Ic726308d63e21434a6b8b34ed020284cb459d487 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, but someone else must approve Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index be0bef1..187a03d 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2582,7 +2582,7 @@ } # Avoid excessive CPU due to cache misses from rapid invalidations -$wgJobBackoffThrottling['htmlCacheUpdate'] = 20; // pages/sec per runner +$wgJobBackoffThrottling['htmlCacheUpdate'] = 30; // pages/sec per runner # Job types to exclude from the default queue processing. Aka the very long # one. That will exclude the types from any queries such as nextJobDB.php -- To view, visit https://gerrit.wikimedia.org/r/324388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic726308d63e21434a6b8b34ed020284cb459d487 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Krinkle 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...PageImages[master]: Cleanup InitImageData
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/324840 Change subject: Cleanup InitImageData .. Cleanup InitImageData * Use standard --batch-size parameter * Added --start parameter * Use MediaWikiServices Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 --- M maintenance/initImageData.php 1 file changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/40/324840/1 diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index b87b1e5..9f2af9e 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -6,24 +6,29 @@ } require_once( "$IP/maintenance/Maintenance.php" ); +use MediaWiki\MediaWikiServices; + /** * @license WTFPL 2.0 * @author Max Semenik */ class InitImageData extends Maintenance { - const BATCH_SIZE = 100; - public function __construct() { parent::__construct(); $this->mDescription = 'Initializes PageImages data'; - $this->addOption( 'namespaces', 'Comma-separated list of namespace(s) to refresh', false, true ); - $this->addOption( 'earlier-than', 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'namespaces', + 'Comma-separated list of namespace(s) to refresh', false, true ); + $this->addOption( 'earlier-than', + 'Run only on pages earlier than this timestamp', false, true ); + $this->addOption( 'start', 'Starting page ID', false, true ); + $this->setBatchSize( 100 ); } public function execute() { global $wgPageImagesNamespaces; - $id = 0; + $id = $this->getOption( 'start', 0 ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); do { $tables = array( 'page', 'imagelinks' ); @@ -49,13 +54,13 @@ . $dbr->addQuotes( $this->getOption( 'earlier-than' ) ); } $res = $dbr->select( $tables, $fields, $conds, __METHOD__, - array( 'LIMIT' => self::BATCH_SIZE, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ), + [ 'LIMIT' => $this->mBatchSize, 'ORDER_BY' => 'page_id', 'GROUP BY' => 'page_id' ], $joinConds ); foreach ( $res as $row ) { $id = $row->page_id; RefreshLinks::fixLinksFromArticle( $id ); - wfWaitForSlaves(); + $lbFactory->waitForReplication(); } $this->output( "$id\n" ); } while ( $res->numRows() ); -- To view, visit https://gerrit.wikimedia.org/r/324840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5828db7b9fb7ba12eeb3ce3313c4fe7e7926c916 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages 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] mediawiki...PageImages[wmf/1.29.0-wmf.4]: Page images return non-free images by default
jenkins-bot has submitted this change and it was merged. Change subject: Page images return non-free images by default .. Page images return non-free images by default Page images was updated to have a split between the 'best' page image, and the best free page image. Unfortunately the deployment plan didn't take into account that the default 'free' would be pointing to an unpopulated page prop, which will not be populated until LinksUpdate has run for every page on every wiki which could take weeks or months. To restore some semblance of order, make the default point at the currently populated field. A followup will need to be done to populate the appropriate field. Bug: T152155 Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 --- M includes/ApiQueryPageImages.php M tests/phpunit/ApiQueryPageImagesTest.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 4a207d8..78f5165 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -249,7 +249,7 @@ 'license' => [ ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ], ApiBase::PARAM_ISMULTI => false, - ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE, + ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY, ], 'continue' => [ ApiBase::PARAM_TYPE => 'integer', diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 9eab2fb..1359279 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -105,7 +105,7 @@ $this->assertContainsOnly( 'array', $params ); $this->assertArrayHasKey( 'license', $params ); $this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], ['free', 'any'] ); - $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'free' ); + $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'any' ); $this->assertEquals( $params['license'][\ApiBase::PARAM_ISMULTI], false ); } -- To view, visit https://gerrit.wikimedia.org/r/324838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: EBernhardson Gerrit-Reviewer: EBernhardson 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]: SpecialFewestrevisions: Allow pages with only 1 revision to ...
jenkins-bot has submitted this change and it was merged. Change subject: SpecialFewestrevisions: Allow pages with only 1 revision to be shown .. SpecialFewestrevisions: Allow pages with only 1 revision to be shown Change-Id: I44630c62ac521f0a701d1aec6a41a81d1a1532f0 --- M includes/specials/SpecialFewestrevisions.php 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index b86a95e..64a6ba9 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -53,12 +53,6 @@ 'page_namespace' => MWNamespace::getContentNamespaces(), 'page_id = rev_page' ], 'options' => [ - 'HAVING' => 'COUNT(*) > 1', - // ^^^ This was probably here to weed out redirects. - // Since we mark them as such now, it might be - // useful to remove this. People _do_ create pages - // and never revise them, they aren't necessarily - // redirects. 'GROUP BY' => [ 'page_namespace', 'page_title', 'page_is_redirect' ] ] ]; -- To view, visit https://gerrit.wikimedia.org/r/323543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44630c62ac521f0a701d1aec6a41a81d1a1532f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Chad Gerrit-Reviewer: Florianschmidtwelzow 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...UploadWizard[master]: Remove unused messages
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused messages .. Remove unused messages Follow-up to 4a530c4b7341b9bb8409b194469f594f24fb5548. These were used on the special pages removed in that commit. Change-Id: Ia388fe708dbca468b634a175045c9fc1b144c659 --- M i18n/en.json M i18n/qqq.json 2 files changed, 0 insertions(+), 8 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 778c748..65333b5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,8 +4,6 @@ }, "uploadwizard": "Upload Wizard", "uploadwizard-desc": "Upload Wizard, a user-friendly tool for uploading multimedia", - "mwe-upwiz-uploadcampaigns": "Upload campaigns", - "mwe-upwiz-uploadcampaign": "Upload campaign configuration", "right-upwizcampaigns": "Configure Upload Wizard campaigns", "action-upwizcampaigns": "configure upload campaigns", "group-upwizcampeditors": "Upload Wizard campaign editors", @@ -322,8 +320,6 @@ "mwe-upwiz-error-campaigndisabled": "Campaign \"$1\" has not been enabled.", "mwe-upwiz-calendar-date": "Choose date from calendar", "mwe-upwiz-custom-date": "Use custom date format", - "uploadcampaign-legend": "Upload campaign configuration", - "uploadcampaign-text": "You are modifying an Upload Wizard campaign.", "prefs-uploads": "Uploading", "prefs-upwiz-licensing": "Licensing", "prefs-upwiz-experimental": "Experimental features", diff --git a/i18n/qqq.json b/i18n/qqq.json index 45b084a..bd82025 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -30,8 +30,6 @@ }, "uploadwizard": "{{doc-special|UploadWizard}}\nUploadWizard is a wizard to upload multimedia files to a MediaWiki website.\nFor more information, see [[mw:UploadWizard]].", "uploadwizard-desc": "{{desc|name=Upload Wizard|url=https://www.mediawiki.org/wiki/Extension:UploadWizard}}";, - "mwe-upwiz-uploadcampaigns": "{{doc-special|UploadCampaigns}}\nCan also be worded as \"campaigns for the promotion of uploading\".", - "mwe-upwiz-uploadcampaign": "{{doc-special|UploadCampaign}}", "right-upwizcampaigns": "{{doc-right|upwizcampaigns}}\n\n\"Upload campaign\" can also be worded as \"a campaign for the promotion of uploading\".", "action-upwizcampaigns": "{{doc-action|upwizcampaigns}}", "group-upwizcampeditors": "{{doc-group|upwizcampeditors}}", @@ -348,8 +346,6 @@ "mwe-upwiz-error-campaigndisabled": "Used as error message. Parameters:\n* $1 - campaign name", "mwe-upwiz-calendar-date": "Shown as a tooltip of a button next to a date input field, to display a calendar to choose a date from.", "mwe-upwiz-custom-date": "Shown as a tooltip of a button next to a date input field, to enable inputting arbitrary text rather than only choosing dates from a calendar. (For example, if the date you want to input is 'circa 1900'.)", - "uploadcampaign-legend": "Diambiguation: this message is about the configuration of an upload campaign.", - "uploadcampaign-text": "Text shown on the edit page for an upload campaign.", "prefs-uploads": "Preferences tab label for UploadWizard preferences related to uploads.\n\nNote that this is about '''the process of uploading files''', and not files that were uploaded.\n\nSee https://commons.wikimedia.org/w/index.php?uselang=en&title=Special:Preferences#mw-prefsection-uploads.\n{{Identical|Uploading}}", "prefs-upwiz-licensing": "{{Identical|Licensing}}", "prefs-upwiz-experimental": "Used in [[Special:Preferences]].", -- To view, visit https://gerrit.wikimedia.org/r/324767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia388fe708dbca468b634a175045c9fc1b144c659 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Nikerabbit 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...UploadWizard[master]: Remove aliases for removed special pages
jenkins-bot has submitted this change and it was merged. Change subject: Remove aliases for removed special pages .. Remove aliases for removed special pages Follow-up to 4a530c4b7341b9bb8409b194469f594f24fb5548. Change-Id: I727df6e19cb0201a06c2ac96b32088e23ce7277f --- M UploadWizard.alias.php 1 file changed, 0 insertions(+), 58 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizard.alias.php b/UploadWizard.alias.php index b6a8630..bbb3161 100644 --- a/UploadWizard.alias.php +++ b/UploadWizard.alias.php @@ -11,24 +11,18 @@ $specialPageAliases['en'] = array( 'Campaigns' => array( 'Campaigns' ), 'UploadWizard' => array( 'UploadWizard' ), - 'UploadCampaigns' => array( 'UploadCampaigns' ), - 'UploadCampaign' => array( 'UploadCampaign' ), ); /** Arabic (العربية) */ $specialPageAliases['ar'] = array( 'Campaigns' => array( 'حملات' ), 'UploadWizard' => array( 'ساحر_الرفع' ), - 'UploadCampaigns' => array( 'حملات_الرفع' ), - 'UploadCampaign' => array( 'حملة_الرفع' ), ); /** Egyptian Arabic (مصرى) */ $specialPageAliases['arz'] = array( 'Campaigns' => array( 'حملات' ), 'UploadWizard' => array( 'ساحر_الرفع' ), - 'UploadCampaigns' => array( 'حملات_الرفع' ), - 'UploadCampaign' => array( 'حمله_الرفع' ), ); /** Assamese (অসমীয়া) */ @@ -39,15 +33,11 @@ /** Avaric (авар) */ $specialPageAliases['av'] = array( 'UploadWizard' => array( 'Мастер_загрузки' ), - 'UploadCampaigns' => array( 'Кампании_по_загрузке' ), - 'UploadCampaign' => array( 'Кампания_по_загрузке' ), ); /** Bashkir (башҡортса) */ $specialPageAliases['ba'] = array( 'UploadWizard' => array( 'UploadWizard' ), - 'UploadCampaigns' => array( 'UploadCampaigns' ), - 'UploadCampaign' => array( 'UploadCampaign' ), ); /** Western Balochi (بلوچی رخشانی) */ @@ -59,8 +49,6 @@ $specialPageAliases['bn'] = array( 'Campaigns' => array( 'ক্যাম্পেইন' ), 'UploadWizard' => array( 'আপলোড_উইজার্ড' ), - 'UploadCampaigns' => array( 'আপলোড_ক্যাম্পেইনসমূহ' ), - 'UploadCampaign' => array( 'আপলোড_ক্যাম্পেইন' ), ); /** буряад (буряад) */ @@ -71,31 +59,23 @@ /** Chechen (нохчийн) */ $specialPageAliases['ce'] = array( 'UploadWizard' => array( 'Чуяхаран_говзанча' ), - 'UploadCampaigns' => array( 'Чуяхаран_компанеш' ), - 'UploadCampaign' => array( 'Чуяхаран_компани' ), ); /** Danish (dansk) */ $specialPageAliases['da'] = array( 'UploadWizard' => array( 'Vejviser_til_oplægning_af_filer' ), - 'UploadCampaigns' => array( 'Oplægningskampagner' ), - 'UploadCampaign' => array( 'Oplægningskampagne' ), ); /** German (Deutsch) */ $specialPageAliases['de'] = array( 'Campaigns' => array( 'Kampagnen' ), 'UploadWizard' => array( 'Hochladeassistent' ), - 'UploadCampaigns' => array( 'Hochladekampagnen' ), - 'UploadCampaign' => array( 'Hochladekampagne' ), ); /** Zazaki (Zazaki) */ $specialPageAliases['diq'] = array( 'Campaigns' => array( 'Holi' ), 'UploadWizard' => array( 'SihirbazêBarkerdışi' ), - 'UploadCampaigns' => array( 'HolaBarkerdışan' ), - 'UploadCampaign' => array( 'HolaBarkerdışi' ), ); /** Greek (Ελληνικά) */ @@ -112,8 +92,6 @@ $specialPageAliases['et'] = array( 'Campaigns' => array( 'Kampaaniad' ), 'UploadWizard' => array( 'Üleslaadimisviisard' ), - 'UploadCampaigns' => array( 'Üleslaadimiskampaaniad' ), - 'UploadCampaign' => array( 'Üleslaadimiskampaania' ), ); /** Persian (فارسی) */ @@ -129,16 +107,12 @@ /** Swiss German (Alemannisch) */ $specialPageAliases['gsw'] = array( 'UploadWizard' => array( 'Uffelade-Assistent' ), - 'UploadCampaigns' => array( 'Uffelade-Kampagne_(mehreri)' ), - 'UploadCampaign' => array( 'Uffelade-Kampagne' ), ); /** Hebrew (עברית) */ $specialPageAliases['he'] = array( 'Campaigns' => array( 'מבצעים' ), 'UploadWizard' => array( 'אשף_ההעלאה' ), - 'UploadCampaigns' => array( 'מבצעי_העלאה' ), - 'UploadCampaign' => array( 'מבצע_העלאה' ), ); /** Upper Sorbian (hornjoserbsce) */ @@ -154,8 +128,6 @@ /** Interlingua (interlingua) */ $specialPageAliases['ia'] = array( 'UploadWizard' => array( 'Assistente_de_incargamento' ), - 'UploadCampaigns' => array( 'Campanias_de_incargamento' ), - 'UploadCampaign' => array( 'Campania_de_incargamento' ), ); /** Indonesian (Bahasa Indonesia) */ @@ -166,8 +138,6 @@ /** Italian (italiano) */ $specialPageAliases['it'] = array( 'UploadWizard' => array( 'CaricamentoGuidato' ), - 'UploadCampaigns' => array( 'CampagneCaricamento' ), - 'UploadCampaign' => array( 'CampagnaCaricamento' ), ); /** Japanese (日本語) */ @@ -179,8 +149,6 @@ $specialPageAliases['ko'] = array( 'Campaigns
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Page images return non-free images by default
jenkins-bot has submitted this change and it was merged. Change subject: Page images return non-free images by default .. Page images return non-free images by default Page images was updated to have a split between the 'best' page image, and the best free page image. Unfortunately the deployment plan didn't take into account that the default 'free' would be pointing to an unpopulated page prop, which will not be populated until LinksUpdate has run for every page on every wiki which could take weeks or months. To restore some semblance of order, make the default point at the currently populated field. A followup will need to be done to populate the appropriate field. Bug: T152155 Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 --- M includes/ApiQueryPageImages.php M tests/phpunit/ApiQueryPageImagesTest.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 5de31a4..a83f79d 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -250,7 +250,7 @@ 'license' => [ ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ], ApiBase::PARAM_ISMULTI => false, - ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE, + ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY, ], 'continue' => [ ApiBase::PARAM_TYPE => 'integer', diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 9eab2fb..1359279 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -105,7 +105,7 @@ $this->assertContainsOnly( 'array', $params ); $this->assertArrayHasKey( 'license', $params ); $this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], ['free', 'any'] ); - $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'free' ); + $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'any' ); $this->assertEquals( $params['license'][\ApiBase::PARAM_ISMULTI], false ); } -- To view, visit https://gerrit.wikimedia.org/r/324827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove $purpose parameter from password validity check
jenkins-bot has submitted this change and it was merged. Change subject: Remove $purpose parameter from password validity check .. Remove $purpose parameter from password validity check This was added in I56b6600 in an attempt to work around a bug in CentralAuth, but the bug has since been fixed in a better way. No hook functions in Gerrit use the parameter (or ever have, as far as I can tell), and anything that was passing a value other than the default 'login' has since been removed. So let's just get rid of it instead of keeping it around doing nothing. Change-Id: Ie604e03d268706221161ac93eb866f477e466fb4 --- M docs/hooks.txt M includes/password/UserPasswordPolicy.php M includes/user/User.php 3 files changed, 11 insertions(+), 19 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/hooks.txt b/docs/hooks.txt index a73d50f..da12d8c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2554,8 +2554,6 @@ 'PasswordPoliciesForUser': Alter the effective password policy for a user. $user: User object whose policy you are modifying &$effectivePolicy: Array of policy statements that apply to this user -$purpose: string indicating purpose of the check, one of 'login', 'create', - or 'reset' 'PerformRetroactiveAutoblock': Called before a retroactive autoblock is applied to a user. diff --git a/includes/password/UserPasswordPolicy.php b/includes/password/UserPasswordPolicy.php index 5584f6f..bf1f8ac 100644 --- a/includes/password/UserPasswordPolicy.php +++ b/includes/password/UserPasswordPolicy.php @@ -67,12 +67,11 @@ * Check if a passwords meets the effective password policy for a User. * @param User $user who's policy we are checking * @param string $password the password to check -* @param string $purpose one of 'login', 'create', 'reset' * @return Status error to indicate the password didn't meet the policy, or fatal to * indicate the user shouldn't be allowed to login. */ - public function checkUserPassword( User $user, $password, $purpose = 'login' ) { - $effectivePolicy = $this->getPoliciesForUser( $user, $purpose ); + public function checkUserPassword( User $user, $password ) { + $effectivePolicy = $this->getPoliciesForUser( $user ); return $this->checkPolicies( $user, $password, @@ -134,20 +133,16 @@ * Get the policy for a user, based on their group membership. Public so * UI elements can access and inform the user. * @param User $user -* @param string $purpose one of 'login', 'create', 'reset' * @return array the effective policy for $user */ - public function getPoliciesForUser( User $user, $purpose = 'login' ) { - $effectivePolicy = $this->policies['default']; - if ( $purpose !== 'create' ) { - $effectivePolicy = self::getPoliciesForGroups( - $this->policies, - $user->getEffectiveGroups(), - $this->policies['default'] - ); - } + public function getPoliciesForUser( User $user ) { + $effectivePolicy = self::getPoliciesForGroups( + $this->policies, + $user->getEffectiveGroups(), + $this->policies['default'] + ); - Hooks::run( 'PasswordPoliciesForUser', [ $user, &$effectivePolicy, $purpose ] ); + Hooks::run( 'PasswordPoliciesForUser', [ $user, &$effectivePolicy ] ); return $effectivePolicy; } diff --git a/includes/user/User.php b/includes/user/User.php index f07db0e..26f1040 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1003,11 +1003,10 @@ * able to set their password to this. * * @param string $password Desired password -* @param string $purpose one of 'login', 'create', 'reset' * @return Status * @since 1.23 */ - public function checkPasswordValidity( $password, $purpose = 'login' ) { + public function checkPasswordValidity( $password ) { global $wgPasswordPolicy; $upp = new UserPasswordPolicy( @@ -1024,7 +1023,7 @@ } if ( $result === false ) { - $status->merge( $upp->checkUserPassword( $this, $password, $purpose ) ); + $status->merge( $upp->checkUserPassword( $this, $password ) ); return $status; } elseif ( $result === true ) { return $status; -- To view, visit https://gerrit.wikimedia.org/r/324834 To unsubscribe, visit https://gerrit.wiki
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Remove $purpose parameter from password validity check
jenkins-bot has submitted this change and it was merged. Change subject: Remove $purpose parameter from password validity check .. Remove $purpose parameter from password validity check This was added in I56b6600 in an attempt to work around a bug in CentralAuth, but the bug has since been fixed in a better way. No hook functions in Gerrit use the parameter, and anything that was passing a value other than the default 'login' has since been removed. So let's just get rid of it instead of keeping it around doing nothing. Change-Id: If7573198586804ade19e1e537f48e2834da99caf --- M api/ApiTranslateSandbox.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiTranslateSandbox.php b/api/ApiTranslateSandbox.php index 41889ea..0e6951a 100644 --- a/api/ApiTranslateSandbox.php +++ b/api/ApiTranslateSandbox.php @@ -72,7 +72,7 @@ } $password = $params['password']; - $status = $user->checkPasswordValidity( $password, 'login' ); + $status = $user->checkPasswordValidity( $password ); if ( !$status->isGood() ) { $this->dieStatus( $status ); } -- To view, visit https://gerrit.wikimedia.org/r/324835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7573198586804ade19e1e537f48e2834da99caf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: CSteipp 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] apps...wikipedia[master]: Feed cards for Surveys and Fundraising.
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/324839 Change subject: Feed cards for Surveys and Fundraising. .. Feed cards for Surveys and Fundraising. ...plus Tests! Bug: T140012 Change-Id: If2f32bdf869b17210e9e9efbd9d774e8cbcd33b4 --- A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png A app/src/androidTest/java/org/wikipedia/feed/announcement/FundraisingCardViewTest.java A app/src/androidTest/java/org/wikipedia/feed/announcement/SurveyCardViewTest.java M app/src/main/java/org/wikipedia/feed/FeedFragment.java M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementCardView.java M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementClient.java A app/src/main/java/org/wikipedia/feed/announcement/FundraisingCard.java A app/src/main/java/org/wikipedia/feed/announcement/FundraisingCardView.java A app/src/main/java/org/wikipedia/feed/announcement/SurveyCard.java A app/src/main/java/org/wikipedia/feed/announcement/SurveyCardView.java M app/src/main/java/org/wikipedia/feed/model/CardType.java A app/src/main/res/drawable/ic_fundraising_header_2016.xml M app/src/main/res/layout/view_card_announcement.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml 34 files changed, 368 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/39/324839/1 diff --git a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png new file mode 100644 index 000..7d531cd --- /dev/null +++ b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png Binary files differ diff --git a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png new file mode 100644 index 000..4dd71e2 --- /dev/null +++ b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png Binary files differ diff --git a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-lig
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 04a6e84
jenkins-bot has submitted this change and it was merged. Change subject: Update mobileapps to 04a6e84 .. Update mobileapps to 04a6e84 List of changes: 297f302 Remove mobile-summary endpoint b961452 Revert "Revert "Update to service-template-node v0.5.0 (minus eslint)"" 04a6e84 Skipping 2 tests for hatnotes in the experimental endpoints xxx Update node module dependencies Change-Id: I4fbddd4a6c6b8fea8c47fe5ddd3ab579e092ed02 --- A node_modules/.bin/semver M node_modules/bunyan/package.json M node_modules/heapdump/build/Makefile M node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d M node_modules/heapdump/build/addon.target.mk M node_modules/heapdump/build/config.gypi M node_modules/js-yaml/package.json M node_modules/preq/.travis.yml M node_modules/preq/index.js A node_modules/preq/node_modules/.bin/semver M node_modules/preq/package.json R node_modules/semver/LICENSE R node_modules/semver/bin/semver R node_modules/semver/package.json R node_modules/semver/range.bnf R node_modules/semver/semver.js M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M node_modules/service-runner/package.json M node_modules/swagger-router/package.json M src 20 files changed, 126 insertions(+), 101 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 12 index 000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/bunyan/package.json b/node_modules/bunyan/package.json index 07bc907..2572b72 100644 --- a/node_modules/bunyan/package.json +++ b/node_modules/bunyan/package.json @@ -213,7 +213,7 @@ "homepage": "https://github.com/trentm/node-bunyan#readme";, "_id": "bunyan@1.8.5", "_shasum": "0d619e83005fb89070f5f47982fc1bf00600878a", - "_from": "bunyan@>=1.8.3 <2.0.0", + "_from": "bunyan@>=1.8.5 <2.0.0", "_npmVersion": "2.15.9", "_nodeVersion": "4.6.1", "_npmUser": { diff --git a/node_modules/heapdump/build/Makefile b/node_modules/heapdump/build/Makefile index 285e8ee..c9d9d51 100644 --- a/node_modules/heapdump/build/Makefile +++ b/node_modules/heapdump/build/Makefile @@ -308,8 +308,8 @@ endif quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/root/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp -Makefile: $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi +cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp +Makefile: $(srcdir)/../../../../home/runuser/.node-gyp/4.6.0/include/node/common.gypi $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included diff --git a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d index 022660f..9af41a7 100644 --- a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d +++ b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d @@ -1,34 +1,36 @@ -cmd_Release/obj.target/addon/src/heapdump.o := g++ '-DNODE_GYP_MODULE_NAME=addon'
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[wmf/1.29.0-wmf.4]: Page images return non-free images by default
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324838 Change subject: Page images return non-free images by default .. Page images return non-free images by default Page images was updated to have a split between the 'best' page image, and the best free page image. Unfortunately the deployment plan didn't take into account that the default 'free' would be pointing to an unpopulated page prop, which will not be populated until LinksUpdate has run for every page on every wiki which could take weeks or months. To restore some semblance of order, make the default point at the currently populated field. A followup will need to be done to populate the appropriate field. Bug: T152155 Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 --- M includes/ApiQueryPageImages.php M tests/phpunit/ApiQueryPageImagesTest.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/38/324838/1 diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 4a207d8..78f5165 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -249,7 +249,7 @@ 'license' => [ ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ], ApiBase::PARAM_ISMULTI => false, - ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE, + ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY, ], 'continue' => [ ApiBase::PARAM_TYPE => 'integer', diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 9eab2fb..1359279 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -105,7 +105,7 @@ $this->assertContainsOnly( 'array', $params ); $this->assertArrayHasKey( 'license', $params ); $this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], ['free', 'any'] ); - $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'free' ); + $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'any' ); $this->assertEquals( $params['license'][\ApiBase::PARAM_ISMULTI], false ); } -- To view, visit https://gerrit.wikimedia.org/r/324838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: wmf/1.29.0-wmf.4 Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Remove option metamta.maniphest.public-create-e...
Dzahn has submitted this change and it was merged. Change subject: Phabricator: Remove option metamta.maniphest.public-create-email .. Phabricator: Remove option metamta.maniphest.public-create-email This was removed from phabricator core and im getting a warnning about this removed config. https://secure.phabricator.com/rPf99c7beb90fd20f2be51598032c89179bc12fab1 Change-Id: Ifbe079d8373bd78e9d896f1c5594f23d99d6920e --- M modules/role/manifests/phabricator/main.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: 20after4: Looks good to me, but someone else must approve Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/phabricator/main.pp b/modules/role/manifests/phabricator/main.pp index ebde0cf..e9cacd7 100644 --- a/modules/role/manifests/phabricator/main.pp +++ b/modules/role/manifests/phabricator/main.pp @@ -150,7 +150,6 @@ 'phpmailer.smtp-host'=> inline_template('<%= @mail_smarthost.join(";") %>'), 'metamta.default-address'=> "no-reply@${domain}", 'metamta.domain' => $domain, -'metamta.maniphest.public-create-email' => "task@${domain}", 'metamta.reply-handler-domain' => $domain, 'repository.default-local-path' => '/srv/repos', 'phd.taskmasters'=> 10, -- To view, visit https://gerrit.wikimedia.org/r/324812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifbe079d8373bd78e9d896f1c5594f23d99d6920e Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Use isset( $options['isAutomatic'] ) to surpress unnecessary...
Divadsn has uploaded a new change for review. https://gerrit.wikimedia.org/r/324837 Change subject: Use isset( $options['isAutomatic'] ) to surpress unnecessary errors. .. Use isset( $options['isAutomatic'] ) to surpress unnecessary errors. Change-Id: Ib9baac4aca92f1ad14069fd10edfb86ccf1f3925 --- M includes/WikidataPageBanner.functions.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/37/324837/1 diff --git a/includes/WikidataPageBanner.functions.php b/includes/WikidataPageBanner.functions.php index b518787..dc8c812 100755 --- a/includes/WikidataPageBanner.functions.php +++ b/includes/WikidataPageBanner.functions.php @@ -169,8 +169,8 @@ // don't auto generate banner if image is not landscape, see bug report T131424 $fileWidth = $file->getWidth(); $fileHeight = $file->getHeight(); - if ( $options['isAutomatic'] && $fileWidth < 1.5 * $fileHeight ) { - return $banner; + if ( isset( $options['isAutomatic'] ) && $fileWidth < 1.5 * $fileHeight ) { + return null; } $templateParser = new TemplateParser( __DIR__ . '/../templates' ); $options['bannerfile'] = $bannerfile->getLocalUrl(); -- To view, visit https://gerrit.wikimedia.org/r/324837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9baac4aca92f1ad14069fd10edfb86ccf1f3925 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Divadsn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 04a6e84
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/324836 Change subject: Update mobileapps to 04a6e84 .. Update mobileapps to 04a6e84 List of changes: 297f302 Remove mobile-summary endpoint b961452 Revert "Revert "Update to service-template-node v0.5.0 (minus eslint)"" 04a6e84 Skipping 2 tests for hatnotes in the experimental endpoints xxx Update node module dependencies Change-Id: I4fbddd4a6c6b8fea8c47fe5ddd3ab579e092ed02 --- A node_modules/.bin/semver M node_modules/bunyan/package.json M node_modules/heapdump/build/Makefile M node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d M node_modules/heapdump/build/addon.target.mk M node_modules/heapdump/build/config.gypi M node_modules/js-yaml/package.json M node_modules/preq/.travis.yml M node_modules/preq/index.js A node_modules/preq/node_modules/.bin/semver M node_modules/preq/package.json R node_modules/semver/LICENSE R node_modules/semver/bin/semver R node_modules/semver/package.json R node_modules/semver/range.bnf R node_modules/semver/semver.js M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M node_modules/service-runner/package.json M node_modules/swagger-router/package.json M src 20 files changed, 126 insertions(+), 101 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy refs/changes/36/324836/1 diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 12 index 000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/bunyan/package.json b/node_modules/bunyan/package.json index 07bc907..2572b72 100644 --- a/node_modules/bunyan/package.json +++ b/node_modules/bunyan/package.json @@ -213,7 +213,7 @@ "homepage": "https://github.com/trentm/node-bunyan#readme";, "_id": "bunyan@1.8.5", "_shasum": "0d619e83005fb89070f5f47982fc1bf00600878a", - "_from": "bunyan@>=1.8.3 <2.0.0", + "_from": "bunyan@>=1.8.5 <2.0.0", "_npmVersion": "2.15.9", "_nodeVersion": "4.6.1", "_npmUser": { diff --git a/node_modules/heapdump/build/Makefile b/node_modules/heapdump/build/Makefile index 285e8ee..c9d9d51 100644 --- a/node_modules/heapdump/build/Makefile +++ b/node_modules/heapdump/build/Makefile @@ -308,8 +308,8 @@ endif quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/root/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp -Makefile: $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi +cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp +Makefile: $(srcdir)/../../../../home/runuser/.node-gyp/4.6.0/include/node/common.gypi $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included diff --git a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d index 022660f..9af41a7 100644 --- a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d +++ b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d @@ -1,34 +1,36 @@ -cmd_Release/obj.tar
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove $purpose parameter from password validity check
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/324834 Change subject: Remove $purpose parameter from password validity check .. Remove $purpose parameter from password validity check This was added in I56b6600 in an attempt to work around a bug in CentralAuth, but the bug has since been fixed in a better way. No hook functions in Gerrit use the parameter (or ever have, as far as I can tell), and anything that was passing a value other than the default 'login' has since been removed. So let's just get rid of it instead of keeping it around doing nothing. Change-Id: Ie604e03d268706221161ac93eb866f477e466fb4 --- M docs/hooks.txt M includes/password/UserPasswordPolicy.php M includes/user/User.php 3 files changed, 11 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/34/324834/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index a73d50f..da12d8c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2554,8 +2554,6 @@ 'PasswordPoliciesForUser': Alter the effective password policy for a user. $user: User object whose policy you are modifying &$effectivePolicy: Array of policy statements that apply to this user -$purpose: string indicating purpose of the check, one of 'login', 'create', - or 'reset' 'PerformRetroactiveAutoblock': Called before a retroactive autoblock is applied to a user. diff --git a/includes/password/UserPasswordPolicy.php b/includes/password/UserPasswordPolicy.php index 5584f6f..bf1f8ac 100644 --- a/includes/password/UserPasswordPolicy.php +++ b/includes/password/UserPasswordPolicy.php @@ -67,12 +67,11 @@ * Check if a passwords meets the effective password policy for a User. * @param User $user who's policy we are checking * @param string $password the password to check -* @param string $purpose one of 'login', 'create', 'reset' * @return Status error to indicate the password didn't meet the policy, or fatal to * indicate the user shouldn't be allowed to login. */ - public function checkUserPassword( User $user, $password, $purpose = 'login' ) { - $effectivePolicy = $this->getPoliciesForUser( $user, $purpose ); + public function checkUserPassword( User $user, $password ) { + $effectivePolicy = $this->getPoliciesForUser( $user ); return $this->checkPolicies( $user, $password, @@ -134,20 +133,16 @@ * Get the policy for a user, based on their group membership. Public so * UI elements can access and inform the user. * @param User $user -* @param string $purpose one of 'login', 'create', 'reset' * @return array the effective policy for $user */ - public function getPoliciesForUser( User $user, $purpose = 'login' ) { - $effectivePolicy = $this->policies['default']; - if ( $purpose !== 'create' ) { - $effectivePolicy = self::getPoliciesForGroups( - $this->policies, - $user->getEffectiveGroups(), - $this->policies['default'] - ); - } + public function getPoliciesForUser( User $user ) { + $effectivePolicy = self::getPoliciesForGroups( + $this->policies, + $user->getEffectiveGroups(), + $this->policies['default'] + ); - Hooks::run( 'PasswordPoliciesForUser', [ $user, &$effectivePolicy, $purpose ] ); + Hooks::run( 'PasswordPoliciesForUser', [ $user, &$effectivePolicy ] ); return $effectivePolicy; } diff --git a/includes/user/User.php b/includes/user/User.php index f07db0e..26f1040 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1003,11 +1003,10 @@ * able to set their password to this. * * @param string $password Desired password -* @param string $purpose one of 'login', 'create', 'reset' * @return Status * @since 1.23 */ - public function checkPasswordValidity( $password, $purpose = 'login' ) { + public function checkPasswordValidity( $password ) { global $wgPasswordPolicy; $upp = new UserPasswordPolicy( @@ -1024,7 +1023,7 @@ } if ( $result === false ) { - $status->merge( $upp->checkUserPassword( $this, $password, $purpose ) ); + $status->merge( $upp->checkUserPassword( $this, $password ) ); return $status; } elseif ( $result === true ) { return $status; -- To view, visit https://gerrit.wikimedia.org/r/324834 To unsu
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use SessionConsistentConnectionManager from core everywhere
jenkins-bot has submitted this change and it was merged. Change subject: Use SessionConsistentConnectionManager from core everywhere .. Use SessionConsistentConnectionManager from core everywhere Change-Id: I4341a1b4ff6a67e4c1770faae38e9b126f1bf0bf --- M client/includes/RecentChanges/RecentChangesDuplicateDetector.php M client/includes/Store/Sql/BulkSubscriptionUpdater.php M client/includes/Store/Sql/DirectSqlStore.php M client/includes/Usage/Sql/SqlSubscriptionManager.php M client/includes/Usage/Sql/SqlUsageTracker.php M client/maintenance/updateSubscriptions.php M client/tests/phpunit/includes/RecentChanges/RecentChangesDuplicateDetectorTest.php M client/tests/phpunit/includes/Store/Sql/BulkSubscriptionUpdaterTest.php M client/tests/phpunit/includes/Usage/Sql/SqlSubscriptionManagerTest.php M client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php 10 files changed, 68 insertions(+), 60 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/RecentChanges/RecentChangesDuplicateDetector.php b/client/includes/RecentChanges/RecentChangesDuplicateDetector.php index f85b7cc..2b1c910 100644 --- a/client/includes/RecentChanges/RecentChangesDuplicateDetector.php +++ b/client/includes/RecentChanges/RecentChangesDuplicateDetector.php @@ -4,7 +4,7 @@ use MWException; use RecentChange; -use Wikibase\Client\Store\Sql\ConsistentReadConnectionManager; +use Wikimedia\Rdbms\SessionConsistentConnectionManager; /** * @since 0.5 @@ -16,11 +16,11 @@ class RecentChangesDuplicateDetector { /** -* @var ConsistentReadConnectionManager +* @var SessionConsistentConnectionManager */ private $connectionManager; - public function __construct( ConsistentReadConnectionManager $connectionManager ) { + public function __construct( SessionConsistentConnectionManager $connectionManager ) { $this->connectionManager = $connectionManager; } @@ -38,7 +38,7 @@ $attribs = $change->getAttributes(); //XXX: need to check master? - $db = $this->connectionManager->getReadConnection(); + $db = $this->connectionManager->getReadConnectionRef(); $res = $db->select( 'recentchanges', @@ -73,7 +73,6 @@ } } - $this->connectionManager->releaseConnection( $db ); return false; } diff --git a/client/includes/Store/Sql/BulkSubscriptionUpdater.php b/client/includes/Store/Sql/BulkSubscriptionUpdater.php index a7d7eba..8b5fe7a 100644 --- a/client/includes/Store/Sql/BulkSubscriptionUpdater.php +++ b/client/includes/Store/Sql/BulkSubscriptionUpdater.php @@ -10,6 +10,7 @@ use Wikibase\Lib\Reporting\LogWarningExceptionHandler; use Wikibase\Lib\Reporting\MessageReporter; use Wikibase\Lib\Reporting\NullMessageReporter; +use Wikimedia\Rdbms\SessionConsistentConnectionManager; /** * Implements bulk updates for the repo's wb_changes_subscription table, @@ -22,12 +23,12 @@ class BulkSubscriptionUpdater { /** -* @var ConsistentReadConnectionManager +* @var SessionConsistentConnectionManager */ private $localConnectionManager; /** -* @var ConsistentReadConnectionManager +* @var SessionConsistentConnectionManager */ private $repoConnectionManager; @@ -59,9 +60,9 @@ private $progressReporter; /** -* @param ConsistentReadConnectionManager $localConnectionManager Connection manager for DB +* @param SessionConsistentConnectionManager $localConnectionManager Connection manager for DB * connections to the local wiki. -* @param ConsistentReadConnectionManager $repoConnectionManager Connection manager for DB +* @param SessionConsistentConnectionManager $repoConnectionManager Connection manager for DB * connections to the repo. * @param string $subscriberWikiId The local wiki's global ID, to be used as the subscriber ID * in the repo's subscription table. @@ -73,8 +74,8 @@ * @throws InvalidArgumentException */ public function __construct( - ConsistentReadConnectionManager $localConnectionManager, - ConsistentReadConnectionManager $repoConnectionManager, + SessionConsistentConnectionManager $localConnectionManager, + SessionConsistentConnectionManager $repoConnectionManager, $subscriberWikiId, $repoWiki, $batchSize = 1000 @@ -122,7 +123,7 @@ * @param EntityId|null $startEntity The entity to start with. */ public function updateSubscriptions( EntityId $startEntity = null ) { - $this->repoConnectionManager->forceMaste
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Skipping 2 tests for hatnotes in the experimental endpoints
jenkins-bot has submitted this change and it was merged. Change subject: Skipping 2 tests for hatnotes in the experimental endpoints .. Skipping 2 tests for hatnotes in the experimental endpoints Looks like an edit caused this to fail. Also I think the implementation is not correct. The hatnote should still appear since it still exist in wikitext after the edit https://en.wikipedia.org/w/index.php?title=Order_of_chivalry&diff=next&oldid=752548387 but in the test it doesn't have it. Change-Id: Iaab7f6ee5b03d6660f8d7de481a78c615a17f609 TODO: needs further investigation --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index f9203c0..03c4f25 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -153,7 +153,7 @@ 'Expected section text to start with lead paragraph. Actual text ' + res.body.sections[0].text); }); }); -it('Enwiki hatnotes are promoted to the lead object', function() { +it.skip('Enwiki hatnotes are promoted to the lead object', function() { return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/mobile-sections-lead/Chivalric%20order' }) .then(function (res) { assert.deepEqual(res.status, 200); diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 61f28cf..ff75931 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -9,7 +9,7 @@ before(function () { return server.start(); }); -it('Hatnotes do not appear in the lead object', function() { +it.skip('Hatnotes do not appear in the lead object', function() { return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/formatted-lead/Chivalric%20order' }) .then(function (res) { assert.deepEqual(res.status, 200); -- To view, visit https://gerrit.wikimedia.org/r/324825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaab7f6ee5b03d6660f8d7de481a78c615a17f609 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko 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...Translate[master]: Remove $purpose parameter from password validity check
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/324835 Change subject: Remove $purpose parameter from password validity check .. Remove $purpose parameter from password validity check This was added in I56b6600 in an attempt to work around a bug in CentralAuth, but the bug has since been fixed in a better way. No hook functions in Gerrit use the parameter, and anything that was passing a value other than the default 'login' has since been removed. So let's just get rid of it instead of keeping it around doing nothing. Change-Id: If7573198586804ade19e1e537f48e2834da99caf --- M api/ApiTranslateSandbox.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/35/324835/1 diff --git a/api/ApiTranslateSandbox.php b/api/ApiTranslateSandbox.php index 41889ea..0e6951a 100644 --- a/api/ApiTranslateSandbox.php +++ b/api/ApiTranslateSandbox.php @@ -72,7 +72,7 @@ } $password = $params['password']; - $status = $user->checkPasswordValidity( $password, 'login' ); + $status = $user->checkPasswordValidity( $password ); if ( !$status->isGood() ) { $this->dieStatus( $status ); } -- To view, visit https://gerrit.wikimedia.org/r/324835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7573198586804ade19e1e537f48e2834da99caf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate 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] mediawiki...VisualEditor[master]: Use widget.getApi, not this.getApi
jenkins-bot has submitted this change and it was merged. Change subject: Use widget.getApi, not this.getApi .. Use widget.getApi, not this.getApi Bug: T152154 Change-Id: Id7e77323ffabf43e73481cf6bcb9a1e649dc --- M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js index eb34fc4..93e812e 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js @@ -93,7 +93,7 @@ if ( widget.showRedirects ) { params.redirects = '1'; } - xhr = this.getApi().get( params ); + xhr = widget.getApi().get( params ); return xhr.promise( { abort: xhr.abort } ); } } ) -- To view, visit https://gerrit.wikimedia.org/r/324823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7e77323ffabf43e73481cf6bcb9a1e649dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk 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...Wikibase[master]: Use logic from core for ConsistentReadConnectionManager
jenkins-bot has submitted this change and it was merged. Change subject: Use logic from core for ConsistentReadConnectionManager .. Use logic from core for ConsistentReadConnectionManager Change-Id: I98075f7e1973e04a43f3a7bcf0a46626dcb15349 Depends-On: I0c58e15aed5bed88323d18cb95e5008f8d3381c5 --- M client/includes/Store/Sql/ConsistentReadConnectionManager.php 1 file changed, 5 insertions(+), 115 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/Store/Sql/ConsistentReadConnectionManager.php b/client/includes/Store/Sql/ConsistentReadConnectionManager.php index 57adf73..078c17d 100644 --- a/client/includes/Store/Sql/ConsistentReadConnectionManager.php +++ b/client/includes/Store/Sql/ConsistentReadConnectionManager.php @@ -2,10 +2,7 @@ namespace Wikibase\Client\Store\Sql; -use Database; -use IDatabase; -use InvalidArgumentException; -use LoadBalancer; +use Wikimedia\Rdbms\SessionConsistentConnectionManager; /** * Database connection manager. @@ -24,120 +21,13 @@ * * @license GPL-2.0+ * @author Daniel Kinzler + * + * @deprecated Please use SessionConsistentConnectionManager from core */ -class ConsistentReadConnectionManager { +class ConsistentReadConnectionManager extends SessionConsistentConnectionManager{ - /** -* @var LoadBalancer -*/ - private $loadBalancer; - - /** -* The symbolic name of the target database, or false for the local wiki's database. -* -* @var string|false -*/ - private $dbName; - - /** -* @var bool If true, getReadConnection() will also return a DB_MASTER connection. -*/ - private $forceMaster = false; - - /** -* @param LoadBalancer $loadBalancer -* @param string|bool $dbName Optional, defaults to current wiki. -*This follows the convention for database names used by $loadBalancer. -* -* @throws InvalidArgumentException -*/ - public function __construct( LoadBalancer $loadBalancer, $dbName = false ) { - if ( !is_string( $dbName ) && $dbName !== false ) { - throw new InvalidArgumentException( '$dbName must be a string, or false.' ); - } - - $this->loadBalancer = $loadBalancer; - $this->dbName = $dbName; - } - - /** -* Forces all future calls to getReadConnection() to return a connection to the master DB. -* Use this before performing read operations that are critical for a future update. -* Calling beginAtomicSection() implies a call to forceMaster(). -*/ public function forceMaster() { - $this->forceMaster = true; - } - - /** -* Returns a database connection for reading. The connection should later be released by -* calling releaseConnection(). -* -* @note: If forceMaster() or beginAtomicSection() were previously called on this -* ConsistentReadConnectionManager instance, this method will return a connection to the master database, -* to avoid inconsistencies. -* -* @return Database -*/ - public function getReadConnection() { - $dbIndex = $this->forceMaster ? DB_MASTER : DB_SLAVE; - return $this->loadBalancer->getConnection( $dbIndex, array(), $this->dbName ); - } - - /** -* Returns a connection to the master DB, for updating. The connection should later be released -* by calling releaseConnection(). -* -* @return Database -*/ - public function getWriteConnection() { - return $this->loadBalancer->getConnection( DB_MASTER, array(), $this->dbName ); - } - - /** -* @param IDatabase $db -*/ - public function releaseConnection( IDatabase $db ) { - $this->loadBalancer->reuseConnection( $db ); - } - - /** -* Begins an atomic section and returns a database connection to the master DB, for updating. -* -* @note: This causes all future calls to getReadConnection() to return a connection -* to the master DB, even after commitAtomicSection() or rollbackAtomicSection() have -* been called. -* -* @param string $fname -* -* @return Database -*/ - public function beginAtomicSection( $fname ) { - // Once we have written to master, do not read from slave. - $this->forceMaster(); - - $db = $this->getWriteConnection(); - $db->startAtomic( $fname ); - return $db; - } - - /** -* @param IDatabase $db -* @param string $fname -*/ - public function commitAtomicSection( IDatabase $db, $fn
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Set phabricator active server for iridium and p...
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/324833 Change subject: Phabricator: Set phabricator active server for iridium and phab2001 .. Phabricator: Set phabricator active server for iridium and phab2001 This will allow phabricator to start on phab2001 I think. Bug: T137928 Change-Id: Ia97e62c1077415b41f77deb1cf4af4e298e12a58 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/324833/1 -- To view, visit https://gerrit.wikimedia.org/r/324833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia97e62c1077415b41f77deb1cf4af4e298e12a58 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Set domain for phab2001 in codfw
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/324832 Change subject: Phabricator: Set domain for phab2001 in codfw .. Phabricator: Set domain for phab2001 in codfw sets domain to phabricator-new.wmflabs.org Bug: T152132 Bug: T137928 Change-Id: I0b7c9adf300d6765c0f0168c450c00eb361bcc22 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/324832/1 -- To view, visit https://gerrit.wikimedia.org/r/324832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b7c9adf300d6765c0f0168c450c00eb361bcc22 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian-trusty]: Changelog for package 1.1.4~trusty
Tim Starling has submitted this change and it was merged. Change subject: Changelog for package 1.1.4~trusty .. Changelog for package 1.1.4~trusty Change-Id: I127a351245f2f649385dd864a5e5e259587eeefd --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index f868901..707ed20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +html5depurate (1.1.4~trusty) unstable; urgency=medium + + * Backport to trusty + + -- Tim Starling Fri, 02 Dec 2016 10:27:50 +1100 + html5depurate (1.1.4) unstable; urgency=medium * Eliminate edge cases from p-wrapping and block tag interaction (patch by -- To view, visit https://gerrit.wikimedia.org/r/324831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I127a351245f2f649385dd864a5e5e259587eeefd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian-trusty Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian-trusty]: Merge branch 'debian' into debian-trusty
Tim Starling has submitted this change and it was merged. Change subject: Merge branch 'debian' into debian-trusty .. Merge branch 'debian' into debian-trusty Change-Id: I9a2c3a4bdb3bf03eb821c53a4d1ec8c49a6efa11 --- M debian/changelog 1 file changed, 6 insertions(+), 8 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index c0e2b7f..f868901 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,17 +1,15 @@ -<<< HEAD (c3cdaa Merge branch 'debian' into debian-trusty) -html5depurate (1.1.3~trusty) trusty; urgency=medium - - * Backport to trusty - - -- Tim Starling Fri, 11 Nov 2016 14:32:14 +1100 -=== html5depurate (1.1.4) unstable; urgency=medium * Eliminate edge cases from p-wrapping and block tag interaction (patch by Subramanya Sastry). -- Tim Starling Fri, 02 Dec 2016 10:23:21 +1100 ->>> BRANCH (5364fe Changelog for package version 1.1.4) + +html5depurate (1.1.3~trusty) trusty; urgency=medium + + * Backport to trusty + + -- Tim Starling Fri, 11 Nov 2016 14:32:14 +1100 html5depurate (1.1.3) unstable; urgency=medium -- To view, visit https://gerrit.wikimedia.org/r/324830 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a2c3a4bdb3bf03eb821c53a4d1ec8c49a6efa11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian-trusty Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian]: Merge branch 'master' into debian
Tim Starling has submitted this change and it was merged. Change subject: Merge branch 'master' into debian .. Merge branch 'master' into debian Change-Id: I89ec40350d2d96fd09670e1fbffa826c2d53df20 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/324828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89ec40350d2d96fd09670e1fbffa826c2d53df20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian]: Changelog for package version 1.1.4
Tim Starling has submitted this change and it was merged. Change subject: Changelog for package version 1.1.4 .. Changelog for package version 1.1.4 Change-Id: I682ab5683a7dfed45163f0f84364cad0fd2c45dd --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 25d8da7..efd2a19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +html5depurate (1.1.4) unstable; urgency=medium + + * Eliminate edge cases from p-wrapping and block tag interaction (patch by +Subramanya Sastry). + + -- Tim Starling Fri, 02 Dec 2016 10:23:21 +1100 + html5depurate (1.1.3) unstable; urgency=medium * Fix p-wrapping of non-phrasing content (T150317) -- To view, visit https://gerrit.wikimedia.org/r/324829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I682ab5683a7dfed45163f0f84364cad0fd2c45dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian Gerrit-Owner: Tim Starling Gerrit-Reviewer: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian-trusty]: Changelog for package 1.1.4~trusty
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/324831 Change subject: Changelog for package 1.1.4~trusty .. Changelog for package 1.1.4~trusty Change-Id: I127a351245f2f649385dd864a5e5e259587eeefd --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/html5depurate refs/changes/31/324831/1 diff --git a/debian/changelog b/debian/changelog index f868901..707ed20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +html5depurate (1.1.4~trusty) unstable; urgency=medium + + * Backport to trusty + + -- Tim Starling Fri, 02 Dec 2016 10:27:50 +1100 + html5depurate (1.1.4) unstable; urgency=medium * Eliminate edge cases from p-wrapping and block tag interaction (patch by -- To view, visit https://gerrit.wikimedia.org/r/324831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I127a351245f2f649385dd864a5e5e259587eeefd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian-trusty Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian-trusty]: Merge branch 'debian' into debian-trusty
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/324830 Change subject: Merge branch 'debian' into debian-trusty .. Merge branch 'debian' into debian-trusty Change-Id: I9a2c3a4bdb3bf03eb821c53a4d1ec8c49a6efa11 --- M debian/changelog 1 file changed, 6 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/html5depurate refs/changes/30/324830/1 diff --git a/debian/changelog b/debian/changelog index c0e2b7f..f868901 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,17 +1,15 @@ -<<< HEAD (c3cdaa Merge branch 'debian' into debian-trusty) -html5depurate (1.1.3~trusty) trusty; urgency=medium - - * Backport to trusty - - -- Tim Starling Fri, 11 Nov 2016 14:32:14 +1100 -=== html5depurate (1.1.4) unstable; urgency=medium * Eliminate edge cases from p-wrapping and block tag interaction (patch by Subramanya Sastry). -- Tim Starling Fri, 02 Dec 2016 10:23:21 +1100 ->>> BRANCH (5364fe Changelog for package version 1.1.4) + +html5depurate (1.1.3~trusty) trusty; urgency=medium + + * Backport to trusty + + -- Tim Starling Fri, 11 Nov 2016 14:32:14 +1100 html5depurate (1.1.3) unstable; urgency=medium -- To view, visit https://gerrit.wikimedia.org/r/324830 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a2c3a4bdb3bf03eb821c53a4d1ec8c49a6efa11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian-trusty Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian]: Merge branch 'master' into debian
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/324828 Change subject: Merge branch 'master' into debian .. Merge branch 'master' into debian Change-Id: I89ec40350d2d96fd09670e1fbffa826c2d53df20 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/html5depurate refs/changes/28/324828/1 -- To view, visit https://gerrit.wikimedia.org/r/324828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89ec40350d2d96fd09670e1fbffa826c2d53df20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[debian]: Changelog for package version 1.1.4
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/324829 Change subject: Changelog for package version 1.1.4 .. Changelog for package version 1.1.4 Change-Id: I682ab5683a7dfed45163f0f84364cad0fd2c45dd --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/html5depurate refs/changes/29/324829/1 diff --git a/debian/changelog b/debian/changelog index 25d8da7..efd2a19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +html5depurate (1.1.4) unstable; urgency=medium + + * Eliminate edge cases from p-wrapping and block tag interaction (patch by +Subramanya Sastry). + + -- Tim Starling Fri, 02 Dec 2016 10:23:21 +1100 + html5depurate (1.1.3) unstable; urgency=medium * Fix p-wrapping of non-phrasing content (T150317) -- To view, visit https://gerrit.wikimedia.org/r/324829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I682ab5683a7dfed45163f0f84364cad0fd2c45dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/html5depurate Gerrit-Branch: debian Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Fix missing page images everywhere
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/324827 Change subject: Fix missing page images everywhere .. Fix missing page images everywhere Page images was updated to have a split between the 'best' page image, and the best free page image. Unfortunately the deployment plan didn't take into account that the default 'free' would be pointing to an unpopulated page prop, which will not be populated until LinksUpdate has run for every page on every wiki which could take weeks or months. To restore some semblance of order, make the default point at the currently populated field. A followup will need to be done to populate the appropriate field. Bug: T152155 Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 --- M includes/ApiQueryPageImages.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/27/324827/1 diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 5de31a4..a83f79d 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -250,7 +250,7 @@ 'license' => [ ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ], ApiBase::PARAM_ISMULTI => false, - ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE, + ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY, ], 'continue' => [ ApiBase::PARAM_TYPE => 'integer', -- To view, visit https://gerrit.wikimedia.org/r/324827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...html5depurate[master]: Eliminate edge cases from p-wrapping and block tag interaction
Tim Starling has submitted this change and it was merged. Change subject: Eliminate edge cases from p-wrapping and block tag interaction .. Eliminate edge cases from p-wrapping and block tag interaction * Move this closer to an "ideal" DOM-based p-wrapping algorithm (in SAX land, however). Output on some of these snippets matches Parsoid's and PHP-Parser+Tidy's in rendering (based on limited testing of different snippets in a browser). * Eliminates the somewhat surprising edge cases found in T150317. * Updated one test and added three new tests. * Added a flush() call to the output stream since I was seeing some oddities based on presence/absence of debug output calls. Bug: T150317 Change-Id: I94cd5b98812403b1758a231ca1ed56d3887555c8 --- M src/main/java/org/wikimedia/html5depurate/CompatibilitySerializer.java M src/main/java/org/wikimedia/html5depurate/DepurateSerializer.java M src/test/java/org/wikimedia/html5depurate/DepuratorTest.java 3 files changed, 143 insertions(+), 27 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved diff --git a/src/main/java/org/wikimedia/html5depurate/CompatibilitySerializer.java b/src/main/java/org/wikimedia/html5depurate/CompatibilitySerializer.java index a02a1b9..2547094 100644 --- a/src/main/java/org/wikimedia/html5depurate/CompatibilitySerializer.java +++ b/src/main/java/org/wikimedia/html5depurate/CompatibilitySerializer.java @@ -24,29 +24,36 @@ public String localName; public String qName; public Attributes attrs; - OutputStream stream; + OutputStream savedStream; public boolean needsPWrapping; public boolean isPWrapper; public boolean blank; + public boolean hasText; + public boolean split; + public int blockNestingLevel; public boolean isDisabledPWrapper; public StackEntry(String uri_, String localName_, String qName_, - Attributes attrs_, OutputStream stream_) { + Attributes attrs_, OutputStream savedStream_) { uri = uri_; localName = localName_; qName = qName_; attrs = attrs_; - stream = stream_; + savedStream = savedStream_; needsPWrapping = "body".equals(localName_) || "blockquote".equals(localName_); blank = true; + hasText = false; isPWrapper = "mw:p-wrap".equals(localName_); + blockNestingLevel = 0; + isDisabledPWrapper = false; + split = false; } } protected Stack m_stack; protected DepurateSerializer m_serializer; - protected StackEntry m_currentPWrapper; + protected Stack m_pStack; // Warning: this list must be in alphabetical order protected static final String[] ONLY_INLINE_ELEMENTS = {"a", "abbr", "acronym", @@ -61,12 +68,13 @@ public CompatibilitySerializer(OutputStream out) { m_stack = new Stack(); + m_pStack = new Stack(); m_serializer = new DepurateSerializer(out); } - private StackEntry peek() throws SAXException { + private StackEntry peek(Stack stack) throws SAXException { try { - return m_stack.peek(); + return stack.peek(); } catch (EmptyStackException e) { return null; } @@ -80,12 +88,12 @@ try { StackEntry entry = m_stack.pop(); if (entry.isPWrapper) { - m_currentPWrapper = null; + m_pStack.pop(); } - ByteArrayOutputStream oldStream = + ByteArrayOutputStream entryStream = (ByteArrayOutputStream)m_serializer.getOutputStream(); - m_serializer.setOutputStream(entry.stream); - return oldStream; + m_serializer.setOutputStream(entry.savedStream); + return entryStream; } catch (EmptyStackException e) { throw new SAXException(e); } @@ -110,7 +118,7 @@ */ private StackEntry pushPWrapper() throws SAXException { StackEntry entry = push("", "mw:p-wrap", "mw:p-wrap", new AttributesImpl()); - m_currentPWrapper = entry; + m_pStack.push(entry); return entry;
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Prevent endless error loop if falling back to wikitext (afte...
jenkins-bot has submitted this change and it was merged. Change subject: Prevent endless error loop if falling back to wikitext (after a load failure) fails. .. Prevent endless error loop if falling back to wikitext (after a load failure) fails. Change-Id: Id48fa13a33aee9fabf857d20a75d26463c329f44 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 17082a3..2f0577c 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -317,6 +317,7 @@ // Parent method ve.init.mw.DesktopArticleTarget.super.prototype.loadSuccess.apply( this, arguments ); + this.wikitextFallbackLoading = false; // Duplicate of this code in ve.init.mw.DesktopArticleTarget.init.js if ( $( '#ca-edit' ).hasClass( 'visualeditor-showtabdialog' ) ) { $( '#ca-edit' ).removeClass( 'visualeditor-showtabdialog' ); @@ -609,6 +610,13 @@ // Parent method ve.init.mw.DesktopArticleTarget.super.prototype.loadFail.apply( this, arguments ); + if ( this.wikitextFallbackLoading ) { + // Failed twice now + mw.log.warn( 'Failed to fall back to wikitext', errorText, error ); + location.href = target.viewUri.clone().extend( { action: 'edit', veswitched: 1 } ); + return; + } + // Don't show an error if the load was manually aborted // The response.status check here is to catch aborts triggered by navigation away from the page if ( @@ -650,6 +658,7 @@ target.deactivate( true ); } else { // TODO: Some sort of progress bar? + target.wikitextFallbackLoading = true; target.switchToWikitextEditor( true, false ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/321908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id48fa13a33aee9fabf857d20a75d26463c329f44 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Esanders 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]: installer: Restore link text in default main page content
jenkins-bot has submitted this change and it was merged. Change subject: installer: Restore link text in default main page content .. installer: Restore link text in default main page content Accidentally got dropped in b85a17b7543. Change-Id: I30b7a8d42877a54749792e97e49670087a85ca2b --- M includes/installer/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index b25ff2c..95d2ba3 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -308,5 +308,5 @@ "config-nofile": "File \"$1\" could not be found. Has it been deleted?", "config-extension-link": "Did you know that your wiki supports [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions extensions]?\n\nYou can browse [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category extensions by category] or the [https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] to see the full list of extensions.", "mainpagetext": "MediaWiki has been installed.", - "mainpagedocfooter": "Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents] for information on using the wiki software.\n\n== Getting started ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]" + "mainpagedocfooter": "Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.\n\n== Getting started ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]" } -- To view, visit https://gerrit.wikimedia.org/r/324824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30b7a8d42877a54749792e97e49670087a85ca2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Alex Monk 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...PageImages[master]: Revert "Allow querying non-free images too"
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324826 Change subject: Revert "Allow querying non-free images too" .. Revert "Allow querying non-free images too" Most images are gone. This reverts commit 382c70f981831c16ba11a5dd5e9679368fd5282a. Bug: T152155 Change-Id: I3fefa06103481f48dbd62b9a1b7658301a341be9 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/ApiQueryPageImages.php M includes/LinksUpdateHookHandler.php M includes/PageImages.php M tests/phpunit/ApiQueryPageImagesTest.php M tests/phpunit/LinksUpdateHookHandlerTest.php M tests/phpunit/PageImagesTest.php 9 files changed, 98 insertions(+), 315 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/26/324826/1 diff --git a/extension.json b/extension.json index 4e74d66..7c9bc0a 100644 --- a/extension.json +++ b/extension.json @@ -56,6 +56,10 @@ "20": 5, "30": 0, "31": -100 + }, + "rights": { + "@doc": "don't show nonfree images", + "nonfree": -100 } } }, diff --git a/i18n/en.json b/i18n/en.json index a0b48e8..5ce3e6f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,8 +9,5 @@ "apihelp-query+pageimages-example-1": "Get name and 100-pixel thumbnail of an image on the Albert Einstein page.", "apihelp-query+pageimages-param-prop": "Which information to return:\n;thumbnail:URL and dimensions of image associated with page, if any.\n;name:Image title.", "apihelp-query+pageimages-param-thumbsize": "Maximum thumbnail dimension.", - "apihelp-query+pageimages-param-limit": "Properties of how many pages to return.", - "apihelp-query+pageimages-param-license": "Limit page images to a certain license type", - "apihelp-query+pageimages-paramvalue-license-free": "only free images", - "apihelp-query+pageimages-paramvalue-license-any": "best image, whether free or non-free." + "apihelp-query+pageimages-param-limit": "Properties of how many pages to return." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 4aa4243..05a7c28 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,8 +12,5 @@ "apihelp-query+pageimages-example-1": "{{doc-apihelp-example|query+pageimages}}", "apihelp-query+pageimages-param-prop": "{{doc-apihelp-param|query+pageimages|prop}}", "apihelp-query+pageimages-param-thumbsize": "{{doc-apihelp-param|query+pageimages|thumbsize}}", - "apihelp-query+pageimages-param-limit": "{{doc-apihelp-param|query+pageimages|limit}}", - "apihelp-query+pageimages-param-license": "{{doc-apihelp-param|query+pageimages|license}}", - "apihelp-query+pageimages-paramvalue-license-free": "{{doc-apihelp-paramvalue|query+pageimages|license|free}}", - "apihelp-query+pageimages-paramvalue-license-any": "{{doc-apihelp-paramvalue|query+pageimages|license|any}}" + "apihelp-query+pageimages-param-limit": "{{doc-apihelp-param|query+pageimages|limit}}" } diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 0f6437a..098b765 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -14,16 +14,6 @@ class ApiQueryPageImages extends ApiQueryBase { /** -* @const API parameter value for free images -*/ - const PARAM_LICENSE_FREE = 'free'; - - /** -* @const API parameter value for images with any type of license -*/ - const PARAM_LICENSE_ANY = 'any'; - - /** * @param ApiQuery $query * @param string $moduleName */ @@ -76,6 +66,8 @@ if ( !count( $prop ) ) { $this->dieUsage( 'No properties selected', '_noprop' ); } + $size = $params['thumbsize']; + $limit = $params['limit']; $allTitles = $this->getTitles(); @@ -96,7 +88,6 @@ } } - $limit = $params['limit']; // Slice the part of the array we want to find images for $titles = array_slice( $allTitles, $offset, $limit, true ); @@ -115,30 +106,19 @@ } } - $size = $params['thumbsize']; // Extract page images from the page_props table if ( count( $titles ) > 0 ) { $this->addTables( 'page_props' ); $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) ); - $this->addWhere( array( 'pp_page' => array_keys( $titles ), -
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Skipping 2 tests for hatnotes in the experimental endpoints
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/324825 Change subject: Skipping 2 tests for hatnotes in the experimental endpoints .. Skipping 2 tests for hatnotes in the experimental endpoints Looks like an edit caused this to fail. Also I think the implementation is not correct. The hatnote should still appear since it still exist in wikitext after the edit https://en.wikipedia.org/w/index.php?title=Order_of_chivalry&diff=next&oldid=752548387 but in the test it doesn't have it. Change-Id: Iaab7f6ee5b03d6660f8d7de481a78c615a17f609 TODO: needs further investigation --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/25/324825/1 diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index f9203c0..03c4f25 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -153,7 +153,7 @@ 'Expected section text to start with lead paragraph. Actual text ' + res.body.sections[0].text); }); }); -it('Enwiki hatnotes are promoted to the lead object', function() { +it.skip('Enwiki hatnotes are promoted to the lead object', function() { return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/mobile-sections-lead/Chivalric%20order' }) .then(function (res) { assert.deepEqual(res.status, 200); diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 61f28cf..ff75931 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -9,7 +9,7 @@ before(function () { return server.start(); }); -it('Hatnotes do not appear in the lead object', function() { +it.skip('Hatnotes do not appear in the lead object', function() { return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/formatted-lead/Chivalric%20order' }) .then(function (res) { assert.deepEqual(res.status, 200); -- To view, visit https://gerrit.wikimedia.org/r/324825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaab7f6ee5b03d6660f8d7de481a78c615a17f609 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] operations/puppet[production]: graphite: switch labs instances cleanup to cron
Filippo Giunchedi has submitted this change and it was merged. Change subject: graphite: switch labs instances cleanup to cron .. graphite: switch labs instances cleanup to cron tmpreaper will run on each puppet run, that's not really feasible because it'd take a long time to scan through all files. Switch to cron + find instead to be ran once a day. Bug: T143405 Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477 --- M modules/role/manifests/graphite/production.pp 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/role/manifests/graphite/production.pp b/modules/role/manifests/graphite/production.pp index 05dc90f..efb3e4e 100644 --- a/modules/role/manifests/graphite/production.pp +++ b/modules/role/manifests/graphite/production.pp @@ -28,9 +28,11 @@ } # Cleanup stale labs instances data - T143405 -tmpreaper::reap { 'graphite-labs-instances': -path => "${storage_dir}/instances", -age => '90d', +cron { 'graphite-labs-instances': +command => "[ -d ${storage_dir}/whisper/instances ] && find ${storage_dir}/whisper/instances -type f -mtime +90 -delete && find ${storage_dir}/whisper/instances -type d -empty -delete", +user=> '_graphite', +hour=> '8', +minute => fqdn_rand(60), } $graphite_hosts = [ -- To view, visit https://gerrit.wikimedia.org/r/324820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: installer: Restore link text in default main page content
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/324824 Change subject: installer: Restore link text in default main page content .. installer: Restore link text in default main page content Accidentally got dropped in b85a17b7543. Change-Id: I30b7a8d42877a54749792e97e49670087a85ca2b --- M includes/installer/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/324824/1 diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index b25ff2c..95d2ba3 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -308,5 +308,5 @@ "config-nofile": "File \"$1\" could not be found. Has it been deleted?", "config-extension-link": "Did you know that your wiki supports [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions extensions]?\n\nYou can browse [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category extensions by category] or the [https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] to see the full list of extensions.", "mainpagetext": "MediaWiki has been installed.", - "mainpagedocfooter": "Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents] for information on using the wiki software.\n\n== Getting started ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]" + "mainpagedocfooter": "Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.\n\n== Getting started ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]" } -- To view, visit https://gerrit.wikimedia.org/r/324824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30b7a8d42877a54749792e97e49670087a85ca2b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Use widget.getApi, not this.getApi
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/324823 Change subject: Use widget.getApi, not this.getApi .. Use widget.getApi, not this.getApi Bug: T152154 Change-Id: Id7e77323ffabf43e73481cf6bcb9a1e649dc --- M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/23/324823/1 diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js index eb34fc4..93e812e 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js @@ -93,7 +93,7 @@ if ( widget.showRedirects ) { params.redirects = '1'; } - xhr = this.getApi().get( params ); + xhr = widget.getApi().get( params ); return xhr.promise( { abort: xhr.abort } ); } } ) -- To view, visit https://gerrit.wikimedia.org/r/324823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7e77323ffabf43e73481cf6bcb9a1e649dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: Record sum of all wikis for geo tag counts
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324822 Change subject: Record sum of all wikis for geo tag counts .. Record sum of all wikis for geo tag counts Change-Id: I5f78e4dba33bc28532e0187c34cf2811dec4eceb --- M geo-tag-counts.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats refs/changes/22/324822/1 diff --git a/geo-tag-counts.php b/geo-tag-counts.php index 926f705..93d4268 100644 --- a/geo-tag-counts.php +++ b/geo-tag-counts.php @@ -16,6 +16,8 @@ ); $graphite = new Graphite( $config ); +$pages = 0; +$content = 0; foreach ( $matrix->getSites() as $site ) { $dbName = $site->getDbName(); // Can't quote it, have to validate @@ -31,6 +33,7 @@ $res = query( 'SELECT count(*) AS num FROM geo_tags WHERE gt_primary=1' ); if ( $res && ( $row = $res->fetch() ) ) { +$pages += $row['num']; $graphite->record( "geodata.pages.$siteKey.hourly", $row['num'] ); } @@ -42,10 +45,14 @@ . "AND page_namespace IN ($ns) AND gt_primary=1" ); if ( $res && ( $row = $res->fetch() ) ) { +$content += $row['num']; $graphite->record( "geodata.content.$siteKey.hourly", $row['num'] ); } } +$graphite->record( "geodata.pages.all.hourly", $pages ); +$graphite->record( "geodata.content.all.hourly", $content ); + function query( $sql ) { global $db; -- To view, visit https://gerrit.wikimedia.org/r/324822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f78e4dba33bc28532e0187c34cf2811dec4eceb Gerrit-PatchSet: 1 Gerrit-Project: analytics/discovery-stats Gerrit-Branch: master Gerrit-Owner: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Implement convertFromSource/convertToSource in WikitextSurfa...
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/324821 Change subject: Implement convertFromSource/convertToSource in WikitextSurfaceFragment .. Implement convertFromSource/convertToSource in WikitextSurfaceFragment Depends-On: Iaa41c49e2f8e28af28a8a64cb6915f705fa35e8c Change-Id: I746619d442fb565cd582cb09de3126526c73c333 --- M modules/ve-mw/dm/ve.dm.MWWikitextSurfaceFragment.js 1 file changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/21/324821/1 diff --git a/modules/ve-mw/dm/ve.dm.MWWikitextSurfaceFragment.js b/modules/ve-mw/dm/ve.dm.MWWikitextSurfaceFragment.js index 2a2be95..1e2afe0 100644 --- a/modules/ve-mw/dm/ve.dm.MWWikitextSurfaceFragment.js +++ b/modules/ve-mw/dm/ve.dm.MWWikitextSurfaceFragment.js @@ -127,7 +127,7 @@ /** * @inheritdoc */ -ve.dm.MWWikitextSurfaceFragment.prototype.convertDocument = function ( doc ) { +ve.dm.MWWikitextSurfaceFragment.prototype.convertToSource = function ( doc ) { var wikitextPromise; if ( !doc.data.hasContent() ) { @@ -147,3 +147,30 @@ return wikitextPromise; }; + +/** + * @inheritdoc + */ +ve.dm.MWWikitextSurfaceFragment.prototype.convertFromSource = function ( source ) { + var parsePromise = new mw.Api().post( { + action: 'visualeditor', + paction: 'parsefragment', + page: mw.config.get( 'wgRelevantPageName' ), + wikitext: source + } ).then( function ( response ) { + return ve.dm.converter.getModelFromDom( + ve.createDocumentFromHtml( response.visualeditor.content ) + ); + } ); + + // TODO: Emit an event to trigger the progress bar + ve.init.target.getSurface().createProgress( + parsePromise, ve.msg( 'visualeditor-generating-wikitext-progress' ) + ).done( function ( progressBar, cancelPromise ) { + cancelPromise.fail( function () { + parsePromise.abort(); + } ); + } ); + + return parsePromise; +}; -- To view, visit https://gerrit.wikimedia.org/r/324821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I746619d442fb565cd582cb09de3126526c73c333 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/puppet[production]: graphite: switch labs instances cleanup to cron
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324820 Change subject: graphite: switch labs instances cleanup to cron .. graphite: switch labs instances cleanup to cron tmpreaper will run on each puppet run, that's not really feasible because it'd take a long time to scan through all files. Switch to cron + find instead to be ran once a day. Bug: T143405 Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477 --- M modules/role/manifests/graphite/production.pp 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/324820/1 diff --git a/modules/role/manifests/graphite/production.pp b/modules/role/manifests/graphite/production.pp index 05dc90f..9070dcc 100644 --- a/modules/role/manifests/graphite/production.pp +++ b/modules/role/manifests/graphite/production.pp @@ -28,9 +28,11 @@ } # Cleanup stale labs instances data - T143405 -tmpreaper::reap { 'graphite-labs-instances': -path => "${storage_dir}/instances", -age => '90d', +cron { 'graphite-labs-instances': +command => "[ -d ${storage_dir}/whisper/instances ] && find ${storage_dir}/whisper/instances -type f -mtime +90 -delete && find ${storage_dir}/whisper/instances -type d -empty -delete", +user=> "_graphite", +hour=> "8", +minute => fqdn_rand(60), } $graphite_hosts = [ -- To view, visit https://gerrit.wikimedia.org/r/324820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8c51dd440dc2e7f5adfac8fac5959fdbc0fa477 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/puppet[production]: graphite: cleanup labs instances metrics
Filippo Giunchedi has submitted this change and it was merged. Change subject: graphite: cleanup labs instances metrics .. graphite: cleanup labs instances metrics Periodically cleanup labs instances data older than 90d. Bug: T143405 Change-Id: I2a5e568fc45ae9de712af1dc506cf618a8ac9fe9 --- M modules/role/manifests/graphite/production.pp 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Filippo Giunchedi: Looks good to me, approved Rush: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/role/manifests/graphite/production.pp b/modules/role/manifests/graphite/production.pp index 7d9e4f6..05dc90f 100644 --- a/modules/role/manifests/graphite/production.pp +++ b/modules/role/manifests/graphite/production.pp @@ -5,8 +5,10 @@ # Instance requires people to authenticate via LDAP before they can see metrics. # class role::graphite::production { +$storage_dir = '/var/lib/carbon' + class { 'role::graphite::base': -storage_dir => '/var/lib/carbon', +storage_dir => $storage_dir, auth => true, c_relay_settings => { forward_clusters => { @@ -25,6 +27,12 @@ } } +# Cleanup stale labs instances data - T143405 +tmpreaper::reap { 'graphite-labs-instances': +path => "${storage_dir}/instances", +age => '90d', +} + $graphite_hosts = [ 'graphite1001.eqiad.wmnet', 'graphite1003.eqiad.wmnet', @@ -36,7 +44,7 @@ include rsync::server rsync::server::module { 'carbon': -path=> '/var/lib/carbon', +path=> $storage_dir, uid => '_graphite', gid => '_graphite', hosts_allow => $graphite_hosts, -- To view, visit https://gerrit.wikimedia.org/r/323339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a5e568fc45ae9de712af1dc506cf618a8ac9fe9 Gerrit-PatchSet: 8 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Rush 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] mediawiki/core[master]: Replace some usages of Liner::link with LinkRenderer
Victorbarbu has uploaded a new change for review. https://gerrit.wikimedia.org/r/324819 Change subject: Replace some usages of Liner::link with LinkRenderer .. Replace some usages of Liner::link with LinkRenderer Classes: CreditsAction HistoryAction InfoAction CacheHelper ChangeTagsLogItem ContentModelLogFormatter PatrolLogFormatter ProtectLogFormatter Bug: T149346 Change-Id: If02094df5dd7acc6efd02e540515f8e472ec3d4d --- M includes/actions/CreditsAction.php M includes/actions/HistoryAction.php M includes/actions/InfoAction.php M includes/cache/CacheHelper.php M includes/changetags/ChangeTagsLogItem.php M includes/logging/ContentModelLogFormatter.php M includes/logging/PatrolLogFormatter.php M includes/logging/ProtectLogFormatter.php 8 files changed, 41 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/324819/1 diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php index 1332ab4..198213c 100644 --- a/includes/actions/CreditsAction.php +++ b/includes/actions/CreditsAction.php @@ -205,7 +205,9 @@ ? SpecialPage::getTitleFor( 'Contributions', $user->getName() ) : $user->getUserPage(); - return Linker::link( $page, htmlspecialchars( $real ? $real : $user->getName() ) ); + return \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( + $page, htmlspecialchars( $real ? $real : $user->getName() ) + ); } /** @@ -231,7 +233,7 @@ * @return string HTML link */ protected function othersLink() { - return Linker::linkKnown( + return \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink( $this->getTitle(), $this->msg( 'others' )->escaped(), [], diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index c1763fa..703adfe 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -58,7 +58,7 @@ protected function getDescription() { // Creation of a subtitle link pointing to [[Special:Log]] - return Linker::linkKnown( + return \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Log' ), $this->msg( 'viewpagelogs' )->escaped(), [], @@ -734,7 +734,8 @@ $undoTooltip = $latest ? [ 'title' => $this->msg( 'tooltip-undo' )->text() ] : []; - $undolink = Linker::linkKnown( + $linkRenderer = \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer(); + $undolink = $linkRenderer->makeKnownLink( $this->getTitle(), $this->msg( 'editundo' )->escaped(), $undoTooltip, @@ -790,7 +791,7 @@ $date = $this->getLanguage()->userTimeAndDate( $rev->getTimestamp(), $this->getUser() ); $date = htmlspecialchars( $date ); if ( $rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) { - $link = Linker::linkKnown( + $link = \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink( $this->getTitle(), $date, [ 'class' => 'mw-changeslist-date' ], @@ -818,7 +819,7 @@ if ( $latest || !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) { return $cur; } else { - return Linker::linkKnown( + return \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink( $this->getTitle(), $cur, [], @@ -849,7 +850,7 @@ if ( $next === 'unknown' ) { # Next row probably exists but is unknown, use an oldid=prev link - return Linker::linkKnown( + return \MediaWiki\MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink( $this->getTitle(), $last, [], @@ -868,7 +869,7 @@ return $last; } - return Linker::linkKnown( + return \MediaWiki\MediaWikiServices::getInstance()-
[MediaWiki-commits] [Gerrit] operations/puppet[production]: scap: upgrade to 3.4.1-1
Filippo Giunchedi has submitted this change and it was merged. Change subject: scap: upgrade to 3.4.1-1 .. scap: upgrade to 3.4.1-1 Change-Id: Ic2aa745503f7cb97d1865ab0ef11ecc18606e41d --- M modules/scap/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Filippo Giunchedi: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp index 0ad3e35..e12cc3f 100644 --- a/modules/scap/manifests/init.pp +++ b/modules/scap/manifests/init.pp @@ -12,7 +12,7 @@ class scap ( $deployment_server = 'deployment', $wmflabs_master = 'deployment-tin.eqiad.wmflabs', -$version = '3.4.0-1', +$version = '3.4.1-1', ) { package { 'scap': ensure => $version, -- To view, visit https://gerrit.wikimedia.org/r/324818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2aa745503f7cb97d1865ab0ef11ecc18606e41d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Change label service suggestion to single line
jenkins-bot has submitted this change and it was merged. Change subject: Change label service suggestion to single line .. Change label service suggestion to single line The suggestion only inserts a single triple, and it is uncommon to add more, so I don’t think the service needs to take up three lines in the query by default. The single-line version also doesn’t need to be adjusted for indentation. Change-Id: I6c3fd3be5dee6a169c9d347c67e3e7a71c3e12fb --- M wikibase/queryService/ui/editor/hint/Sparql.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/wikibase/queryService/ui/editor/hint/Sparql.js b/wikibase/queryService/ui/editor/hint/Sparql.js index 5000b84..9df3934 100755 --- a/wikibase/queryService/ui/editor/hint/Sparql.js +++ b/wikibase/queryService/ui/editor/hint/Sparql.js @@ -12,7 +12,7 @@ var SPARQL_KEYWORDS = [ 'SELECT', 'SELECT * WHERE {\n\n}', 'OPTIONAL', 'OPTIONAL {\n\n}', 'WHERE', 'WHERE {\n\n}', 'ORDER', 'ORDER BY', 'DISTINCT', 'SERVICE', - 'SERVICE wikibase:label {\n bd:serviceParam wikibase:language "en" .\n}', 'BASE', + 'SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }', 'BASE', 'PREFIX', 'REDUCED', 'FROM', 'LIMIT', 'OFFSET', 'HAVING', 'UNION', 'SAMPLE', '(SAMPLE() AS )', 'COUNT', '(COUNT() AS )', 'DESC', 'DESC()', 'ASC', 'ASC()', 'FILTER ()', 'FILTER NOT EXISTS', 'FILTER NOT EXISTS {\n\n}', 'UNION', 'UNION {\n\n}', -- To view, visit https://gerrit.wikimedia.org/r/324804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c3fd3be5dee6a169c9d347c67e3e7a71c3e12fb Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Replace job->insert() calls
jenkins-bot has submitted this change and it was merged. Change subject: Replace job->insert() calls .. Replace job->insert() calls Change-Id: I4d4249a62c489ab3e4e2e229ba4326a7e27a0d0c --- M WebVideoTranscode/WebVideoTranscode.php M maintenance/resetTranscodes.php 2 files changed, 4 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 2e041b9..0ada0c4 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -1187,10 +1187,11 @@ 'transcodeKey' => $transcodeKey, ] ); - if ( $job->insert() ) { + try { + JobQueueGroup::singleton()->push( $job ); // Clear the state cache ( now that we have updated the page ) self::clearTranscodeCache( $fileName ); - } else { + } catch ( Exception $ex ) { // Adding job failed, update transcode row $db->update( 'transcode', diff --git a/maintenance/resetTranscodes.php b/maintenance/resetTranscodes.php index 4677c7d..ffb2605 100644 --- a/maintenance/resetTranscodes.php +++ b/maintenance/resetTranscodes.php @@ -31,7 +31,7 @@ 'transcodeMode' => 'derivative', 'transcodeKey' => $row->transcode_key, ] ); - $job->insert(); + JobQueueGroup::singleton()->push( $job ); } } } -- To view, visit https://gerrit.wikimedia.org/r/324363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d4249a62c489ab3e4e2e229ba4326a7e27a0d0c Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Reedy 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/puppet[production]: scap: upgrade to 3.4.1-1
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/324818 Change subject: scap: upgrade to 3.4.1-1 .. scap: upgrade to 3.4.1-1 Change-Id: Ic2aa745503f7cb97d1865ab0ef11ecc18606e41d --- M modules/scap/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/324818/1 diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp index 0ad3e35..e12cc3f 100644 --- a/modules/scap/manifests/init.pp +++ b/modules/scap/manifests/init.pp @@ -12,7 +12,7 @@ class scap ( $deployment_server = 'deployment', $wmflabs_master = 'deployment-tin.eqiad.wmflabs', -$version = '3.4.0-1', +$version = '3.4.1-1', ) { package { 'scap': ensure => $version, -- To view, visit https://gerrit.wikimedia.org/r/324818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2aa745503f7cb97d1865ab0ef11ecc18606e41d 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] mediawiki/core[master]: ApiSandbox: Better handling of parsed messages
jenkins-bot has submitted this change and it was merged. Change subject: ApiSandbox: Better handling of parsed messages .. ApiSandbox: Better handling of parsed messages There are several places where we're parsing a message to an HTML string and passing it into ooui in a way that it'll interpret it as text. There are more where we're handling it properly, but by parsing HTML strings outselves instead of letting mw.Message do it. So, let's add a Util function that will parse a message using .parseDom() and apply our fixups. Change-Id: I1f71916ac2fb3567c2fa2dffc64c4c8c91050ee9 --- M resources/src/mediawiki.special/mediawiki.special.apisandbox.js 1 file changed, 45 insertions(+), 28 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index d2015d8..60155fd 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -51,9 +51,7 @@ tokenWidget: { alertTokenError: function ( code, error ) { windowManager.openWindow( 'errorAlert', { - title: mw.message( - 'apisandbox-results-fixtoken-fail', this.paramInfo.tokentype - ).parse(), + title: Util.parseMsg( 'apisandbox-results-fixtoken-fail', this.paramInfo.tokentype ), message: error, actions: [ { @@ -218,7 +216,7 @@ }; /** -* @class mw.special.ApiSandbox.Utils +* @class mw.special.ApiSandbox.Util * @private */ Util = { @@ -591,17 +589,42 @@ }, /** -* Parse an HTML string, adding target="_blank" to any links +* Parse an HTML string and call Util.fixupHTML() * * @param {string} html HTML to parse * @return {jQuery} */ parseHTML: function ( html ) { var $ret = $( $.parseHTML( html ) ); - $ret.filter( 'a' ).add( $ret.find( 'a' ) ) + return Util.fixupHTML( $ret ); + }, + + /** +* Parse an i18n message and call Util.fixupHTML() +* +* @param {string} key Key of message to get +* @param {...Mixed} parameters Values for $N replacements +* @return {jQuery} +*/ + parseMsg: function () { + var $ret = mw.message.apply( mw.message, arguments ).parseDom(); + return Util.fixupHTML( $ret ); + }, + + /** +* Fix HTML for ApiSandbox display +* +* Fixes are: +* - Add target="_blank" to any links +* +* @param {jQuery} $html DOM to process +* @return {jQuery} +*/ + fixupHTML: function ( $html ) { + $html.filter( 'a' ).add( $html.find( 'a' ) ) .filter( '[href]:not([target])' ) .attr( 'target', '_blank' ); - return $ret; + return $html; } }; @@ -683,7 +706,7 @@ $content .empty() - .append( $( '' ).append( mw.message( 'apisandbox-intro' ).parse() ) ) + .append( $( '' ).append( Util.parseMsg( 'apisandbox-intro' ) ) ) .append( $( '', { id: 'mw-apisandbox-ui' } ) .append( $toolbar ) @@ -896,8 +919,8 @@ $.when.apply( $, deferreds ).done( function () { if ( $.inArray( false, arguments ) !== -1 ) { windowManager.openWindow( 'errorAlert', { - title: mw.message( 'apisandbox-submit-invalid-fields-title' ).parse(), - message: mw.message( 'apisandbox-submit-invalid-fields-message' ).parse(), + title: Util.parseMsg( 'apisandbox-submit-invalid-fields-title' ), + message: Util.parseMsg( 'apisandbox-submit-invalid-
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Use requireExtension()
jenkins-bot has submitted this change and it was merged. Change subject: Use requireExtension() .. Use requireExtension() Bug: T152139 Change-Id: Ic8640edaab651f533cca4ec5e78f9ca5e0e4ae81 --- M generateTables.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/generateTables.php b/generateTables.php index 44452e5..bf2e166 100644 --- a/generateTables.php +++ b/generateTables.php @@ -34,6 +34,7 @@ public function __construct() { parent::__construct(); $this->mDescription = 'Generate tables with hieroglyph information'; + $this->requireExtension( 'WikiHiero' ); $this->moreTables = str_replace( "\r", '', $this->moreTables ); } -- To view, visit https://gerrit.wikimedia.org/r/324813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8640edaab651f533cca4ec5e78f9ca5e0e4ae81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/wikihiero Gerrit-Branch: master Gerrit-Owner: MaxSem 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] mediawiki...deploy[master]: Update mobileapps to b961452
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/324817 Change subject: Update mobileapps to b961452 .. Update mobileapps to b961452 List of changes: 297f302 Remove mobile-summary endpoint b961452 Revert "Revert "Update to service-template-node v0.5.0 (minus eslint)"" xxx Update node module dependencies Change-Id: I8dd6c6388cb4395c57070b23148a043efd76953c --- A node_modules/.bin/semver M node_modules/bunyan/package.json M node_modules/heapdump/build/Makefile M node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d M node_modules/heapdump/build/addon.target.mk M node_modules/heapdump/build/config.gypi M node_modules/js-yaml/package.json M node_modules/preq/.travis.yml M node_modules/preq/index.js A node_modules/preq/node_modules/.bin/semver M node_modules/preq/package.json R node_modules/semver/LICENSE R node_modules/semver/bin/semver R node_modules/semver/package.json R node_modules/semver/range.bnf R node_modules/semver/semver.js M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M node_modules/service-runner/package.json M node_modules/swagger-router/package.json M src 20 files changed, 126 insertions(+), 101 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy refs/changes/17/324817/1 diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 12 index 000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/bunyan/package.json b/node_modules/bunyan/package.json index 07bc907..2572b72 100644 --- a/node_modules/bunyan/package.json +++ b/node_modules/bunyan/package.json @@ -213,7 +213,7 @@ "homepage": "https://github.com/trentm/node-bunyan#readme";, "_id": "bunyan@1.8.5", "_shasum": "0d619e83005fb89070f5f47982fc1bf00600878a", - "_from": "bunyan@>=1.8.3 <2.0.0", + "_from": "bunyan@>=1.8.5 <2.0.0", "_npmVersion": "2.15.9", "_nodeVersion": "4.6.1", "_npmUser": { diff --git a/node_modules/heapdump/build/Makefile b/node_modules/heapdump/build/Makefile index 285e8ee..c9d9d51 100644 --- a/node_modules/heapdump/build/Makefile +++ b/node_modules/heapdump/build/Makefile @@ -308,8 +308,8 @@ endif quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/root/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp -Makefile: $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi +cmd_regen_makefile = cd $(srcdir); /usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/opt/service/node_modules/heapdump/build/config.gypi -I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" "-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp +Makefile: $(srcdir)/../../../../home/runuser/.node-gyp/4.6.0/include/node/common.gypi $(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included diff --git a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d index 022660f..9af41a7 100644 --- a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d +++ b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d @@ -1,34 +1,36 @@ -cmd_Release/obj.target/addon/src/heapdump.o := g++ '-DNODE_GYP_MODULE_NAME=addon' '-DU
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Convert to new array syntax
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324816 Change subject: Convert to new array syntax .. Convert to new array syntax Change-Id: Ief04ee0d01ef4877def3daa5e62da21b494f44d3 --- M HieroTokenizer.php M SpecialHieroglyphs.php M data/tables.php M generateTables.php M wikihiero.body.php 5 files changed, 1,052 insertions(+), 1,052 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero refs/changes/16/324816/1 diff --git a/HieroTokenizer.php b/HieroTokenizer.php index e1f5cc7..6e97510 100644 --- a/HieroTokenizer.php +++ b/HieroTokenizer.php @@ -46,9 +46,9 @@ return; } - self::$delimiters = array_flip( array( ' ', '-', "\t", "\n", "\r" ) ); - self::$tokenDelimiters = array_flip( array( '*', ':', '(', ')' ) ); - self::$singleChars = array_flip( array( '!' ) ); + self::$delimiters = array_flip( [ ' ', '-', "\t", "\n", "\r" ] ); + self::$tokenDelimiters = array_flip( [ '*', ':', '(', ')' ] ); + self::$singleChars = array_flip( [ '!' ] ); } /** @@ -61,8 +61,8 @@ return $this->blocks; } - $this->blocks = array(); - $this->currentBlock = array(); + $this->blocks = []; + $this->currentBlock = []; $this->token = ''; $text = preg_replace( '/\\', 'message' => 'wikihiero-comment', 'example' => 'A1' ), - ); - private $helpColumns = array( + private $syntaxHelp = [ + [ 'code' => '-', 'message' => 'wikihiero-separator', 'example' => 'A1 - B1' ], + [ 'code' => ':', 'message' => 'wikihiero-superposition', 'example' => 'p:t' ], + [ 'code' => '*', 'message' => 'wikihiero-juxtaposition', 'example' => 'p*t' ], + [ 'code' => '!', 'message' => 'wikihiero-eol', 'example' => 'A1-B1 ! C1-D1' ], + [ 'code' => '\\', 'message' => 'wikihiero-mirror', 'example' => 'A1\-A1' ], + [ 'code' => '..', 'message' => 'wikihiero-void', 'example' => 'A1 .. B1' ], + [ 'code' => '.', 'message' => 'wikihiero-half-void', 'example' => 'A1 . B1' ], + [ 'code' => '', 'message' => 'wikihiero-comment', 'example' => 'A1' ], + ]; + private $helpColumns = [ 'code', 'meaning', 'example', 'result', - ); + ]; public function __construct() { parent::__construct( 'Hieroglyphs' ); @@ -70,18 +70,18 @@ $out->addHTML( Html::openElement( 'form', - array( + [ 'method' => 'get', 'action' => $this->getPageTitle()->getLinkUrl(), - ) + ] ) - . Html::element( 'textarea', array( 'id' => 'hiero-text', 'name' => 'text' ), $text ) - . Html::element( 'input', array( + . Html::element( 'textarea', [ 'id' => 'hiero-text', 'name' => 'text' ], $text ) + . Html::element( 'input', [ 'type' => 'submit', 'id' => 'hiero-submit', 'name' => 'submit', 'value' => $this->msg( 'wikihiero-submit' )->text(), - ) ) + ] ) . Html::closeElement( 'form' ) ); @@ -168,7 +168,7 @@ $syntax = wfMessage( 'wikihiero-syntax' )->text(); $html .= '' . Html::element( 'a', - array( 'href' => "#syntax", 'title' => $syntax ), + [ 'href' => "#syntax", 'title' => $syntax ], $syntax ) . ''; @@ -181,7 +181,7 @@ } $html .= '' . Html::element( 'a', - array( 'href' => "#cat-$cat", 'title' => wfMessage( "wikihiero-category-$cat" )->text() ), + [ 'href' => "#cat-$cat", 'title' => wfMessage( "wikihiero-category-$cat" )->text() ], $cat ) . ''; @@ -192,7 +192,7 @@ } $html .= '' . Html::element( 'a', - array
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Minor fixes: comments, obsolete stuff
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324814 Change subject: Minor fixes: comments, obsolete stuff .. Minor fixes: comments, obsolete stuff Change-Id: I213f50e860fae113dc7b20a2fc343b69870cceb3 --- M generateTables.php 1 file changed, 6 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero refs/changes/14/324814/1 diff --git a/generateTables.php b/generateTables.php index bf2e166..2919fa8 100644 --- a/generateTables.php +++ b/generateTables.php @@ -1,9 +1,8 @@ mDescription = 'Generate tables with hieroglyph information'; + $this->addDescription( 'Generate tables with hieroglyph information' ); $this->requireExtension( 'WikiHiero' ); $this->moreTables = str_replace( "\r", '', $this->moreTables ); @@ -50,7 +49,7 @@ if ( $dh ) { while ( ( $file = readdir( $dh ) ) !== false ) { if ( stristr( $file, WikiHiero::IMAGE_EXT ) ) { - list( $width, $height, $type, $attr ) = getimagesize( $imgDir . $file ); + list( $width, $height, , ) = getimagesize( $imgDir . $file ); $wh_files .= " \"" . WikiHiero::getCode( $file ) . "\" => array( $width, $height ),\n"; if ( strchr( $file, '&' ) ) { $wh_prefabs .= " \"" . WikiHiero::getCode( $file ) . "\",\n"; @@ -85,8 +84,8 @@ file_put_contents( 'data/tables.ser', serialize( $result ) ); } - var $moreTables = ' -$wh_phonemes = array( // convertion table phoneme -> Gardinercode + private $moreTables = ' +$wh_phonemes = array( // phoneme -> Gardiner code conversion table "mSa" => "A12", "xr"=> "A15", "Xrd" => "A17", @@ -511,56 +510,6 @@ "\']" => "", ); '; - -/* not used yet -$wh_syntax = array( - "-",//block sepatator - ":",//supperposition - "*",//juxtaposition - "(",//open bracket - ")",//close bracket - "!!", //end of text - "!",//end of line - "..", //blank caracter - ".",//half-size blank caracter - "$",//color - "#",//shade - "[&", //select - "&]", - "[{", - "}]", - "[[", - "]]", - "[\"", - "\"]", - "['", - "']", - "<",//cartouche - ">", - "<1", - "2>", - "<2", - "1>", - "<0", - "0>", - "", - "", - "", - "", - "++", //comment - "+s", //hieroglyph - "+t", //transcription - "+l", //latin-normal - "+i", //latin-italic - "+g", //latin-bold (gras) - "+b", //latin-bold - "+c", -); -*/ } -- To view, visit https://gerrit.wikimedia.org/r/324814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I213f50e860fae113dc7b20a2fc343b69870cceb3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/wikihiero Gerrit-Branch: master Gerrit-Owner: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: Use requireExtension()
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324813 Change subject: Use requireExtension() .. Use requireExtension() Bug: T152139 Change-Id: Ic8640edaab651f533cca4ec5e78f9ca5e0e4ae81 --- M generateTables.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero refs/changes/13/324813/1 diff --git a/generateTables.php b/generateTables.php index 44452e5..bf2e166 100644 --- a/generateTables.php +++ b/generateTables.php @@ -34,6 +34,7 @@ public function __construct() { parent::__construct(); $this->mDescription = 'Generate tables with hieroglyph information'; + $this->requireExtension( 'WikiHiero' ); $this->moreTables = str_replace( "\r", '', $this->moreTables ); } -- To view, visit https://gerrit.wikimedia.org/r/324813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8640edaab651f533cca4ec5e78f9ca5e0e4ae81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/wikihiero Gerrit-Branch: master Gerrit-Owner: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: generateTables cleanup
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/324815 Change subject: generateTables cleanup .. generateTables cleanup * Use absolute paths to make it runnable with mwscript in Vagrant from whatever directory. * Fix use of undefined constant WIKIHIERO_VERSION, use Git hash instead. Change-Id: I592eab04e2ef7493fb5c43684f9c5be7f26fd502 --- M data/tables.php M data/tables.ser M generateTables.php 3 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero refs/changes/15/324815/1 diff --git a/data/tables.php b/data/tables.php index 48bfe35..9980ad0 100644 --- a/data/tables.php +++ b/data/tables.php @@ -1,7 +1,7 @@ array( 34, 32 ), "H8" => array( 15, 18 ), "H8W" => array( 37, 38 ), + "H_HASH" => array( 38, 16 ), + "H_SPACE" => array( 5, 15 ), "HASH" => array( 30, 38 ), "hatching" => array( 75, 46 ), "Hmw&kA" => array( 24, 38 ), - "H_HASH" => array( 38, 16 ), - "H_SPACE" => array( 5, 15 ), "I1" => array( 36, 33 ), "I10" => array( 35, 38 ), "I11" => array( 36, 38 ), @@ -795,8 +795,8 @@ "Q5" => array( 38, 15 ), "Q6" => array( 38, 24 ), "Q7" => array( 20, 37 ), - "QUERY" => array( 18, 28 ), "Q_HASH" => array( 20, 20 ), + "QUERY" => array( 18, 28 ), "r&a&k" => array( 38, 38 ), "r&a&t" => array( 38, 38 ), "r&A1" => array( 38, 38 ), @@ -1025,8 +1025,8 @@ "V7" => array( 9, 26 ), "V8" => array( 12, 28 ), "V9" => array( 20, 20 ), - "VTHREE" => array( 25, 34 ), "V_HASH" => array( 15, 38 ), + "VTHREE" => array( 25, 34 ), "w&&t" => array( 18, 38 ), "w&t" => array( 36, 38 ), "w&y" => array( 38, 38 ), @@ -1118,7 +1118,7 @@ ); -$wh_phonemes = array( // convertion table phoneme -> Gardinercode +$wh_phonemes = array( // phoneme -> Gardiner code conversion table "mSa" => "A12", "xr"=> "A15", "Xrd" => "A17", diff --git a/data/tables.ser b/data/tables.ser index 9e6ad44..4f9d9ba 100644 --- a/data/tables.ser +++ b/data/tables.ser @@ -1 +1 @@ -a:3:{s:11:"wh_phonemes";a:405:{s:3:"mSa";s:3:"A12";s:2:"xr";s:3:"A15";s:3:"Xrd";s:3:"A17";s:2:"sr";s:3:"A21";s:4:"mniw";s:3:"A33";s:3:"qiz";s:3:"A38";s:3:"iry";s:3:"A47";s:3:"Sps";s:3:"A50";s:4:"Spsi";s:3:"A51";s:1:"x";s:3:"Aa1";s:3:"mAa";s:4:"Aa11";s:2:"gs";s:4:"Aa13";s:2:"im";s:4:"Aa13";s:1:"M";s:4:"Aa15";s:2:"sA";s:4:"Aa17";s:3:"apr";s:4:"Aa20";s:3:"wDa";s:4:"Aa21";s:2:"nD";s:4:"Aa27";s:2:"qd";s:4:"Aa28";s:3:"Xkr";s:4:"Aa30";s:2:"Hp";s:3:"Aa5";s:2:"qn";s:3:"Aa8";s:3:"msi";s:2:"B3";s:4:"mAat";s:3:"C10";s:2:"HH";s:3:"C11";s:5:"DHwty";s:2:"C3";s:4:"Xnmw";s:2:"C4";s:4:"inpw";s:2:"C6";s:3:"stX";s:2:"C7";s:3:"mnw";s:2:"C8";s:2:"tp";s:2:"D1";s:4:"wDAt";s:3:"D10";s:1:"R";s:4:"D153";s:3:"fnD";s:3:"D19";s:2:"Hr";s:2:"D2";s:1:"r";s:3:"D21";s:2:"rA";s:3:"D21";s:3:"spt";s:3:"D24";s:4:"spty";s:3:"D25";s:3:"mnD";s:3:"D27";s:2:"kA";s:3:"D28";s:3:"Sny";s:2:"D3";s:3:"aHA";s:3:"D34";s:1:"a";s:3:"D36";s:2:"ir";s:2:"D4";s:3:"Dsr";s:3:"D45";s:1:"d";s:3:"D46";s:3:"Dba";s:3:"D50";s:2:"mt";s:3:"D52";s:2:"gH";s:3:"D56";s:3:"gHs";s:3:"D56";s:2:"rd";s:3:"D56";s:3:"sbq";s:3:"D56";s:1:"b";s:3:"D58";s:2:"ab";s:3:"D59";s:3:"wab";s:3:"D60";s:3:"sAH";s:3:"D61";s:3:"rmi";s:2:"D9";s:3:"zAb";s:3:"E17";s:3:"mAi";s:3:"E22";s:1:"l";s:3:"E23";s:2:"rw";s:3:"E23";s:3:"Aby";s:3:"E24";s:2:"wn";s:3:"E34";s:4:"zzmt";s:2:"E6";s:3:"wsr";s:3:"F12";s:2:"wp";s:3:"F13";s:2:"db";s:3:"F16";s:2:"Hw";s:3:"F18";s:2:"bH";s:3:"F18";s:2:"ns";s:3:"F20";s:3:"DrD";s:3:"F21";s:3:"idn";s:3:"F21";s:4:"msDr";s:3:"F21";s:3:"sDm";s:3:"F21";s:3:"kfA";s:3:"F22";s:2:"pH";s:3:"F22";s:3:"xpS";s:3:"F23";s:3:"wHm";s:3:"F25";s:2:"Xn";s:3:"F26";s:3:"sti";s:3:"F29";s:2:"Sd";s:3:"F30";s:2:"ms";s:3:"F31";s:1:"X";s:3:"F32";s:2:"sd";s:3:"F33";s:2:"ib";s:3:"F34";s:3:"nfr";s:3:"F35";s:3:"zmA";s:3:"F36";s:4:"imAx";s:3:"F39";s:3:"HAt";s:2:"F4";s:2:"Aw";s:3:"F40";s:3:"spr";s:3:"F42";s:3:"isw";s:3:"F44";s:3:"iwa";s:3:"F44";s:3:"pXr";s:3:"F46";s:3:"qAb";s:3:"F46";s:3:"SsA";s:2:"F5";s:1:"A";s:2:"G1";s:3:"mwt";s:3:"G14";s:4:"nbty";s:3:"G16";s:1:"m";s:3:"G17";s:2:"mm";s:3:"G18";s:2:"AA";s:2:"G2";s:2:"nH";s:3:"G21";s:2:"Db";s:3:"G22";s:4:"rxyt";s:3:"G23";s:2:"Ax";s:3:"G25";s:3:"dSr";s:3:"G27";s:2:"gm";s:3:"G28";s:2:"bA";s:3:"G29";s:4:"baHi";s:3:"G32";s:2:"aq";s:3:"G35";s:2:"wr";s:3:"G36";s:3:"nDs";s:3:"G37";s:2:"gb";s:3:"G38";s:2:"zA";s:3:"G39";s:3:"tyw";s:2:"G4";s:2:"pA";s:3:"G40";s:2:"xn";s:3:"G41";s:3:"wSA";s:3:"G42";s:1:"w";s:3:"G43";s:2:"ww";s:3:"G44";s:3:"mAw";s:3:"G46";s:2:"TA";s:3:"G47";s:3:"snD";s:3:"G54";s:2:"pq";s:2:"H2";s:3:"wSm";s:2:"H2";s:3:"pAq";s:2:"H3";s:2:"nr";s:2:"H4";s:2:"Sw";s:2:"H6";s:3:"aSA";s:2:"I1";s:1:"D";s:3:"I10";s:2:"DD";s:3:"I11";s:4:"Styw";s:2:"I2";s:3:"mzH";s:2:"I3";s:3:"sbk";s:2:"I4";s:3:"sAq";s:2:"I5";s:2:"km";s:2:"I6";s:3:"Hfn";s:2:"I8";s:1:"f";s:2:"I9";s:2:"in";s:2:"K1";s:2:"ad";s:2:"K3";s:2:"XA";s:2:"K4";s
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Remove option metamta.maniphest.public-create-e...
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/324812 Change subject: Phabricator: Remove option metamta.maniphest.public-create-email .. Phabricator: Remove option metamta.maniphest.public-create-email This was removed from phabricator core and im getting a warnning about this removed config. https://secure.phabricator.com/rPf99c7beb90fd20f2be51598032c89179bc12fab1 Change-Id: Ifbe079d8373bd78e9d896f1c5594f23d99d6920e --- M modules/role/manifests/phabricator/main.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/324812/1 diff --git a/modules/role/manifests/phabricator/main.pp b/modules/role/manifests/phabricator/main.pp index ebde0cf..e9cacd7 100644 --- a/modules/role/manifests/phabricator/main.pp +++ b/modules/role/manifests/phabricator/main.pp @@ -150,7 +150,6 @@ 'phpmailer.smtp-host'=> inline_template('<%= @mail_smarthost.join(";") %>'), 'metamta.default-address'=> "no-reply@${domain}", 'metamta.domain' => $domain, -'metamta.maniphest.public-create-email' => "task@${domain}", 'metamta.reply-handler-domain' => $domain, 'repository.default-local-path' => '/srv/repos', 'phd.taskmasters'=> 10, -- To view, visit https://gerrit.wikimedia.org/r/324812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbe079d8373bd78e9d896f1c5594f23d99d6920e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: IDatabase::delete() table name parameter should be a string
jenkins-bot has submitted this change and it was merged. Change subject: IDatabase::delete() table name parameter should be a string .. IDatabase::delete() table name parameter should be a string Change-Id: I7ba2cdb6cdddf04819ff80e27814f704f41d15f1 --- M includes/libs/rdbms/database/IDatabase.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index 48d76c4..c6055db 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -1183,7 +1183,7 @@ /** * DELETE query wrapper. * -* @param array $table Table name +* @param string $table Table name * @param string|array $conds Array of conditions. See $conds in IDatabase::select() * for the format. Use $conds == "*" to delete all rows * @param string $fname Name of the calling function -- To view, visit https://gerrit.wikimedia.org/r/324805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ba2cdb6cdddf04819ff80e27814f704f41d15f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reedy Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits