[MediaWiki-commits] [Gerrit] tools: Switch the label selector used in kube2proxy - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Switch the label selector used in kube2proxy .. tools: Switch the label selector used in kube2proxy More consistent with k8s label naming schemes Change-Id: I32c4633eb0ccbfd70c20e1e1d41cf8010e027d61 --- M modules/toollabs/files/kube2dynproxy.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/toollabs/files/kube2dynproxy.py b/modules/toollabs/files/kube2dynproxy.py index 53974fe..91dc299 100755 --- a/modules/toollabs/files/kube2dynproxy.py +++ b/modules/toollabs/files/kube2dynproxy.py @@ -29,7 +29,9 @@ self.session.auth = KubeAuth(token) self.capath = ca_cert self.conn = conn -self.base_params = {'labelSelector': 'toollabs=true'} +self.base_params = { +'labelSelector': 'tools.wmflabs.org/webservice=true' +} self.resourceVersion = 0 def get_services(self): -- To view, visit https://gerrit.wikimedia.org/r/293065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32c4633eb0ccbfd70c20e1e1d41cf8010e027d61 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Coren Gerrit-Reviewer: Merlijn van Deen 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] Fix for non-ASCII characters with UTF-8 - change (mediawiki...DataTransfer)
Yaron Koren has submitted this change and it was merged. Change subject: Fix for non-ASCII characters with UTF-8 .. Fix for non-ASCII characters with UTF-8 Change-Id: Idb4f793648681c347067def24398f415bcb5c26b --- M specials/DT_ImportCSV.php 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/specials/DT_ImportCSV.php b/specials/DT_ImportCSV.php index 9d2f4c0..555700a 100644 --- a/specials/DT_ImportCSV.php +++ b/specials/DT_ImportCSV.php @@ -116,7 +116,14 @@ fclose( $tempfile ); } else { while ( $line = fgetcsv( $csv_file ) ) { - array_push( $table, $line ); + // Convert from UTF-8 to ASCII - htmlentities() + // fails for UTF-8 if there are non-ASCII + // characters. + $convertedLine = array(); + foreach ( $line as $value ) { + $convertedLine[] = mb_convert_encoding( $value, 'UTF-8', 'ASCII' ); + } + array_push( $table, $convertedLine ); } } fclose( $csv_file ); -- To view, visit https://gerrit.wikimedia.org/r/293067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb4f793648681c347067def24398f415bcb5c26b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataTransfer Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for non-ASCII characters with UTF-8 - change (mediawiki...DataTransfer)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/293067 Change subject: Fix for non-ASCII characters with UTF-8 .. Fix for non-ASCII characters with UTF-8 Change-Id: Idb4f793648681c347067def24398f415bcb5c26b --- M specials/DT_ImportCSV.php 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTransfer refs/changes/67/293067/1 diff --git a/specials/DT_ImportCSV.php b/specials/DT_ImportCSV.php index 9d2f4c0..555700a 100644 --- a/specials/DT_ImportCSV.php +++ b/specials/DT_ImportCSV.php @@ -116,7 +116,14 @@ fclose( $tempfile ); } else { while ( $line = fgetcsv( $csv_file ) ) { - array_push( $table, $line ); + // Convert from UTF-8 to ASCII - htmlentities() + // fails for UTF-8 if there are non-ASCII + // characters. + $convertedLine = array(); + foreach ( $line as $value ) { + $convertedLine[] = mb_convert_encoding( $value, 'UTF-8', 'ASCII' ); + } + array_push( $table, $convertedLine ); } } fclose( $csv_file ); -- To view, visit https://gerrit.wikimedia.org/r/293067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb4f793648681c347067def24398f415bcb5c26b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataTransfer Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Switch the label selector used in kube2proxy - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/293065 Change subject: tools: Switch the label selector used in kube2proxy .. tools: Switch the label selector used in kube2proxy More consistent with k8s label naming schemes Change-Id: I32c4633eb0ccbfd70c20e1e1d41cf8010e027d61 --- M modules/toollabs/files/kube2dynproxy.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/65/293065/1 diff --git a/modules/toollabs/files/kube2dynproxy.py b/modules/toollabs/files/kube2dynproxy.py index 53974fe..91dc299 100755 --- a/modules/toollabs/files/kube2dynproxy.py +++ b/modules/toollabs/files/kube2dynproxy.py @@ -29,7 +29,9 @@ self.session.auth = KubeAuth(token) self.capath = ca_cert self.conn = conn -self.base_params = {'labelSelector': 'toollabs=true'} +self.base_params = { +'labelSelector': 'tools.wmflabs.org/webservice=true' +} self.resourceVersion = 0 def get_services(self): -- To view, visit https://gerrit.wikimedia.org/r/293065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32c4633eb0ccbfd70c20e1e1d41cf8010e027d61 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix single space expected on single line comment. - change (mediawiki...codesniffer)
jenkins-bot has submitted this change and it was merged. Change subject: Fix single space expected on single line comment. .. Fix single space expected on single line comment. * The original version ignored multiple spaces before content. * The original version ignored the mixture of whitespaces and tabs. This change fixed the above situations. Bug: T136791 Change-Id: I942b93ca08da61a5231a42559910b84faa378463 --- M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php M MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php M MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.expect M MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.fixed 4 files changed, 33 insertions(+), 30 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php index 0a4a7a4..65d92b7 100644 --- a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php +++ b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php @@ -6,12 +6,20 @@ class MediaWiki_Sniffs_WhiteSpace_SpaceBeforeSingleLineCommentSniff implements PHP_CodeSniffer_Sniff { // @codingStandardsIgnoreEnd + /** +* @return array +*/ public function register() { return [ T_COMMENT ]; } + /** +* @param PHP_CodeSniffer_File $phpcsFile PHP_CodeSniffer_File object. +* @param int $stackPtr The current token index. +* @return void +*/ public function process( PHP_CodeSniffer_File $phpcsFile, $stackPtr ) { $tokens = $phpcsFile->getTokens(); $currToken = $tokens[$stackPtr]; @@ -27,10 +35,10 @@ } // Checking whether the comment is an empty one - if ( ( substr( $currToken['content'], 0, 2 ) === '//' - && rtrim( $currToken['content'] ) === '//' ) - || ( $currToken['content'][0] === '#' - && rtrim( $currToken['content'] ) === '#' ) + if ( ( substr( $currToken['content'], 0, 2 ) === '//' && + rtrim( $currToken['content'] ) === '//' ) || + ( $currToken['content'][0] === '#' && + rtrim( $currToken['content'] ) === '#' ) ) { $phpcsFile->addWarning( 'Unnecessary empty comment found', $stackPtr, @@ -38,17 +46,21 @@ ); // Checking whether there is a space between the comment delimiter // and the comment - } elseif ( substr( $currToken['content'], 0, 2 ) === '//' - && $currToken['content'][2] !== ' ' - ) { + } elseif ( substr( $currToken['content'], 0, 2 ) === '//' ) { + $commentContent = substr( $currToken['content'], 2 ); + $commentTrim = ltrim( $commentContent ); + if ( strlen( $commentContent ) !== ( strlen( $commentTrim ) + 1 ) || + $currToken['content'][2] !== ' ' + ) { $error = 'Single space expected between "//" and comment'; $fix = $phpcsFile->addFixableWarning( $error, $stackPtr, 'SingleSpaceBeforeSingleLineComment' ); if ( $fix === true ) { - $content = $currToken['content']; - $newContent = preg_replace( '/^\/\/\t?/', '// ', $content ); + $newContent = '// '; + $newContent .= $commentTrim; $phpcsFile->fixer->replaceToken( $stackPtr, $newContent ); + } } // Finding what the comment delimiter is and checking whether there is a space // between the comment delimiter and the comment. @@ -65,16 +77,9 @@ ); if ( $fix === true ) { $content = $currToken['content']; - $delimiter =
[MediaWiki-commits] [Gerrit] Fix for closing popup form on save - fix for 8a9048b ? - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Fix for closing popup form on save - fix for 8a9048b ? .. Fix for closing popup form on save - fix for 8a9048b ? Change-Id: Id4a4eaaf929fabc6b8bf5e872ba42090ab562212 --- M libs/SF_popupform.js 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/libs/SF_popupform.js b/libs/SF_popupform.js index 6901564..e015a88 100644 --- a/libs/SF_popupform.js +++ b/libs/SF_popupform.js @@ -443,6 +443,8 @@ doc.write(returnedData); doc.close(); + handleCloseFrame(); + return false; } -- To view, visit https://gerrit.wikimedia.org/r/293064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4a4eaaf929fabc6b8bf5e872ba42090ab562212 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for closing popup form on save - fix for 8a9048b ? - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/293064 Change subject: Fix for closing popup form on save - fix for 8a9048b ? .. Fix for closing popup form on save - fix for 8a9048b ? Change-Id: Id4a4eaaf929fabc6b8bf5e872ba42090ab562212 --- M libs/SF_popupform.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/64/293064/1 diff --git a/libs/SF_popupform.js b/libs/SF_popupform.js index 6901564..e015a88 100644 --- a/libs/SF_popupform.js +++ b/libs/SF_popupform.js @@ -443,6 +443,8 @@ doc.write(returnedData); doc.close(); + handleCloseFrame(); + return false; } -- To view, visit https://gerrit.wikimedia.org/r/293064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4a4eaaf929fabc6b8bf5e872ba42090ab562212 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Kubernetes backend - change (operations...tools-webservice)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/293063 Change subject: [WIP] Kubernetes backend .. [WIP] Kubernetes backend Change-Id: I2c578141836ca39e60ed1c69aed4beaadbc8c891 --- A .gitmodules A pykube A submodules/pykube A toollabs/webservice/backends/kubernetesbackend.py 4 files changed, 146 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice refs/changes/63/293063/1 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000..423f82a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/pykube"] + path = submodules/pykube + url = https://github.com/kelproject/pykube.git diff --git a/pykube b/pykube new file mode 12 index 000..1931c2e --- /dev/null +++ b/pykube @@ -0,0 +1 @@ +submodules/pykube/pykube/ \ No newline at end of file diff --git a/submodules/pykube b/submodules/pykube new file mode 16 index 000..fb69e92 --- /dev/null +++ b/submodules/pykube +Subproject commit fb69e92d32c77fdd33a16f1a49efebe690dc5b99 diff --git a/toollabs/webservice/backends/kubernetesbackend.py b/toollabs/webservice/backends/kubernetesbackend.py new file mode 100644 index 000..3a2d5cb --- /dev/null +++ b/toollabs/webservice/backends/kubernetesbackend.py @@ -0,0 +1,142 @@ +import subprocess +import os +import pykube +from toollabs.webservice.backends import Backend + + +class KubernetesBackend(Backend): +MANIFEST_VERSION = "1" # K8S label values have to be strings + +def __init__(self, webservice): +super(KubernetesBackend, self).__init__(webservice) +self.api = pykube.HTTPClient( +pykube.KubeConfig.from_file( +os.path.expanduser('~/.kube/config') +) +) + +@property +def name(self): +return '%s-%s' % (self.webservice.type, self.webservice.tool.name) + +def _get_svc(self): +return { +"kind": "Service", +"apiVersion": "v1", +"metadata": { +"name": self.webservice.tool.name, +"namespace": self.webservice.tool.name, +"labels": { +"toollabs": "true", +"toollabs-webservice-version": KubernetesBackend.MANIFEST_VERSION +} +}, +"spec": { +"ports": [ +{ +"name": "http", +"protocol": "TCP", +"port": 8000, +"targetPort": 8000 +} +], +"selector": { +"name": self.webservice.tool.name +}, +} +} + +def _get_deployment(self): +return { +"kind": "Deployment", +"apiVersion": "extensions/v1beta1", +"metadata": { +"name": self.webservice.tool.name, +"namespace": self.webservice.tool.name, +"labels": { +"toollabs-webservice-version": KubernetesBackend.MANIFEST_VERSION +} +}, +"spec": { +"replicas": 1, +"selector": { +"matchLabels": { +"name": self.webservice.tool.name +} +}, +"template": { +"metadata": { +"labels": { +"name": self.webservice.tool.name +} +}, +"spec": { +"volumes": [ +{ +"name": "home", +"hostPath": { +"path": os.path.join("/data/project", self.webservice.tool.name) +} +} +], +"containers": [ +{ +"name": "webservice", +"image": "docker-registry.tools.wmflabs.org/toollabs-php-web:latest", +"command": [ +"/usr/bin/webservice-runner", +"--type", +self.webservice.type, +"--port", +"8000" +], # FIXME: Add support for --extra-args properly +"ports": [ +{ +"name": "http", +"containerPort": 8000, +"protocol": "TCP" +
[MediaWiki-commits] [Gerrit] Hygiene: remove non-functional code. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: remove non-functional code. .. Hygiene: remove non-functional code. This removes the code for interfacing with the Gather API :..( Change-Id: Ic0cbd19a1e0c58a4d4afc92c68e66434c9affcbb --- D app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java D app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java D app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingList.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListPageTitle.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListPageTitlesResponse.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListsResponse.java D app/src/test/java/org/wikipedia/dataclient/RetrofitClientBaseTest.java D app/src/test/java/org/wikipedia/readinglist/api/legacy/GetLegacyReadingListPageTitlesTest.java D app/src/test/java/org/wikipedia/readinglist/api/legacy/GetLegacyReadingListsTest.java 10 files changed, 0 insertions(+), 521 deletions(-) Approvals: Niedzielski: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java deleted file mode 100644 index ffc6e1e..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.wikipedia.readinglist.api; - -/** - * A list of pages that are interesting to read later. - */ -public interface ReadingList { - -/** @return the ID of this collection */ -int getId(); - -/** @return the user visible label of this collection */ -String getLabel(); - -/** @return the timestamp of when this collection was last updated */ -String getLastUpdated(); - -/** @return the number of pages contained in this collection */ -int getCount(); - -/** @return a link to a thumbnail URL for this collection */ -String getImageUrl(); -} diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java deleted file mode 100644 index 71ad553..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.wikipedia.readinglist.api; - -import org.wikipedia.Site; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListPageTitlesResponse; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListsResponse; -import org.wikipedia.dataclient.retrofit.RetrofitFactory; - -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Query; - -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; - -import java.io.IOException; - -/** - * Gets and posts collection related data from and to the server. - */ -public class ReadingListDataClient { -private static final Site SITE = new Site("en.wikipedia.org"); - -@NonNull private final Api client; - -public ReadingListDataClient() { -client = RetrofitFactory.newInstance(SITE).create(Api.class); -} - -@VisibleForTesting -public ReadingListDataClient(String baseUrl) { -client = RetrofitFactory.newInstance(SITE, baseUrl).create(Api.class); -} - -/** - * Gets the Collections of the current user. - */ -public LegacyReadingListsResponse getReadingLists() throws IOException { -return client.getReadingLists().execute().body(); -} - -/** - * Gets the list of page titles of a single ReadingList of the current user. - * - * @param listId ID of the reading list to be retrieved - */ -public LegacyReadingListPageTitlesResponse getMemberPages(int listId) throws IOException { -return client.getMemberPages(listId).execute().body(); -} - -private interface Api { -String ACTION_QUERY_LIST = "w/api.php?format=json=2=query="; - -@GET(ACTION_QUERY_LIST + "lists" -+ "=label%7Cdescription%7Cpublic%7Creview%7Cimage%7Ccount%7Cupdated%7Cowner") -Call getReadingLists(); - -@GET(ACTION_QUERY_LIST + "listpages") -Call getMemberPages(@Query("lspid") int collectionId); -} -} diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java deleted file mode 100644 index ec3065b..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.wikipedia.readinglist.api; - -/** - * An entry in a collection representing a page title in a reading list. - */ -public interface ReadingListPageTitle { -String
[MediaWiki-commits] [Gerrit] Update Wikibase and ArticlePlaceholder - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikibase and ArticlePlaceholder .. Update Wikibase and ArticlePlaceholder * Fix problem with display of labels and descriptions after edit * Fix undefined index in ArticlePlaceholder Bug: T135714 Bug: T136093 Change-Id: Ie702530bf618f3394b0cb01f6f73f53e3a54eec7 --- M composer.json M composer.lock M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php M extensions/Wikibase/repo/includes/ParserOutput/PlaceholderEmittingEntityTermsView.php M extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php M extensions/Wikibase/view/src/SimpleEntityTermsView.php M vendor/composer/installed.json 8 files changed, 161 insertions(+), 100 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 9d47e45..b24a0e7 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,10 @@ "repositories": [ { "type": "git", +"url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/ArticlePlaceholder; +}, +{ +"type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikidata.org; }, { @@ -30,7 +34,7 @@ ], "require": { "php": ">=5.5.0", -"mediawiki/article-placeholder": "dev-master", +"mediawiki/article-placeholder": "dev-wmf/1.28.0-wmf.3", "propertysuggester/property-suggester": "~3.0.0", "wikibase/wikibase": "dev-wmf/1.28.0-wmf.3", "wikibase/wikimedia-badges": "dev-master", @@ -65,4 +69,4 @@ "merge-dev": false } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 887217a..21ab3ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "439229d3171c6acf2b7a6bf40a10cc79", -"content-hash": "d9a4cd52d4a9623427971d1d71685d08", +"hash": "2b8fb9457eef9ee5e5a6fcb694f9b2c7", +"content-hash": "a9d3959d5c7849629f22b9fd8c1119c4", "packages": [ { "name": "composer/installers", @@ -776,17 +776,11 @@ }, { "name": "mediawiki/article-placeholder", -"version": "dev-master", +"version": "dev-wmf/1.28.0-wmf.3", "source": { "type": "git", -"url": "https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;, -"reference": "1ebcaecb9d8f75ff34dba1b112eace2868379c15" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/1ebcaecb9d8f75ff34dba1b112eace2868379c15;, -"reference": "1ebcaecb9d8f75ff34dba1b112eace2868379c15", -"shasum": "" +"url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/ArticlePlaceholder;, +"reference": "ac0c104182a1fc98b54dea2006eefe858d322cc9" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", @@ -798,7 +792,15 @@ "ArticlePlaceholder\\": "includes/" } }, -"notification-url": "https://packagist.org/downloads/;, +"scripts": { +"test": [ +"parallel-lint . --exclude vendor", +"phpcs -p -s" +], +"fix": [ +"phpcbf" +] +}, "license": [ "GPL-2.0+" ], @@ -809,7 +811,11 @@ ], "description": "Provides a special page with Wikibase information about a certain topic, with invitation to create an article for the topic", "homepage": "https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;, -"time": "2016-05-23 20:21:41" +"support": { +"issues": "https://phabricator.wikimedia.org/;, +"irc": "irc://irc.freenode.net/wikidata" +}, +"time": "2016-06-06 22:29:54" }, { "name": "propertysuggester/property-suggester", @@ -1454,12 +1460,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -"reference": "05d1154718ecc187c46d958bd8912cdae76075b2" +"reference": "fc6e571ec0fef7acacd34e745909ca05ba7c60e0" }, "dist": {
[MediaWiki-commits] [Gerrit] Hide submit button with CSS instead of - change (mediawiki...ExtensionDistributor)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/293062 Change subject: Hide submit button with CSS instead of .. Hide submit button with CSS instead of Using the .client-js class will hide it from all users that MediaWiki serves JavaScript to, instead of which will hide the button if the browser is running JavaScript even when MediaWiki has blacklisted it. Change-Id: If9ad6e347c877748d9516443621e967349917092 --- M includes/specials/SpecialBaseDistributor.php M resources/ext.extensiondistributor.special.css 2 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtensionDistributor refs/changes/62/293062/1 diff --git a/includes/specials/SpecialBaseDistributor.php b/includes/specials/SpecialBaseDistributor.php index f4ba90f..bfd5d74 100644 --- a/includes/specials/SpecialBaseDistributor.php +++ b/includes/specials/SpecialBaseDistributor.php @@ -127,15 +127,15 @@ 'options' => $items, 'name' => 'extdist_name', ) ) . - // noscript because JS triggers on selector - Html::rawElement( 'noscript', array(), new OOUI\ButtonInputWidget( array( + // only shown to no-JS users via CSS + new OOUI\ButtonInputWidget( array( 'id' => 'mw-extdist-ext-submit', 'infusable' => true, 'name' => 'extdist_submit', 'label' => $this->msg( 'extdist-submit-extension' )->text(), 'type' => 'submit', 'flags' => array( 'primary', 'progressive' ), - ) ) ) . + ) ) . Xml::closeElement( 'form' ) . "\n" . Html::element( 'div', array( 'id' => 'mw-extdist-continue' ) ) . "" diff --git a/resources/ext.extensiondistributor.special.css b/resources/ext.extensiondistributor.special.css index 76ab4ab..193ca4d 100644 --- a/resources/ext.extensiondistributor.special.css +++ b/resources/ext.extensiondistributor.special.css @@ -18,3 +18,8 @@ width: 40%; display: table-cell; } + +/* hide submit button for JS users */ +.client-js #mw-extdist-ext-submit { + display: none; +} -- To view, visit https://gerrit.wikimedia.org/r/293062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9ad6e347c877748d9516443621e967349917092 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExtensionDistributor 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] Update login token fetching - change (mediawiki...TranslationNotifications)
jenkins-bot has submitted this change and it was merged. Change subject: Update login token fetching .. Update login token fetching This extension requires 1.27 now. Bug: T110766 Change-Id: Ib812f7d322496d80f38f3bf9925c19f567006605 --- M TranslationNotificationJob.php 1 file changed, 11 insertions(+), 20 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/TranslationNotificationJob.php b/TranslationNotificationJob.php index 69a4480..a75a67b 100644 --- a/TranslationNotificationJob.php +++ b/TranslationNotificationJob.php @@ -52,17 +52,17 @@ } // API: Get login token - $loginUrl = wfAppendQuery( $baseUrl, [ - 'action' => 'login', + $tokenUrl = wfAppendQuery( $baseUrl, [ + 'action' => 'query', 'format' => 'json', ] ); $getLoginTokenRequest = MWHttpRequest::factory( - $loginUrl, + $tokenUrl, [ 'method' => 'POST', 'postData' => [ - 'lgname' => $wgNotificationUsername, - 'lgpassword' => $wgNotificationUserPassword, + 'meta' => 'tokens', + 'type' => 'login', ] ] ); @@ -72,18 +72,16 @@ $response = FormatJson::decode( $json, true ); - // TODO: Is this really the best way to test success? - if ( $response['login']['result'] !== 'NeedToken' ) { - return "Error getting a login token"; - } - - $loginToken = $response['login']['token']; + $loginToken = $response['query']['tokens']['logintoken']; if ( strlen( $loginToken ) < 4 ) { return "Error: Login token too short"; } // API: Do the login - + $loginUrl = wfAppendQuery( $baseUrl, [ + 'action' => 'login', + 'format' => 'json', + ] ); $loginRequest = MWHttpRequest::factory( $loginUrl, [ @@ -107,14 +105,9 @@ } // API: Get an edit token - $userTalkPage = $this->title->getFullText(); - $editTokenUrl = wfAppendQuery( $baseUrl, [ - 'action' => 'query', - 'format' => 'json', - ] ); $getEditTokenRequest = MWHttpRequest::factory( - $editTokenUrl, + $tokenUrl, [ 'method' => 'POST', 'postData' => [ @@ -129,14 +122,12 @@ $response = FormatJson::decode( $json, true ); $editToken = $response['query']['tokens']['csrftoken']; - // TODO: Is this really the best way to test success? if ( strlen( $editToken ) < 4 ) { return "Edit token too short"; } // API: Edit the talk page - $editUrl = wfAppendQuery( $baseUrl, [ 'action' => 'edit', 'format' => 'json', -- To view, visit https://gerrit.wikimedia.org/r/292122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib812f7d322496d80f38f3bf9925c19f567006605 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TranslationNotifications Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update csrf token handling to use modern API - change (mediawiki...TranslationNotifications)
jenkins-bot has submitted this change and it was merged. Change subject: Update csrf token handling to use modern API .. Update csrf token handling to use modern API Bug: T110766 Change-Id: Ie563b480384bdb07e1a2a5cb2d73a73bd09431c7 --- M TranslationNotificationJob.php 1 file changed, 2 insertions(+), 5 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/TranslationNotificationJob.php b/TranslationNotificationJob.php index 62b69f3..69a4480 100644 --- a/TranslationNotificationJob.php +++ b/TranslationNotificationJob.php @@ -118,9 +118,7 @@ [ 'method' => 'POST', 'postData' => [ - 'prop' => 'info', - 'intoken' => 'edit', - 'titles' => $userTalkPage, + 'meta' => 'tokens', ] ] ); @@ -130,8 +128,7 @@ $response = FormatJson::decode( $json, true ); - $editTokenData = array_shift( $response['query']['pages'] ); - $editToken = $editTokenData['edittoken']; + $editToken = $response['query']['tokens']['csrftoken']; // TODO: Is this really the best way to test success? if ( strlen( $editToken ) < 4 ) { -- To view, visit https://gerrit.wikimedia.org/r/292121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie563b480384bdb07e1a2a5cb2d73a73bd09431c7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TranslationNotifications Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove getOptions() checks from getStashKey() entirely - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove getOptions() checks from getStashKey() entirely .. Remove getOptions() checks from getStashKey() entirely It only avoided a tiny edge case of options lag, which is not worth the complexity. Change-Id: I94bc35fc89eb46436a23b10aee1b7d339859c7ea --- M includes/api/ApiStashEdit.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 01153a5..6b3c26e 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -412,9 +412,7 @@ sha1( $content->serialize( $content->getDefaultFormat() ) ), // Account for user name related variables like signatures $user->getId(), - md5( $user->getName() ), - (string)$user->getOption( 'nickname' ), - (int)$user->getBoolOption( 'fancysig' ) + md5( $user->getName() ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94bc35fc89eb46436a23b10aee1b7d339859c7ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Anomie Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove publishHere - change (mediawiki...TranslationNotifications)
jenkins-bot has submitted this change and it was merged. Change subject: Remove publishHere .. Remove publishHere Use the same code path for both local and remote wikis. Makes maintenance of this code easier and avoid having to create accounts via code. Now even the local user account must have been created manually. Bug: T110766 Change-Id: If2d1430f905410727e20527c505ca295c8c887d3 --- M TranslationNotificationJob.php 1 file changed, 11 insertions(+), 56 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/TranslationNotificationJob.php b/TranslationNotificationJob.php index 4033b94..62b69f3 100644 --- a/TranslationNotificationJob.php +++ b/TranslationNotificationJob.php @@ -15,11 +15,7 @@ * @return bool */ public function run() { - if ( isset( $this->params['otherwiki'] ) ) { - $status = $this->publishInOtherWiki(); - } else { - $status = $this->publishHere(); - } + $status = $this->publishInWiki(); if ( $status !== true ) { $this->setLastError( $status ); @@ -45,59 +41,18 @@ ); } - private function publishHere() { - $text = '== ' . $this->params['editSummary'] . " ==\n\n" . $this->textDiv(); - - $talkPage = WikiPage::factory( $this->title ); - $flags = $talkPage->checkFlags( 0 ); - if ( $flags & EDIT_UPDATE ) { - $content = $talkPage->getContent( Revision::RAW ); - if ( $content instanceof TextContent ) { - $textContent = $content->getNativeData(); - } else { - // Cannot do anything with non-TextContent pages. Shouldn't happen. - return true; - } - - $text = $textContent . "\n" . $text; - } - - global $wgNotificationUsername, $wgNotificationUserPassword; - $user = User::newFromName( $wgNotificationUsername ); - if ( $user->isAllowed( 'bot' ) ) { - $flags = $flags | EDIT_FORCE_BOT; // If the user has the bot right, mark edit as bot - } - - // If user doesn't exist - if ( !$user->getId() ) { - $user->addToDatabase(); - $user->setPassword( $wgNotificationUserPassword ); - $user->saveSettings(); - // Increment site_stats.ss_users - $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); - $ssu->doUpdate(); - } - - $status = $talkPage->doEditContent( - ContentHandler::makeContent( $text, $this->title ), - $this->params['editSummary'], - $flags, - false, - $user - ); - - return $status->isGood(); - } - - private function publishInOtherWiki() { + private function publishInWiki() { global $wgNotificationUsername, $wgNotificationUserPassword; - $wiki = WikiMap::getWiki( $this->params['otherwiki'] ); - $otherWikiBaseUrl = $wiki->getCanonicalServer() . wfScript( 'api' ); + if ( isset( $this->params['otherwiki'] ) ) { + $wiki = WikiMap::getWiki( $this->params['otherwiki'] ); + $baseUrl = $wiki->getCanonicalServer() . wfScript( 'api' ); + } else { + $baseUrl = wfExpandUrl( wfScript( 'api' ), PROTO_CANONICAL ); + } // API: Get login token - - $loginUrl = wfAppendQuery( $otherWikiBaseUrl, [ + $loginUrl = wfAppendQuery( $baseUrl, [ 'action' => 'login', 'format' => 'json', ] ); @@ -154,7 +109,7 @@ // API: Get an edit token $userTalkPage = $this->title->getFullText(); - $editTokenUrl = wfAppendQuery( $otherWikiBaseUrl, [ + $editTokenUrl = wfAppendQuery( $baseUrl, [ 'action' => 'query', 'format' => 'json', ] ); @@ -185,7 +140,7 @@ // API: Edit the talk page - $editUrl = wfAppendQuery( $otherWikiBaseUrl, [ + $editUrl = wfAppendQuery( $baseUrl, [ 'action' => 'edit', 'format' => 'json', ] ); -- To view, visit https://gerrit.wikimedia.org/r/292120 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] Remove getOptions() checks from getStashKey() entirely - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/293061 Change subject: Remove getOptions() checks from getStashKey() entirely .. Remove getOptions() checks from getStashKey() entirely It only avoided a tiny edge case of options lag, which is not worth the complexity. Change-Id: I94bc35fc89eb46436a23b10aee1b7d339859c7ea --- M includes/api/ApiStashEdit.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/293061/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 01153a5..6b3c26e 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -412,9 +412,7 @@ sha1( $content->serialize( $content->getDefaultFormat() ) ), // Account for user name related variables like signatures $user->getId(), - md5( $user->getName() ), - (string)$user->getOption( 'nickname' ), - (int)$user->getBoolOption( 'fancysig' ) + md5( $user->getName() ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94bc35fc89eb46436a23b10aee1b7d339859c7ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expose cirrus profiles to SearchEngine - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Expose cirrus profiles to SearchEngine .. Expose cirrus profiles to SearchEngine This patch introduces 3 new completion profiles : - strict: strict matching, with accent squashing disabled - normal: stopwords removal and accent squashing - classic: special profile to force a fallback to prefixsearch And 2 rescores profile: - classic_noboostlinks - empty 'default' was renamed to 'classic'. I'm not a big fan of these names... Bug: T132477 Change-Id: If752b3e7b1f5ad63b11e2856cfc48dc9b5b4d85f --- M CirrusSearch.php M i18n/en.json M i18n/qqq.json M includes/CirrusSearch.php M includes/CompletionSuggester.php M includes/Search/RescoreBuilders.php M includes/Search/SearchContext.php M includes/Searcher.php M profiles/RescoreProfiles.php M profiles/SuggestProfiles.php M tests/unit/CompletionSuggesterTest.php 11 files changed, 198 insertions(+), 50 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/CirrusSearch.php b/CirrusSearch.php index 71609fb..c34fb78 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -743,10 +743,8 @@ /** * Profile for search as you type suggestion (completion suggestion) * (see profiles/SuggestProfiles.php for more details.) - * - * NOTE: This is an experimental API */ -$wgCirrusSearchCompletionSettings = $wgCirrusSearchCompletionProfiles['default']; +$wgCirrusSearchCompletionSettings = 'fuzzy'; /** * Enable ICU Folding instead of the default ASCII Folding. @@ -841,9 +839,7 @@ * Set the rescore profile to default. * see profile/RescoreProfiles.php for more info */ -$wgCirrusSearchRescoreProfile = $wgCirrusSearchRescoreProfiles['default']; -$wgCirrusSearchPrefixSearchRescoreProfile = $wgCirrusSearchRescoreProfiles['default']; -$wgCirrusSearchMoreLikeRescoreProfile = $wgCirrusSearchRescoreProfiles['default']; +$wgCirrusSearchRescoreProfile = 'classic'; /** * If current wiki has less than this number of results, try to search other language wikis. diff --git a/i18n/en.json b/i18n/en.json index cef644a..327b96f 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -27,5 +27,12 @@ "cirrussearch-didyoumean-settings": " # \n# This message lets you configure the settings of the \"Did you mean\" suggestions.\n# See also https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html\n# Changes to this take effect immediately.\n# The syntax is as follows:\n# * Everything from a \"#\" character to the end of the line is a comment.\n# * Every non-blank line is the setting name followed by a \":\" character followed by the setting value\n# The settings are :\n# * max_errors (integer): the maximum number of terms that will be considered misspelled in order to be corrected. 1 or 2.\n# * confidence (float): The confidence level defines a factor applied to the input phrases score which is used as a threshold for other suggestion candidates. Only candidates that score higher than the threshold will be included in the result. For instance a confidence level of 1.0 will only return suggestions that score higher than the input phrase. If set to 0.0 the best candidate are returned.\n# * min_doc_freq (float 0 to 1): The minimal threshold in number of documents a suggestion should appear in.\n# High frequency terms are generally \"stop words\".\n# * max_term_freq (float 0 to 1): The maximum threshold in number of documents in which a term can exist in order to be included.\n# * prefix_length (integer): The minimal number of prefix characters that must match a term in order to be a suggestion.\n# * suggest_mode (missing, popular, always): The suggest mode controls the way suggestions are included.\n# Examples of good lines:\n# max_errors:2\n# confidence:2.0\n# max_term_freq:0.5\n# min_doc_freq:0.01\n# prefix_length:2\n# suggest_mode:always\n#\n# ", "cirrussearch-query-too-long": "Search request is longer than the maximum allowed length. ($1 > $2)", "cirrussearch-completionsuggester-pref": "Completion suggester", - "cirrussearch-completionsuggester-desc": "New algorithm for search as you type. Once enabled the search box at the top right corner will use the Completion Suggester." + "cirrussearch-completionsuggester-desc": "New algorithm for search as you type. Once enabled the search box at the top right corner will use the Completion Suggester.", + "cirrussearch-completion-profile-strict": "Strict profile with few punctuation characters removed but diacritics and stress marks are kept.", + "cirrussearch-completion-profile-classic": "Classic prefix, few punctuation characters and some diacritics removed.", + "cirrussearch-completion-profile-normal": "Few punctuation
[MediaWiki-commits] [Gerrit] Prefetch $wgCentralAuthLoginWiki DNS - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Prefetch $wgCentralAuthLoginWiki DNS .. Prefetch $wgCentralAuthLoginWiki DNS Insert a tag in the page HTML for anons, so that the browser can get to work on resolving the domain name of $wgCentralAuthLoginWiki sooner. Bug: T92864 Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca (cherry picked from commit 2d1e792b2bc7470633a9fe6aee98a2a50022e29e) --- M includes/CentralAuthHooks.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 27f5708..cdd4be2 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -981,6 +981,15 @@ // For non-JS clients. Use WikiMap to avoid localization of the // 'Special' namespace, see bug 54195. $wiki = WikiMap::getWiki( wfWikiID() ); + + $loginWiki = WikiMap::getWiki( $wgCentralAuthLoginWiki ); + if ( $wiki->getCanonicalServer() !== $loginWiki->getCanonicalServer() ) { + $out->addHeadItem( 'centralauth-dns-prefetch', Html::element( 'link', [ + 'rel' => 'dns-prefetch', + 'href' => preg_replace( '/^https?:/', '', $loginWiki->getCanonicalServer() ), + ] ) ); + } + $params = array( 'type' => '1x1', ); -- To view, visit https://gerrit.wikimedia.org/r/293060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: Ori.livnehGerrit-Reviewer: Legoktm Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prefetch $wgCentralAuthLoginWiki DNS - change (mediawiki...CentralAuth)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/293060 Change subject: Prefetch $wgCentralAuthLoginWiki DNS .. Prefetch $wgCentralAuthLoginWiki DNS Insert a tag in the page HTML for anons, so that the browser can get to work on resolving the domain name of $wgCentralAuthLoginWiki sooner. Bug: T92864 Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca (cherry picked from commit 2d1e792b2bc7470633a9fe6aee98a2a50022e29e) --- M includes/CentralAuthHooks.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/60/293060/1 diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 27f5708..cdd4be2 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -981,6 +981,15 @@ // For non-JS clients. Use WikiMap to avoid localization of the // 'Special' namespace, see bug 54195. $wiki = WikiMap::getWiki( wfWikiID() ); + + $loginWiki = WikiMap::getWiki( $wgCentralAuthLoginWiki ); + if ( $wiki->getCanonicalServer() !== $loginWiki->getCanonicalServer() ) { + $out->addHeadItem( 'centralauth-dns-prefetch', Html::element( 'link', [ + 'rel' => 'dns-prefetch', + 'href' => preg_replace( '/^https?:/', '', $loginWiki->getCanonicalServer() ), + ] ) ); + } + $params = array( 'type' => '1x1', ); -- To view, visit https://gerrit.wikimedia.org/r/293060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: Ori.livneh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Install SmashPig db and schema - change (mediawiki/vagrant)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/293059 Change subject: [WIP] Install SmashPig db and schema .. [WIP] Install SmashPig db and schema Change-Id: I7c3f132dee026645b1c96183ff7ab1ff4465a62e --- M puppet/modules/smashpig/manifests/init.pp M puppet/modules/smashpig/templates/config.yaml.erb 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/59/293059/1 diff --git a/puppet/modules/smashpig/manifests/init.pp b/puppet/modules/smashpig/manifests/init.pp index 147d2d4..078d227 100644 --- a/puppet/modules/smashpig/manifests/init.pp +++ b/puppet/modules/smashpig/manifests/init.pp @@ -46,4 +46,15 @@ Class['::apache::mod::rewrite'], ], } + +mysql::db { 'smashpig': } + +exec { 'smashpig_schema': +command => "/usr/bin/mysql -uroot -p${mysql::root_password} smashpig -qfsA < ${dir}/Schema/001_CreatePendingTable.sql", +unless => "/usr/bin/mysql -uroot -p${mysql::root_password} smashpig -qfsANe \"select 1 from smashpig.pending\" | /usr/bin/tail -1 | /bin/grep -q 1", +require => [ +Git::Clone['wikimedia/fundraising/SmashPig'], +Mysql::Db['smashpig'], +], +} } diff --git a/puppet/modules/smashpig/templates/config.yaml.erb b/puppet/modules/smashpig/templates/config.yaml.erb index 76a5291..c88c9b7 100644 --- a/puppet/modules/smashpig/templates/config.yaml.erb +++ b/puppet/modules/smashpig/templates/config.yaml.erb @@ -4,3 +4,8 @@ data-store: stomp: lib-path: "<%= scope.lookupvar('crm::dir') %>/sites/all/modules/queue2civicrm/Stomp.php" +pending-db: +inst-args: +- mysql://localhost/pending +- root +- "<%= scope.lookupvar('mysql::root_password') %>" -- To view, visit https://gerrit.wikimedia.org/r/293059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c3f132dee026645b1c96183ff7ab1ff4465a62e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite SmashPig config as YAML - change (mediawiki/vagrant)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/293058 Change subject: Rewrite SmashPig config as YAML .. Rewrite SmashPig config as YAML Change-Id: Ifb2cacbde56f37352e5b6ff69bc61cda8a0f30d2 --- M puppet/modules/smashpig/manifests/init.pp D puppet/modules/smashpig/templates/config.php.erb A puppet/modules/smashpig/templates/config.yaml.erb 3 files changed, 9 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/58/293058/1 diff --git a/puppet/modules/smashpig/manifests/init.pp b/puppet/modules/smashpig/manifests/init.pp index affbfe9..147d2d4 100644 --- a/puppet/modules/smashpig/manifests/init.pp +++ b/puppet/modules/smashpig/manifests/init.pp @@ -20,8 +20,8 @@ update => true, } -file { "${dir}/config.php": -content => template('smashpig/config.php.erb'), +file { "${dir}/config.yaml": +content => template('smashpig/config.yaml.erb'), require => [ Git::Clone['wikimedia/fundraising/SmashPig'], ], @@ -41,7 +41,7 @@ ensure => present, content => template('smashpig/apache-site.erb'), require => [ -File["${dir}/config.php"], +File["${dir}/config.yaml"], File["${dir}/PublicHttp/.htaccess"], Class['::apache::mod::rewrite'], ], diff --git a/puppet/modules/smashpig/templates/config.php.erb b/puppet/modules/smashpig/templates/config.php.erb deleted file mode 100644 index 1d88c05..000 --- a/puppet/modules/smashpig/templates/config.php.erb +++ /dev/null @@ -1,13 +0,0 @@ - array( -'data-store' => array( -'stomp' => array( -'lib-path' => "<%= scope.lookupvar('crm::dir') %>/sites/all/modules/queue2civicrm/Stomp.php", -), -), -), -); diff --git a/puppet/modules/smashpig/templates/config.yaml.erb b/puppet/modules/smashpig/templates/config.yaml.erb new file mode 100644 index 000..76a5291 --- /dev/null +++ b/puppet/modules/smashpig/templates/config.yaml.erb @@ -0,0 +1,6 @@ +# TODO: set test provider URLs + +default: +data-store: +stomp: +lib-path: "<%= scope.lookupvar('crm::dir') %>/sites/all/modules/queue2civicrm/Stomp.php" -- To view, visit https://gerrit.wikimedia.org/r/293058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb2cacbde56f37352e5b6ff69bc61cda8a0f30d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exim: add wmflabs.org to wikimedia_domains - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: exim: add wmflabs.org to wikimedia_domains .. exim: add wmflabs.org to wikimedia_domains Change-Id: I8f9811854732a515fc2444f411595c683006cbb1 --- M files/exim/wikimedia_domains 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/files/exim/wikimedia_domains b/files/exim/wikimedia_domains index 54af80b..5790271 100644 --- a/files/exim/wikimedia_domains +++ b/files/exim/wikimedia_domains @@ -14,6 +14,7 @@ wikiversity.org wikivoyage.org wiktionary.org +wmflabs.org # wikivoyage.de -> WMF migration; aliases wikivoyage.de -- To view, visit https://gerrit.wikimedia.org/r/293057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f9811854732a515fc2444f411595c683006cbb1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Apply AbuseFilter configuration syntax change - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Apply AbuseFilter configuration syntax change .. Apply AbuseFilter configuration syntax change Due to switching to extension registration, some config keys had to be changed from plain to associative arrays (and were renamed to reduce confusion). Apply the new syntax (and drop drop some lines that just re-stated the default settings). Change-Id: I63e93d0fb299d701e756f2193cbb6473351f9acb --- M wmf-config/abusefilter.php 1 file changed, 38 insertions(+), 24 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php index d3da3d6..932a88a 100644 --- a/wmf-config/abusefilter.php +++ b/wmf-config/abusefilter.php @@ -18,9 +18,11 @@ $wgGroupPermissions['sysop']['abusefilter-private'] = false; // Disable some potentially dangerous actions -$wgAbuseFilterAvailableActions = array_diff( - $wgAbuseFilterAvailableActions, - array( 'block', 'rangeblock', 'degroup' ) ); +$wgAbuseFilterActions = array( + 'block' => false, + 'rangeblock' => false, + 'degroup' => false, +); // T31922 - Prevent anyone being given the abusefilter-private right by removing it $wgAvailableRights = array_diff( $wgAvailableRights, array( 'abusefilter-private' ) ); @@ -53,7 +55,7 @@ $wgGroupPermissions['sysop']['abusefilter-view-private'] = true; $wgGroupPermissions['*']['abusefilter-view'] = false; $wgGroupPermissions['user']['abusefilter-view'] = true; - $wgAbuseFilterAvailableActions[] = 'block'; + $wgAbuseFilterActions['block'] = true; $wgAbuseFilterBlockDuration = '2 hours'; $wgAbuseFilterAnonBlockDuration = '2 hours'; break; @@ -96,7 +98,6 @@ $wgAbuseFilterNotificationsPrivate = true; // T46045 break; case 'enwikibooks': - $wgAbuseFilterAvailableActions = array( 'flag', 'throttle', 'warn', 'disallow', 'blockautopromote', 'tag' ); $wgGroupPermissions['*']['abusefilter-view'] = false; $wgGroupPermissions['*']['abusefilter-log'] = false; $wgAbuseFilterNotifications = false; @@ -105,7 +106,7 @@ $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] = false; // T44012 break; case 'enwikinews': - $wgAbuseFilterAvailableActions[] = 'block'; // T57868 + $wgAbuseFilterActions['block'] = true; // T57868 break; case 'enwikisource': $wgGroupPermissions['sysop']['abusefilter-modify'] = false; @@ -127,7 +128,7 @@ $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; $wgGroupPermissions['sysop']['abusefilter-revert'] = true; $wgGroupPermissions['sysop']['abusefilter-view-private'] = true; - $wgAbuseFilterAvailableActions[] = 'block'; + $wgAbuseFilterActions['block'] = true; $wgAbuseFilterBlockDuration = 'indefinite'; // T96669 $wgAbuseFilterAnonBlockDuration = '31 hours'; // T96669 $wgAbuseFilterNotifications = false; @@ -137,13 +138,14 @@ $wgGroupPermissions['abusefilter']['abusefilter-modify'] = true; $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; $wgGroupPermissions['sysop']['abusefilter-revert'] = true; - $wgAbuseFilterAvailableActions = array( 'flag', 'throttle', 'warn', 'disallow', 'tag', 'block' ); + $wgAbuseFilterActions['block'] = true; + $wgAbuseFilterActions['blockautopromote'] = false; $wgAbuseFilterBlockDuration = '2 days'; $wgAbuseFilterAnonBlockDuration = '2 days'; break; case 'eswikivoyage': // T64321 $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; - $wgAbuseFilterAvailableActions[] = 'block'; + $wgAbuseFilterActions['block'] = true; $wgAbuseFilterBlockDuration = '24 hours'; $wgAbuseFilterAnonBlockDuration = '24 hours'; break; @@ -171,7 +173,7 @@ $wgGroupPermissions['sysop']['abusefilter-view-private'] = true; $wgGroupPermissions['sysop']['abusefilter-revert'] = true; $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; - $wgAbuseFilterAvailableActions = array( 'flag', 'throttle', 'warn', 'disallow', 'blockautopromote', 'block', 'degroup', 'tag', 'rangeblock' ); + $wgAbuseFilterActions = array( 'rangeblock' => true );
[MediaWiki-commits] [Gerrit] exim: add wmflabs.org to wikimedia_domains - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/293057 Change subject: exim: add wmflabs.org to wikimedia_domains .. exim: add wmflabs.org to wikimedia_domains Change-Id: I8f9811854732a515fc2444f411595c683006cbb1 --- M files/exim/wikimedia_domains 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/293057/1 diff --git a/files/exim/wikimedia_domains b/files/exim/wikimedia_domains index 54af80b..5790271 100644 --- a/files/exim/wikimedia_domains +++ b/files/exim/wikimedia_domains @@ -14,6 +14,7 @@ wikiversity.org wikivoyage.org wiktionary.org +wmflabs.org # wikivoyage.de -> WMF migration; aliases wikivoyage.de -- To view, visit https://gerrit.wikimedia.org/r/293057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f9811854732a515fc2444f411595c683006cbb1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: Add ladsgroup/halfak to deploy-service group - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: admin: Add ladsgroup/halfak to deploy-service group .. admin: Add ladsgroup/halfak to deploy-service group Bug: T136406 Change-Id: Ie55c4cc8b56e0eda7c8ab00d56297bc859e2956f --- M modules/admin/data/data.yaml 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 8ed7c5c..ae1cb40 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -408,7 +408,8 @@ deploy-service: gid: 763 description: Service deploy users -members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, dduvall, yurik, bsitzmann, mholloway-shell, kartik] +members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, dduvall, + yurik, bsitzmann, mholloway-shell, kartik, halfak, ladsgroup] privileges: [] aqs-admins: -- To view, visit https://gerrit.wikimedia.org/r/293056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie55c4cc8b56e0eda7c8ab00d56297bc859e2956f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add query to debug info - change (mediawiki...GeoData)
jenkins-bot has submitted this change and it was merged. Change subject: Add query to debug info .. Add query to debug info Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..14aac74 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -3,6 +3,7 @@ namespace GeoData; use ApiPageSet; +use FormatJson; use MWNamespace; use Title; @@ -94,7 +95,7 @@ $resultSet = $searcher->performSearch( $query, 'GeoData_spatial_search' ); if ( isset( $params['debug'] ) && $params['debug'] ) { - $this->addDebugInfo( $resultSet ); + $this->addDebugInfo( $resultSet, $query ); } $data = $resultSet->getResponse()->getData(); @@ -232,8 +233,9 @@ /** * Adds debug information to API result * @param \Elastica\ResultSet $resultSet +* @param \Elastica\Query $query */ - private function addDebugInfo( \Elastica\ResultSet $resultSet ) { + private function addDebugInfo( \Elastica\ResultSet $resultSet, \Elastica\Query $query ) { $ti = $resultSet->getResponse()->getTransferInfo(); $neededData = [ 'url', @@ -246,7 +248,9 @@ 'starttransfer_time', 'redirect_time', ]; - $debug = []; + $debug = [ + 'query' => FormatJson::encode( $query->toArray(), true, FormatJson::UTF8_OK ), + ]; foreach ( $neededData as $name ) { if ( isset( $ti[$name] ) ) { $debug[$name] = $ti[$name]; -- To view, visit https://gerrit.wikimedia.org/r/293042 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: MaxSemGerrit-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] admin: Add ladsgroup/halfak to deploy-service group - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/293056 Change subject: admin: Add ladsgroup/halfak to deploy-service group .. admin: Add ladsgroup/halfak to deploy-service group Bug: T136406 Change-Id: Ie55c4cc8b56e0eda7c8ab00d56297bc859e2956f --- M modules/admin/data/data.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/293056/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 8ed7c5c..ae1cb40 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -408,7 +408,8 @@ deploy-service: gid: 763 description: Service deploy users -members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, dduvall, yurik, bsitzmann, mholloway-shell, kartik] +members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, dduvall, + yurik, bsitzmann, mholloway-shell, kartik, halfak, ladsgroup] privileges: [] aqs-admins: -- To view, visit https://gerrit.wikimedia.org/r/293056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie55c4cc8b56e0eda7c8ab00d56297bc859e2956f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specify nested_path in geo distance sort - change (mediawiki...GeoData)
jenkins-bot has submitted this change and it was merged. Change subject: Specify nested_path in geo distance sort .. Specify nested_path in geo distance sort per https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_21_search_changes.html this is a breaking change in ElasticSearch 2.1+. Bug: T137023 Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 (cherry picked from commit cb82bd76da0629677e1a01aeb1ebb35780e9e09f) --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..da5f946 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -79,6 +79,7 @@ $query->addSort( [ '_geo_distance' => [ + 'nested_path' => 'coordinates', 'coordinates.coord' => [ 'lat' => $this->coord->lat, 'lon' => $this->coord->lon @@ -116,6 +117,7 @@ $ids[$id] = true; } } + usort( $coordinates, function ( $coord1, $coord2 ) { if ( $coord1->distance == $coord2->distance ) { return 0; -- To view, visit https://gerrit.wikimedia.org/r/293041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: MaxSemGerrit-Reviewer: Aude 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] [WIP] Script to create database schema - change (wikimedia...SmashPig)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/293055 Change subject: [WIP] Script to create database schema .. [WIP] Script to create database schema Change-Id: I5899717c892446657477247e4ffd899a309e1066 --- A Maintenance/MigrateDatabase.php 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/55/293055/1 diff --git a/Maintenance/MigrateDatabase.php b/Maintenance/MigrateDatabase.php new file mode 100644 index 000..bf62e16 --- /dev/null +++ b/Maintenance/MigrateDatabase.php @@ -0,0 +1,30 @@ +addTable( 'pending', __DIR__ . '/Schema/001_CreatePendingTable.sql' ); + } + + public function addTable( $tableName, $path ) { + if + } +} + +require ( RUN_MAINTENANCE_IF_MAIN ); -- To view, visit https://gerrit.wikimedia.org/r/293055 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5899717c892446657477247e4ffd899a309e1066 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ORES submodule, fix restart - change (mediawiki...deploy)
Ladsgroup has submitted this change and it was merged. Change subject: Update ORES submodule, fix restart .. Update ORES submodule, fix restart Change-Id: I04c129acee328a94ce6ba1660de4182d5e19994a --- M scap/cmd_web.sh M submodules/ores 2 files changed, 0 insertions(+), 1 deletion(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/scap/cmd_web.sh b/scap/cmd_web.sh index 52f697b..2f3a881 100644 --- a/scap/cmd_web.sh +++ b/scap/cmd_web.sh @@ -4,4 +4,3 @@ virtualenv --python python3 --system-site-packages $venv $venv/bin/pip freeze | xargs $venv/bin/pip uninstall -y $venv/bin/pip install --use-wheel --no-deps $deploy_dir/submodules/wheels/*.whl -sudo service uwsgi-ores restart diff --git a/submodules/ores b/submodules/ores index 4e0a05e..13be375 16 --- a/submodules/ores +++ b/submodules/ores -Subproject commit 4e0a05ee7f7252af61fadbb3ff0454a0c1a36245 +Subproject commit 13be375f9aef4f90a3f8b82bd68812ca69c8dad1 -- To view, visit https://gerrit.wikimedia.org/r/293054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04c129acee328a94ce6ba1660de4182d5e19994a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ORES submodule, fix restart - change (mediawiki...deploy)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/293054 Change subject: Update ORES submodule, fix restart .. Update ORES submodule, fix restart Change-Id: I04c129acee328a94ce6ba1660de4182d5e19994a --- M scap/cmd_web.sh M submodules/ores 2 files changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy refs/changes/54/293054/1 diff --git a/scap/cmd_web.sh b/scap/cmd_web.sh index 52f697b..2f3a881 100644 --- a/scap/cmd_web.sh +++ b/scap/cmd_web.sh @@ -4,4 +4,3 @@ virtualenv --python python3 --system-site-packages $venv $venv/bin/pip freeze | xargs $venv/bin/pip uninstall -y $venv/bin/pip install --use-wheel --no-deps $deploy_dir/submodules/wheels/*.whl -sudo service uwsgi-ores restart diff --git a/submodules/ores b/submodules/ores index 4e0a05e..13be375 16 --- a/submodules/ores +++ b/submodules/ores -Subproject commit 4e0a05ee7f7252af61fadbb3ff0454a0c1a36245 +Subproject commit 13be375f9aef4f90a3f8b82bd68812ca69c8dad1 -- To view, visit https://gerrit.wikimedia.org/r/293054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04c129acee328a94ce6ba1660de4182d5e19994a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable $wgGeoDataDebug - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable $wgGeoDataDebug .. Enable $wgGeoDataDebug Needed for debugging, doesn't expose anything secret. Change-Id: I08540a5dcdb8ba8af7a651cd2a9011d600150144 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 94dcc7d..9272655 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15436,8 +15436,7 @@ 'wikivoyage' => 2, ], 'wmgGeoDataDebug' => [ - 'default' => false, - 'testwiki' => true, + 'default' => true, ], 'wmgUseEcho' => [ -- To view, visit https://gerrit.wikimedia.org/r/293037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08540a5dcdb8ba8af7a651cd2a9011d600150144 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: EBernhardson Gerrit-Reviewer: Florianschmidtwelzow 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] T131526 A/B test on wikipedia.org - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: T131526 A/B test on wikipedia.org .. T131526 A/B test on wikipedia.org Bug: T131526 Change-Id: I109bf551c8ba4446110098356c779d31b4a20420 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/portals b/portals index 7800320..81761b5 16 --- a/portals +++ b/portals -Subproject commit 7800320181b309e9f005d725b09676b85da18d45 +Subproject commit 81761b5464ddefee0eb1e1db3eb1c03ade5a26b0 -- To view, visit https://gerrit.wikimedia.org/r/292992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I109bf551c8ba4446110098356c779d31b4a20420 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdrewniakGerrit-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] admin: One more try to get it right - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/293053 Change subject: admin: One more try to get it right .. admin: One more try to get it right Change-Id: Ib34878ca057a40f34c4d7b11a3e27c78f753f1cb --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/293053/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index a4b59bb..8ed7c5c 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -54,7 +54,7 @@ tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson, - ladsgroup, ] + ladsgroup] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', 'ALL = NOPASSWD: /sbin/start hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib34878ca057a40f34c4d7b11a3e27c78f753f1cb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: One more try to get it right - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: admin: One more try to get it right .. admin: One more try to get it right Change-Id: Ib34878ca057a40f34c4d7b11a3e27c78f753f1cb --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index a4b59bb..8ed7c5c 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -54,7 +54,7 @@ tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson, - ladsgroup, ] + ladsgroup] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', 'ALL = NOPASSWD: /sbin/start hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib34878ca057a40f34c4d7b11a3e27c78f753f1cb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: Fix typo introduced in If2e2be807eea90b7002 - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: admin: Fix typo introduced in If2e2be807eea90b7002 .. admin: Fix typo introduced in If2e2be807eea90b7002 Bug: T136406 Change-Id: I305910a9578b3b3e3d2af0c8c87cd9b8c9c24829 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index a65cf5d..a4b59bb 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -53,7 +53,7 @@ nikerabbit, reedy, robla, ssastry, tomasz, yurik, tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, - bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson + bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson, ladsgroup, ] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I305910a9578b3b3e3d2af0c8c87cd9b8c9c24829 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: Fix typo introduced in If2e2be807eea90b7002 - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/293052 Change subject: admin: Fix typo introduced in If2e2be807eea90b7002 .. admin: Fix typo introduced in If2e2be807eea90b7002 Bug: T136406 Change-Id: I305910a9578b3b3e3d2af0c8c87cd9b8c9c24829 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/293052/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index a65cf5d..a4b59bb 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -53,7 +53,7 @@ nikerabbit, reedy, robla, ssastry, tomasz, yurik, tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, - bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson + bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson, ladsgroup, ] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I305910a9578b3b3e3d2af0c8c87cd9b8c9c24829 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: Add ladsgroup to deployment group - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: admin: Add ladsgroup to deployment group .. admin: Add ladsgroup to deployment group Bug: T136406 Change-Id: If2e2be807eea90b7002ceda78b3ed7ed461f012c --- M modules/admin/data/data.yaml 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 6f32eba..a65cf5d 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -53,7 +53,8 @@ nikerabbit, reedy, robla, ssastry, tomasz, yurik, tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, - bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson] + bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson + ladsgroup, ] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', 'ALL = NOPASSWD: /sbin/start hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2e2be807eea90b7002ceda78b3ed7ed461f012c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admin: Add ladsgroup to deployment group - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/293051 Change subject: admin: Add ladsgroup to deployment group .. admin: Add ladsgroup to deployment group Bug: T136406 Change-Id: If2e2be807eea90b7002ceda78b3ed7ed461f012c --- M modules/admin/data/data.yaml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/293051/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 6f32eba..a65cf5d 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -53,7 +53,8 @@ nikerabbit, reedy, robla, ssastry, tomasz, yurik, tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, krenair, mobrovac, nuria, thcipriani, joal, eevans, mforns, dpatrick, dcausse, - bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson] + bsitzmann, mholloway-shell, jzerebecki, dduvall, gehel, madhuvishy, dereckson + ladsgroup, ] privileges: ['ALL = (www-data,apache,mwdeploy,l10nupdate) NOPASSWD: ALL', 'ALL = NOPASSWD: /sbin/restart hhvm', 'ALL = NOPASSWD: /sbin/start hhvm', -- To view, visit https://gerrit.wikimedia.org/r/293051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2e2be807eea90b7002ceda78b3ed7ed461f012c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] symlink /.well-known/apple-app-site-association to /apple-ap... - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: symlink /.well-known/apple-app-site-association to /apple-app-site-association .. symlink /.well-known/apple-app-site-association to /apple-app-site-association another approach to fixing this would be to change apache configuration with Alias or RewriteRule Bug: T130647 Change-Id: I98be7bbcbd7ee2767f943bb23a4b4b2de1f358a1 --- A docroot/wikipedia.org/.well-known/apple-app-site-association 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/docroot/wikipedia.org/.well-known/apple-app-site-association b/docroot/wikipedia.org/.well-known/apple-app-site-association new file mode 12 index 000..9a8f540 --- /dev/null +++ b/docroot/wikipedia.org/.well-known/apple-app-site-association @@ -0,0 +1 @@ +../apple-app-site-association \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/287190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98be7bbcbd7ee2767f943bb23a4b4b2de1f358a1 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Filippo GiunchediGerrit-Reviewer: Alex Monk Gerrit-Reviewer: BBlack 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] Flag internal page retrieve/save cycles with EDIT_INTERNAL - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/293050 Change subject: Flag internal page retrieve/save cycles with EDIT_INTERNAL .. Flag internal page retrieve/save cycles with EDIT_INTERNAL This is used to avoid edit stash checks and stats noise. Bug: T136678 Change-Id: I6158b8b218240ef3875f2d1d2e8ca3bc2f69f980 --- M includes/Defines.php M includes/jobqueue/jobs/DoubleRedirectJob.php M includes/page/WikiPage.php M includes/specials/SpecialChangeContentModel.php 4 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/293050/1 diff --git a/includes/Defines.php b/includes/Defines.php index d2b3443..fe5083e 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -183,6 +183,7 @@ define( 'EDIT_FORCE_BOT', 16 ); define( 'EDIT_DEFER_UPDATES', 32 ); // Unused since 1.27 define( 'EDIT_AUTOSUMMARY', 64 ); +define( 'EDIT_INTERNAL', 128 ); /**@}*/ /**@{ diff --git a/includes/jobqueue/jobs/DoubleRedirectJob.php b/includes/jobqueue/jobs/DoubleRedirectJob.php index 617c32b..c6d8ec5 100644 --- a/includes/jobqueue/jobs/DoubleRedirectJob.php +++ b/includes/jobqueue/jobs/DoubleRedirectJob.php @@ -167,7 +167,8 @@ $reason = wfMessage( 'double-redirect-fixed-' . $this->reason, $this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText() )->inContentLanguage()->text(); - $article->doEditContent( $newContent, $reason, EDIT_UPDATE | EDIT_SUPPRESS_RC, false, $user ); + $flags = EDIT_UPDATE | EDIT_SUPPRESS_RC | EDIT_INTERNAL; + $article->doEditContent( $newContent, $reason, $flags, false, $user ); $wgUser = $oldUser; return true; diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 13e5f14..e01128a 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1480,6 +1480,8 @@ * Mark the edit a "bot" edit regardless of user rights * EDIT_AUTOSUMMARY * Fill in blank summaries with generated text where possible +* EDIT_INTERNAL +* Signal that the page retrieve/save cycle happened entirely in this request. * * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the * article will be detected. If EDIT_UPDATE is specified and the article @@ -1540,6 +1542,8 @@ * Mark the edit a "bot" edit regardless of user rights * EDIT_AUTOSUMMARY * Fill in blank summaries with generated text where possible +* EDIT_INTERNAL +* Signal that the page retrieve/save cycle happened entirely in this request. * * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the * article will be detected. If EDIT_UPDATE is specified and the article @@ -1627,8 +1631,14 @@ $summary = $handler->getAutosummary( $old_content, $content, $flags ); } + // Avoid statds noise and wasted cycles check the edit stash (T136678) + if ( ( $flags & EDIT_INTERNAL ) || ( $flags & EDIT_FORCE_BOT ) ) { + $useCache = false; + } else { + $useCache = true; + } + // Get the pre-save transform content and final parser output - $useCache = !( $flags & EDIT_FORCE_BOT ); // avoid statsd noise (T136678) $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat, $useCache ); $pstContent = $editInfo->pstContent; // Content object $meta = [ @@ -3142,7 +3152,7 @@ $summary = $wgContLang->truncate( $summary, 255 ); // Save - $flags = EDIT_UPDATE; + $flags = EDIT_UPDATE | EDIT_INTERNAL; if ( $guser->isAllowed( 'minoredit' ) ) { $flags |= EDIT_MINOR; diff --git a/includes/specials/SpecialChangeContentModel.php b/includes/specials/SpecialChangeContentModel.php index c7a650c..ccbb275 100644 --- a/includes/specials/SpecialChangeContentModel.php +++ b/includes/specials/SpecialChangeContentModel.php @@ -192,6 +192,7 @@ $newContent = ContentHandler::getForModelID( $data['model'] )->makeEmptyContent(); } $flags = $this->oldRevision ? EDIT_UPDATE : EDIT_NEW; + $flags |= EDIT_INTERNAL; if ( $user->isAllowed( 'bot' ) ) { $flags |= EDIT_FORCE_BOT; } -- To view, visit https://gerrit.wikimedia.org/r/293050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Fix redis - change (mediawiki...ores)
Ladsgroup has submitted this change and it was merged. Change subject: Fix redis .. Fix redis Change-Id: Iafb6e8c35a6e421aa75d1b900b61ac250f424238 --- M ores/score_processors/celery.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/ores/score_processors/celery.py b/ores/score_processors/celery.py index 2bbd4a3..05ad62f 100644 --- a/ores/score_processors/celery.py +++ b/ores/score_processors/celery.py @@ -258,8 +258,8 @@ PASS_HOST_PORT = re.compile( -r"((?P[^@]+)@)?" + -r"(?P[^:]+)?" + +r"(?:\:(?P[^@]+)@)?" +r"(?P[^:]+)?" r"(:(?P[0-9]+))?" ) """ -- To view, visit https://gerrit.wikimedia.org/r/293049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iafb6e8c35a6e421aa75d1b900b61ac250f424238 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix redis - change (mediawiki...ores)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/293049 Change subject: Fix redis .. Fix redis Change-Id: Iafb6e8c35a6e421aa75d1b900b61ac250f424238 --- M ores/score_processors/celery.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores refs/changes/49/293049/1 diff --git a/ores/score_processors/celery.py b/ores/score_processors/celery.py index 2bbd4a3..05ad62f 100644 --- a/ores/score_processors/celery.py +++ b/ores/score_processors/celery.py @@ -258,8 +258,8 @@ PASS_HOST_PORT = re.compile( -r"((?P[^@]+)@)?" + -r"(?P[^:]+)?" + +r"(?:\:(?P[^@]+)@)?" +r"(?P[^:]+)?" r"(:(?P[0-9]+))?" ) """ -- To view, visit https://gerrit.wikimedia.org/r/293049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iafb6e8c35a6e421aa75d1b900b61ac250f424238 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consistant capitalization of taglines: Dictionary -> dictionary - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Consistant capitalization of taglines: Dictionary -> dictionary .. Consistant capitalization of taglines: Dictionary -> dictionary Change-Id: Ibcaa7e718841a7d08293c90cac1d5692a126ef5e --- M dev/wikipedia.org/other-projects.json M prod/wikipedia.org/index.html 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jdrewniak: Looks good to me, approved MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/dev/wikipedia.org/other-projects.json b/dev/wikipedia.org/other-projects.json index 1403d8e..711919a 100644 --- a/dev/wikipedia.org/other-projects.json +++ b/dev/wikipedia.org/other-projects.json @@ -19,7 +19,7 @@ { "name": "Wiktionary", "url": "//www.wiktionary.org/", -"tagline": "Free Dictionary", +"tagline": "Free dictionary", "img1": "Wiktionary-logo_sister", "height": 35, "width": 35 diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html index 0e56a9e..c204a40 100644 --- a/prod/wikipedia.org/index.html +++ b/prod/wikipedia.org/index.html @@ -582,7 +582,7 @@ Wiktionary -Free Dictionary +Free dictionary -- To view, visit https://gerrit.wikimedia.org/r/293044 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcaa7e718841a7d08293c90cac1d5692a126ef5e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: KaldariGerrit-Reviewer: Jdrewniak Gerrit-Reviewer: MaxSem Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase and ArticlePlaceholder - change (mediawiki...Wikidata)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/293048 Change subject: Update Wikibase and ArticlePlaceholder .. Update Wikibase and ArticlePlaceholder * Fix problem with display of labels and descriptions after edit * Fix undefined index in ArticlePlaceholder Bug: T135714 Bug: T136093 Change-Id: Ie702530bf618f3394b0cb01f6f73f53e3a54eec7 --- M composer.json M composer.lock M extensions/ArticlePlaceholder/includes/SearchHookHandler.php M extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php M extensions/Wikibase/repo/includes/ParserOutput/PlaceholderEmittingEntityTermsView.php M extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php M extensions/Wikibase/view/src/SimpleEntityTermsView.php M vendor/composer/installed.json 8 files changed, 161 insertions(+), 100 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/48/293048/1 diff --git a/composer.json b/composer.json index 9d47e45..b24a0e7 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,10 @@ "repositories": [ { "type": "git", +"url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/ArticlePlaceholder; +}, +{ +"type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikidata.org; }, { @@ -30,7 +34,7 @@ ], "require": { "php": ">=5.5.0", -"mediawiki/article-placeholder": "dev-master", +"mediawiki/article-placeholder": "dev-wmf/1.28.0-wmf.3", "propertysuggester/property-suggester": "~3.0.0", "wikibase/wikibase": "dev-wmf/1.28.0-wmf.3", "wikibase/wikimedia-badges": "dev-master", @@ -65,4 +69,4 @@ "merge-dev": false } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 887217a..21ab3ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "439229d3171c6acf2b7a6bf40a10cc79", -"content-hash": "d9a4cd52d4a9623427971d1d71685d08", +"hash": "2b8fb9457eef9ee5e5a6fcb694f9b2c7", +"content-hash": "a9d3959d5c7849629f22b9fd8c1119c4", "packages": [ { "name": "composer/installers", @@ -776,17 +776,11 @@ }, { "name": "mediawiki/article-placeholder", -"version": "dev-master", +"version": "dev-wmf/1.28.0-wmf.3", "source": { "type": "git", -"url": "https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;, -"reference": "1ebcaecb9d8f75ff34dba1b112eace2868379c15" -}, -"dist": { -"type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/1ebcaecb9d8f75ff34dba1b112eace2868379c15;, -"reference": "1ebcaecb9d8f75ff34dba1b112eace2868379c15", -"shasum": "" +"url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/ArticlePlaceholder;, +"reference": "ac0c104182a1fc98b54dea2006eefe858d322cc9" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", @@ -798,7 +792,15 @@ "ArticlePlaceholder\\": "includes/" } }, -"notification-url": "https://packagist.org/downloads/;, +"scripts": { +"test": [ +"parallel-lint . --exclude vendor", +"phpcs -p -s" +], +"fix": [ +"phpcbf" +] +}, "license": [ "GPL-2.0+" ], @@ -809,7 +811,11 @@ ], "description": "Provides a special page with Wikibase information about a certain topic, with invitation to create an article for the topic", "homepage": "https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;, -"time": "2016-05-23 20:21:41" +"support": { +"issues": "https://phabricator.wikimedia.org/;, +"irc": "irc://irc.freenode.net/wikidata" +}, +"time": "2016-06-06 22:29:54" }, { "name": "propertysuggester/property-suggester", @@ -1454,12 +1460,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -"reference": "05d1154718ecc187c46d958bd8912cdae76075b2" +"reference":
[MediaWiki-commits] [Gerrit] Fix undefined index error - change (mediawiki...ArticlePlaceholder)
jenkins-bot has submitted this change and it was merged. Change subject: Fix undefined index error .. Fix undefined index error Bug: T136093 Change-Id: I72f1f634c8e339285a5e9864a2b9709b044ffd55 (cherry picked from commit d9e531ae3a266f599833bdeda8947a65a68387f8) --- M includes/SearchHookHandler.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SearchHookHandler.php b/includes/SearchHookHandler.php index 453d70f..14cb36d 100644 --- a/includes/SearchHookHandler.php +++ b/includes/SearchHookHandler.php @@ -153,6 +153,10 @@ $notableEntityIds = $this->getNotableEntityIds( array_keys( $entityIdSearchResult ) ); + if ( $notableEntityIds === null ) { + return ''; + } + foreach ( $notableEntityIds as $entityId ) { $result = $this->createResult( $entityIdSearchResult[ $entityId ] ); @@ -239,7 +243,7 @@ // $json will be false if the request fails, json_decode can handle that. $data = json_decode( $json, true ); - if ( is_array( $data ) ) { + if ( is_array( $data ) && array_key_exists( 'entities', $data ) ) { return $data[ 'entities' ]; } else { return null; -- To view, visit https://gerrit.wikimedia.org/r/293045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72f1f634c8e339285a5e9864a2b9709b044ffd55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: wmf/1.28.0-wmf.3 Gerrit-Owner: AudeGerrit-Reviewer: Aude Gerrit-Reviewer: Lucie Kaffee Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Include title in parseAndStash() log messages - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/293047 Change subject: Include title in parseAndStash() log messages .. Include title in parseAndStash() log messages Change-Id: I49d61d9cfc5edacf415f6822cb50cc9007735a27 --- M includes/api/ApiStashEdit.php 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/293047/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e739e51..d5b4da3 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -145,9 +145,10 @@ $format = $content->getDefaultFormat(); $editInfo = $page->prepareContentForEdit( $content, null, $user, $format, false ); + $title = $page->getTitle(); if ( $editInfo && $editInfo->output ) { - $key = self::getStashKey( $page->getTitle(), $content, $user ); + $key = self::getStashKey( $title, $content, $user ); // Let extensions add ParserOutput metadata or warm other caches Hooks::run( 'ParserOutputStashForEdit', [ $page, $content, $editInfo->output ] ); @@ -162,14 +163,14 @@ if ( $stashInfo ) { $ok = $cache->set( $key, $stashInfo, $ttl ); if ( $ok ) { - $logger->debug( "Cached parser output for key '$key'." ); + $logger->debug( "Cached parser output for key '$key' ('$title')." ); return self::ERROR_NONE; } else { - $logger->error( "Failed to cache parser output for key '$key'." ); + $logger->error( "Failed to cache parser output for key '$key' ('$title')." ); return self::ERROR_CACHE; } } else { - $logger->info( "Uncacheable parser output for key '$key'." ); + $logger->info( "Uncacheable parser output for key '$key' ('$title')." ); return self::ERROR_UNCACHEABLE; } } -- To view, visit https://gerrit.wikimedia.org/r/293047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49d61d9cfc5edacf415f6822cb50cc9007735a27 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Case-insensitive sort repository list - change (mediawiki...ExtensionDistributor)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/293046 Change subject: Case-insensitive sort repository list .. Case-insensitive sort repository list So extensions and skins that start with a lowercase first letter aren't dropped all the way to the bottom of the list. Bug: T137156 Change-Id: Id8a246a0fb42579d7426672a2f79ffa09ff78a4d --- M includes/specials/SpecialBaseDistributor.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExtensionDistributor refs/changes/46/293046/1 diff --git a/includes/specials/SpecialBaseDistributor.php b/includes/specials/SpecialBaseDistributor.php index 5ffd3da..f4ba90f 100644 --- a/includes/specials/SpecialBaseDistributor.php +++ b/includes/specials/SpecialBaseDistributor.php @@ -108,6 +108,7 @@ ); $items = array( array( 'data' => '' ) ); + natcasesort( $repos ); foreach ( $repos as $name ) { $items[] = array( 'data' => $name ); } -- To view, visit https://gerrit.wikimedia.org/r/293046 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8a246a0fb42579d7426672a2f79ffa09ff78a4d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ExtensionDistributor 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] Fix undefined index error - change (mediawiki...ArticlePlaceholder)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/293045 Change subject: Fix undefined index error .. Fix undefined index error Bug: T136093 Change-Id: I72f1f634c8e339285a5e9864a2b9709b044ffd55 (cherry picked from commit d9e531ae3a266f599833bdeda8947a65a68387f8) --- M includes/SearchHookHandler.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/45/293045/1 diff --git a/includes/SearchHookHandler.php b/includes/SearchHookHandler.php index 453d70f..14cb36d 100644 --- a/includes/SearchHookHandler.php +++ b/includes/SearchHookHandler.php @@ -153,6 +153,10 @@ $notableEntityIds = $this->getNotableEntityIds( array_keys( $entityIdSearchResult ) ); + if ( $notableEntityIds === null ) { + return ''; + } + foreach ( $notableEntityIds as $entityId ) { $result = $this->createResult( $entityIdSearchResult[ $entityId ] ); @@ -239,7 +243,7 @@ // $json will be false if the request fails, json_decode can handle that. $data = json_decode( $json, true ); - if ( is_array( $data ) ) { + if ( is_array( $data ) && array_key_exists( 'entities', $data ) ) { return $data[ 'entities' ]; } else { return null; -- To view, visit https://gerrit.wikimedia.org/r/293045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72f1f634c8e339285a5e9864a2b9709b044ffd55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: wmf/1.28.0-wmf.3 Gerrit-Owner: AudeGerrit-Reviewer: Lucie Kaffee ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consistant capitalization of taglines: Dictionary -> dictionary - change (wikimedia/portals)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/293044 Change subject: Consistant capitalization of taglines: Dictionary -> dictionary .. Consistant capitalization of taglines: Dictionary -> dictionary Change-Id: Ibcaa7e718841a7d08293c90cac1d5692a126ef5e --- M dev/wikipedia.org/other-projects.json M prod/wikipedia.org/index.html 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals refs/changes/44/293044/1 diff --git a/dev/wikipedia.org/other-projects.json b/dev/wikipedia.org/other-projects.json index 1403d8e..711919a 100644 --- a/dev/wikipedia.org/other-projects.json +++ b/dev/wikipedia.org/other-projects.json @@ -19,7 +19,7 @@ { "name": "Wiktionary", "url": "//www.wiktionary.org/", -"tagline": "Free Dictionary", +"tagline": "Free dictionary", "img1": "Wiktionary-logo_sister", "height": 35, "width": 35 diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html index 0e56a9e..c204a40 100644 --- a/prod/wikipedia.org/index.html +++ b/prod/wikipedia.org/index.html @@ -582,7 +582,7 @@ Wiktionary -Free Dictionary +Free dictionary -- To view, visit https://gerrit.wikimedia.org/r/293044 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcaa7e718841a7d08293c90cac1d5692a126ef5e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: Kaldari___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up transaction options by containing them under a key - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/293043 Change subject: Clean up transaction options by containing them under a key .. Clean up transaction options by containing them under a key TODO: Extract other transaction data which is more option-y, or alternatively challenge the entire idea of options and contain as data everywhere. Change-Id: I490a154f68be7238ea339f3d97d0127220352132 --- M adyen_gateway/adyen.adapter.php M astropay_gateway/astropay.adapter.php M gateway_common/gateway.adapter.php 3 files changed, 27 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/43/293043/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 3aed537..a081073 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -151,7 +151,9 @@ 'skinCode' => $this->accountInfo[ 'skinCode' ], //'shopperLocale' => language _ country ), - 'iframe' => TRUE, + 'options' => array( + 'iframe' => TRUE, + ), ); } diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index f5a0ab5..765e011 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -144,23 +144,25 @@ 'x_login' => $this->accountInfo['Status']['Login'], 'x_trans_key' => $this->accountInfo['Status']['Password'], ), - 'response_type' => 'delimited', - 'response_delimiter' => '|', - 'response_keys' => array( - 'result', // status code - 'x_iduser', - 'x_invoice', - 'x_amount', - 'PT', // 0 for production, 1 for test - 'x_control', // signature, calculated like control string - // called 'Sign' in docs, but renamed here for consistency - // with parameter POSTed to resultswitcher. - 'x_document', // unique id at AstroPay - 'x_bank', - 'x_payment_type', - 'x_bank_name', - 'x_currency', - ) + 'options' => array( + 'response_type' => 'delimited', + 'response_delimiter' => '|', + 'response_keys' => array( + 'result', // status code + 'x_iduser', + 'x_invoice', + 'x_amount', + 'PT', // 0 for production, 1 for test + 'x_control', // signature, calculated like control string + // called 'Sign' in docs, but renamed here for consistency + // with parameter POSTed to resultswitcher. + 'x_document', // unique id at AstroPay + 'x_bank', + 'x_payment_type', + 'x_bank_name', + 'x_currency', + ), + ), ); // Not for running with do_transaction, just a handy place to keep track diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index b717bb5..b67f849 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -2292,10 +2292,7 @@ /** * If there are things about a transaction that we need to stash in the * transaction's definition (defined in a local defineTransactions() ), we -* can recall them here. Currently, this is only being used to determine if -* we have a transaction whose transmission would require multiple attempts -* to wait for a certain status (or set of statuses), but we could do more -* with this mechanism if we need to. +* can recall them here. * @param string $option_value the name of the key we're looking for in the * transaction definition. * @return
[MediaWiki-commits] [Gerrit] Fix display of outdated label and description in EntityView ... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix display of outdated label and description in EntityView header .. Fix display of outdated label and description in EntityView header Problem was use of EntityInfoTermLookup, which retrieves terms from the terms table (via SqlEntityInfoBuilder). When an edit is made, ParserOutput (including page html) is generated before save and before the terms table is updated. So, whatever the terms were in the previous revision of an entity is what was displayed. This changes the code to use an EntityRetrievingTermLookup, with an InMemoryEntityLookup (populated with the entity that is being saved). This allows the language fallback to still be applied. More ideal would be a solution with less layers of indirection, and maybe not use LabelDescriptionLookup, though I think more refactoring is needed to make this possible. This is the smallest patch possible to fix the bug. I am not sure how best to add tests for this, other than to have a browser test that covers this and maybe we already have one? DEPLOY: there is an off-chance that this may affect the operation of SpamBlacklist and AbuseFilter. We did our best to check for this, but we should send a heads-up to wiki admins when deploying this, and we should double-check that the filters work after deployment. Bug: T135714 Change-Id: I1062d4451eca0218b3481fe2c13743273552fb4d (cherry picked from commit ed1ca9bbc886e1bf00a807fea9cc2c5272ce7c7f) --- M repo/includes/ParserOutput/EntityParserOutputGenerator.php M repo/includes/ParserOutput/PlaceholderEmittingEntityTermsView.php M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php M view/src/SimpleEntityTermsView.php 4 files changed, 78 insertions(+), 37 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ParserOutput/EntityParserOutputGenerator.php b/repo/includes/ParserOutput/EntityParserOutputGenerator.php index 7fcfcf1..aeda587 100644 --- a/repo/includes/ParserOutput/EntityParserOutputGenerator.php +++ b/repo/includes/ParserOutput/EntityParserOutputGenerator.php @@ -7,6 +7,8 @@ use SpecialPage; use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Entity\EntityId; +use Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup; +use Wikibase\DataModel\Services\Lookup\InMemoryEntityLookup; use Wikibase\DataModel\Term\AliasesProvider; use Wikibase\DataModel\Term\LabelsProvider; use Wikibase\LanguageFallbackChain; @@ -157,13 +159,11 @@ $parserOutput->addJsConfigVars( $configVars ); $parserOutput->setExtensionData( 'wikibase-titletext', $this->getTitleText( $entity ) ); - $entityId = $entity->getId(); - if ( $generateHtml ) { $this->addHtmlToParserOutput( $parserOutput, $entity, - $this->getEntityInfo( $parserOutput, $entityId ) + $this->getEntityInfo( $parserOutput ) ); } else { // If we don't have HTML, the ParserOutput in question @@ -184,6 +184,7 @@ // Sometimes extensions like SpamBlacklist might call getParserOutput // before the id is assigned, during the process of creating a new entity. // in that case, no alternate links are added, which probably is no problem. + $entityId = $entity->getId(); if ( $entityId !== null ) { $this->addAlternateLinks( $parserOutput, $entityId ); } @@ -195,11 +196,10 @@ * Fetches some basic entity information from a set of entity IDs. * * @param ParserOutput $parserOutput -* @param EntityId|null $entityId * * @return EntityInfo */ - private function getEntityInfo( ParserOutput $parserOutput, EntityId $entityId = null ) { + private function getEntityInfo( ParserOutput $parserOutput ) { /** * Set in ReferencedEntitiesDataUpdater. * @@ -212,10 +212,6 @@ wfLogWarning( '$entityIds from ParserOutput "referenced-entities" extension data' . ' expected to be an array' ); $entityIds = []; - } - - if ( $entityId !== null ) { - $entityIds[] = $entityId; } $entityInfoBuilder = $this->entityInfoBuilderFactory->newEntityInfoBuilder( $entityIds ); @@ -272,8 +268,13 @@ EntityDocument $entity, EntityInfo $entityInfo ) { - $labelDescriptionLookup = new LanguageFallbackLabelDescriptionLookup( -
[MediaWiki-commits] [Gerrit] Prefetch $wgCentralAuthLoginWiki DNS - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Prefetch $wgCentralAuthLoginWiki DNS .. Prefetch $wgCentralAuthLoginWiki DNS Insert a tag in the page HTML for anons, so that the browser can get to work on resolving the domain name of $wgCentralAuthLoginWiki sooner. Bug: T92864 Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca --- M includes/CentralAuthHooks.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index ed7ea8e..4283266 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -984,6 +984,15 @@ // For non-JS clients. Use WikiMap to avoid localization of the // 'Special' namespace, see bug 54195. $wiki = WikiMap::getWiki( wfWikiID() ); + + $loginWiki = WikiMap::getWiki( $wgCentralAuthLoginWiki ); + if ( $wiki->getCanonicalServer() !== $loginWiki->getCanonicalServer() ) { + $out->addHeadItem( 'centralauth-dns-prefetch', Html::element( 'link', [ + 'rel' => 'dns-prefetch', + 'href' => preg_replace( '/^https?:/', '', $loginWiki->getCanonicalServer() ), + ] ) ); + } + $params = array( 'type' => '1x1', ); -- To view, visit https://gerrit.wikimedia.org/r/292985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Ori.livnehGerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Renamed var names for consistency - change (mediawiki...ZeroPortal)
jenkins-bot has submitted this change and it was merged. Change subject: Renamed var names for consistency .. Renamed var names for consistency Change-Id: Ia24276ebc4760dbf113d7174ceb0c0dd55fb0857 --- M includes/ConfigPageHooks.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ConfigPageHooks.php b/includes/ConfigPageHooks.php index ce29293..b2eac1e 100644 --- a/includes/ConfigPageHooks.php +++ b/includes/ConfigPageHooks.php @@ -21,9 +21,9 @@ * @return bool */ static function isZeroConfigTitle( TitleValue $titleValue ) { - $jtv = JCSingleton::parseTitle( $titleValue ); + $jcTitle = JCSingleton::parseTitle( $titleValue ); - return $jtv ? $jtv->getConfig()->model === 'JsonZeroConfig' : false; + return $jcTitle ? $jcTitle->getConfig()->model === 'JsonZeroConfig' : false; } /** -- To view, visit https://gerrit.wikimedia.org/r/292761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia24276ebc4760dbf113d7174ceb0c0dd55fb0857 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/ZeroPortal Gerrit-Branch: master Gerrit-Owner: YurikGerrit-Reviewer: Anomie 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] Make edit stash keys less preference sensitive - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make edit stash keys less preference sensitive .. Make edit stash keys less preference sensitive Only factor in the user ID/name/sig instead of anything that might happen to touch the user row. Bug: T136678 Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 --- M includes/api/ApiStashEdit.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e739e51..01153a5 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -406,11 +406,15 @@ */ private static function getStashKey( Title $title, Content $content, User $user ) { $hash = sha1( implode( ':', [ + // Account for the edit model/text $content->getModel(), $content->getDefaultFormat(), sha1( $content->serialize( $content->getDefaultFormat() ) ), - $user->getId() ?: md5( $user->getName() ), // account for user parser options - $user->getId() ? $user->getDBTouched() : '-' // handle preference change races + // Account for user name related variables like signatures + $user->getId(), + md5( $user->getName() ), + (string)$user->getOption( 'nickname' ), + (int)$user->getBoolOption( 'fancysig' ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Anomie Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use SpecialPage::getTitleFor() - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: Use SpecialPage::getTitleFor() .. Use SpecialPage::getTitleFor() For localized special page names. Change-Id: I66eb9b45379e4e387cb6176ff7f32d9742a4767e --- M includes/Forms/PreviewForm.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Forms/PreviewForm.php b/includes/Forms/PreviewForm.php index d6e1f01..fc7b5f3 100644 --- a/includes/Forms/PreviewForm.php +++ b/includes/Forms/PreviewForm.php @@ -14,6 +14,7 @@ use IContextSource; use Linker; use ParserOptions; +use SpecialPage; use Title; class PreviewForm { @@ -56,7 +57,7 @@ 'li', [], Linker::link( - Title::newFromText( 'Special:GWToolset' ), + SpecialPage::getTitleFor( 'GWToolset' ), wfMessage( 'gwtoolset-step-1-heading' )->escaped(), [] ) -- To view, visit https://gerrit.wikimedia.org/r/292989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66eb9b45379e4e387cb6176ff7f32d9742a4767e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make sure categories are passed to OutputPage in dbkey form - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: Make sure categories are passed to OutputPage in dbkey form .. Make sure categories are passed to OutputPage in dbkey form OutputPage::setCategoryLinks() expects the categories to be in dbkey form (using underscores) and not display form (spaces). Since we already create a Title object for validation, re-use that to get the dbkey. Bug: T137052 Change-Id: I00fbfe1f648485a19087ac6aaf0ff9137dc1e6ff --- M includes/Forms/PreviewForm.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Forms/PreviewForm.php b/includes/Forms/PreviewForm.php index 30eb770..d6e1f01 100644 --- a/includes/Forms/PreviewForm.php +++ b/includes/Forms/PreviewForm.php @@ -297,8 +297,9 @@ // if the parser was not able to parse a template, {} will be left. // only include the text if valid category. - if ( Title::makeTitleSafe( NS_CATEGORY, $category ) ) { - $categories[$category] = 0; + $catTitle = Title::makeTitleSafe( NS_CATEGORY, $category ); + if ( $catTitle ) { + $categories[$catTitle->getDBkey()] = 0; } else { $notParsable[] = $category; } -- To view, visit https://gerrit.wikimedia.org/r/292988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00fbfe1f648485a19087ac6aaf0ff9137dc1e6ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] InfoAction: Don't pass non-dbkeys to LinkBatch - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: InfoAction: Don't pass non-dbkeys to LinkBatch .. InfoAction: Don't pass non-dbkeys to LinkBatch Usernames are stored with spaces instead of underscores, so this was causing exceptions later on when dbkeys were expected to be provided to TitleValue. Let Title take care of normalization from spaces format to underscores in Title::makeTitle(), and pass that object onto LinkBatch instead. Bug: T137147 Change-Id: Ia3606d30de61173e4d5526a9d7a77bd4b1710a05 --- M includes/actions/InfoAction.php 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index b5f7ff2..7be2aa7 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -478,16 +478,18 @@ if ( $firstRev ) { $firstRevUser = $firstRev->getUserText( Revision::FOR_THIS_USER ); if ( $firstRevUser !== '' ) { - $batch->add( NS_USER, $firstRevUser ); - $batch->add( NS_USER_TALK, $firstRevUser ); + $firstRevUserTitle = Title::makeTitle( NS_USER, $firstRevUser ); + $batch->addObj( $firstRevUserTitle ); + $batch->addObj( $firstRevUserTitle->getTalkPage() ); } } if ( $lastRev ) { $lastRevUser = $lastRev->getUserText( Revision::FOR_THIS_USER ); if ( $lastRevUser !== '' ) { - $batch->add( NS_USER, $lastRevUser ); - $batch->add( NS_USER_TALK, $lastRevUser ); + $lastRevUserTitle = Title::makeTitle( NS_USER, $lastRevUser ); + $batch->addObj( $lastRevUserTitle ); + $batch->addObj( $lastRevUserTitle->getTalkPage() ); } } -- To view, visit https://gerrit.wikimedia.org/r/293038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3606d30de61173e4d5526a9d7a77bd4b1710a05 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add query to debug info - change (mediawiki...GeoData)
jenkins-bot has submitted this change and it was merged. Change subject: Add query to debug info .. Add query to debug info Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..14aac74 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -3,6 +3,7 @@ namespace GeoData; use ApiPageSet; +use FormatJson; use MWNamespace; use Title; @@ -94,7 +95,7 @@ $resultSet = $searcher->performSearch( $query, 'GeoData_spatial_search' ); if ( isset( $params['debug'] ) && $params['debug'] ) { - $this->addDebugInfo( $resultSet ); + $this->addDebugInfo( $resultSet, $query ); } $data = $resultSet->getResponse()->getData(); @@ -232,8 +233,9 @@ /** * Adds debug information to API result * @param \Elastica\ResultSet $resultSet +* @param \Elastica\Query $query */ - private function addDebugInfo( \Elastica\ResultSet $resultSet ) { + private function addDebugInfo( \Elastica\ResultSet $resultSet, \Elastica\Query $query ) { $ti = $resultSet->getResponse()->getTransferInfo(); $neededData = [ 'url', @@ -246,7 +248,9 @@ 'starttransfer_time', 'redirect_time', ]; - $debug = []; + $debug = [ + 'query' => FormatJson::encode( $query->toArray(), true, FormatJson::UTF8_OK ), + ]; foreach ( $neededData as $name ) { if ( isset( $ti[$name] ) ) { $debug[$name] = $ti[$name]; -- To view, visit https://gerrit.wikimedia.org/r/293034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-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] Add query to debug info - change (mediawiki...GeoData)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/293042 Change subject: Add query to debug info .. Add query to debug info Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData refs/changes/42/293042/1 diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..14aac74 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -3,6 +3,7 @@ namespace GeoData; use ApiPageSet; +use FormatJson; use MWNamespace; use Title; @@ -94,7 +95,7 @@ $resultSet = $searcher->performSearch( $query, 'GeoData_spatial_search' ); if ( isset( $params['debug'] ) && $params['debug'] ) { - $this->addDebugInfo( $resultSet ); + $this->addDebugInfo( $resultSet, $query ); } $data = $resultSet->getResponse()->getData(); @@ -232,8 +233,9 @@ /** * Adds debug information to API result * @param \Elastica\ResultSet $resultSet +* @param \Elastica\Query $query */ - private function addDebugInfo( \Elastica\ResultSet $resultSet ) { + private function addDebugInfo( \Elastica\ResultSet $resultSet, \Elastica\Query $query ) { $ti = $resultSet->getResponse()->getTransferInfo(); $neededData = [ 'url', @@ -246,7 +248,9 @@ 'starttransfer_time', 'redirect_time', ]; - $debug = []; + $debug = [ + 'query' => FormatJson::encode( $query->toArray(), true, FormatJson::UTF8_OK ), + ]; foreach ( $neededData as $name ) { if ( isset( $ti[$name] ) ) { $debug[$name] = $ti[$name]; -- To view, visit https://gerrit.wikimedia.org/r/293042 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Specify nested_path in geo distance sort - change (mediawiki...GeoData)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/293041 Change subject: Specify nested_path in geo distance sort .. Specify nested_path in geo distance sort per https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_21_search_changes.html this is a breaking change in ElasticSearch 2.1+. Bug: T137023 Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 (cherry picked from commit cb82bd76da0629677e1a01aeb1ebb35780e9e09f) --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData refs/changes/41/293041/1 diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..da5f946 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -79,6 +79,7 @@ $query->addSort( [ '_geo_distance' => [ + 'nested_path' => 'coordinates', 'coordinates.coord' => [ 'lat' => $this->coord->lat, 'lon' => $this->coord->lon @@ -116,6 +117,7 @@ $ids[$id] = true; } } + usort( $coordinates, function ( $coord1, $coord2 ) { if ( $coord1->distance == $coord2->distance ) { return 0; -- To view, visit https://gerrit.wikimedia.org/r/293041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: MaxSemGerrit-Reviewer: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Namespace the dns-prefetch head element item - change (mediawiki...CentralNotice)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/293040 Change subject: Namespace the dns-prefetch head element item .. Namespace the dns-prefetch head element item Fix-up for Iae39a92912 (from 2012). The $name element for OutputPage::addHeadItem() is meant to allow extensions to override head elements of which there can be only one instance -- e.g., apple-touch-icon. But there can be multiple tags, and we don't want extensions to be clobbering each other's. So use a name that is scoped to CentralNotice, instead of the generic "dns-prefetch". Change-Id: I2fb7f3b9f3763f2395cd3120eda5d7e2d2aaebe0 --- M CentralNotice.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/40/293040/1 diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php index 21c0efc..a8a6e33 100644 --- a/CentralNotice.hooks.php +++ b/CentralNotice.hooks.php @@ -217,7 +217,7 @@ // Insert DNS prefetch for banner loading if ( $wgCentralHost && $wgCentralHost !== $wgServer ) { - $out->addHeadItem( 'dns-prefetch', '' ); + $out->addHeadItem( 'cn-dns-prefetch', '' ); } // Insert the banner controller // TODO Change this to startUp once it's determined that a rollback is not -- To view, visit https://gerrit.wikimedia.org/r/293040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fb7f3b9f3763f2395cd3120eda5d7e2d2aaebe0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: Ori.livneh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make edit stash keys less preference sensitive - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make edit stash keys less preference sensitive .. Make edit stash keys less preference sensitive Only factor in the user ID/name/sig instead of anything that might happen to touch the user row. Bug: T136678 Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 --- M includes/api/ApiStashEdit.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e739e51..01153a5 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -406,11 +406,15 @@ */ private static function getStashKey( Title $title, Content $content, User $user ) { $hash = sha1( implode( ':', [ + // Account for the edit model/text $content->getModel(), $content->getDefaultFormat(), sha1( $content->serialize( $content->getDefaultFormat() ) ), - $user->getId() ?: md5( $user->getName() ), // account for user parser options - $user->getId() ? $user->getDBTouched() : '-' // handle preference change races + // Account for user name related variables like signatures + $user->getId(), + md5( $user->getName() ), + (string)$user->getOption( 'nickname' ), + (int)$user->getBoolOption( 'fancysig' ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Anomie Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Migrate and remove event_page_namespace and event_page_title - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/293039 Change subject: Migrate and remove event_page_namespace and event_page_title .. Migrate and remove event_page_namespace and event_page_title By running updateEchoSchemaForSuppression.php as an updater. The patch-*.sql files already existed, they were added in 2013(!) by 34fbeaf8c but never applied. Bug: T136427 Bug: T50059 Change-Id: Ied049681df4bab325f069c3a68cf704ee9a8f2c9 Depends-On: Idf3fdb77a9f2e895a57eb0f982e06a7ab67ae124 --- M Hooks.php M echo.sql M maintenance/updateEchoSchemaForSuppression.php 3 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/39/293039/1 diff --git a/Hooks.php b/Hooks.php index bb381fb..89fb22d 100644 --- a/Hooks.php +++ b/Hooks.php @@ -165,6 +165,15 @@ $updater->addExtensionField( 'echo_event', 'event_page_id', "$dir/db_patches/patch-add-echo_event-event_page_id.sql" ); $updater->addExtensionIndex( 'echo_event', 'echo_event_type', "$dir/db_patches/patch-alter-event_type-index.sql" ); $updater->addExtensionIndex( 'echo_notification', 'echo_user_timestamp', "$dir/db_patches/patch-alter-user_timestamp-index.sql" ); + // Can't use addPostDatabaseUpdateMaintenance() here because that would run the migration script after dropping the fields + $updater->addExtensionUpdate( array( 'EchoHooks::doUpdateEchoSchemaForSuppression' ) ); + $updater->dropExtensionField( 'echo_event', 'event_page_namespace', "$dir/db_patches/patch-drop-echo_event-event_page_namespace.sql" ); + $updater->dropExtensionField( 'echo_event', 'event_page_title', "$dir/db_patches/patch-drop-echo_event-event_page_title.sql" ); + } + + public static function doUpdateEchoSchemaForSuppression( $updater ) { + $task = $updater->maintenance->runChild( 'UpdateEchoSchemaForSuppression' ); + $task->execute(); } /** diff --git a/echo.sql b/echo.sql index 910203a..9b8d50d 100644 --- a/echo.sql +++ b/echo.sql @@ -6,8 +6,6 @@ event_variant varchar(64) binary null, event_agent_id int unsigned null, -- The user who triggered it, if any event_agent_ip varchar(39) binary null, -- IP address who triggered it, if any - event_page_namespace int unsigned null, - event_page_title varchar(255) binary null, event_extra BLOB NULL, event_page_id int unsigned null ) /*$wgDBTableOptions*/; diff --git a/maintenance/updateEchoSchemaForSuppression.php b/maintenance/updateEchoSchemaForSuppression.php index 6224af5..8aad843 100644 --- a/maintenance/updateEchoSchemaForSuppression.php +++ b/maintenance/updateEchoSchemaForSuppression.php @@ -47,7 +47,8 @@ $updater = new BatchRowUpdate( $reader, - new BatchRowWriter( MWEchoDbFactory::getDB( DB_MASTER ), $this->table, $wgEchoCluster ), + // Disable transactions for BatchRowWriter so that this can be run from update.php + new BatchRowWriter( MWEchoDbFactory::getDB( DB_MASTER ), $this->table, $wgEchoCluster, false ), new EchoSuppressionRowUpdateGenerator ); $updater->setOutput( function ( $text ) { -- To view, visit https://gerrit.wikimedia.org/r/293039 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied049681df4bab325f069c3a68cf704ee9a8f2c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] InfoAction: Don't pass non-dbkeys to LinkBatch - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/293038 Change subject: InfoAction: Don't pass non-dbkeys to LinkBatch .. InfoAction: Don't pass non-dbkeys to LinkBatch Usernames are stored with spaces instead of underscores, so this was causing exceptions later on when dbkeys were expected to be provided to TitleValue. Let Title take care of normalization from spaces format to underscores in Title::makeTitle(), and pass that object onto LinkBatch instead. Bug: T137147 Change-Id: Ia3606d30de61173e4d5526a9d7a77bd4b1710a05 --- M includes/actions/InfoAction.php 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/293038/1 diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index b5f7ff2..7be2aa7 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -478,16 +478,18 @@ if ( $firstRev ) { $firstRevUser = $firstRev->getUserText( Revision::FOR_THIS_USER ); if ( $firstRevUser !== '' ) { - $batch->add( NS_USER, $firstRevUser ); - $batch->add( NS_USER_TALK, $firstRevUser ); + $firstRevUserTitle = Title::makeTitle( NS_USER, $firstRevUser ); + $batch->addObj( $firstRevUserTitle ); + $batch->addObj( $firstRevUserTitle->getTalkPage() ); } } if ( $lastRev ) { $lastRevUser = $lastRev->getUserText( Revision::FOR_THIS_USER ); if ( $lastRevUser !== '' ) { - $batch->add( NS_USER, $lastRevUser ); - $batch->add( NS_USER_TALK, $lastRevUser ); + $lastRevUserTitle = Title::makeTitle( NS_USER, $lastRevUser ); + $batch->addObj( $lastRevUserTitle ); + $batch->addObj( $lastRevUserTitle->getTalkPage() ); } } -- To view, visit https://gerrit.wikimedia.org/r/293038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3606d30de61173e4d5526a9d7a77bd4b1710a05 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] Enable $wgGeoDataDebug - change (operations/mediawiki-config)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/293037 Change subject: Enable $wgGeoDataDebug .. Enable $wgGeoDataDebug Needed for debugging, doesn't expose anything secret. Change-Id: I08540a5dcdb8ba8af7a651cd2a9011d600150144 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/37/293037/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 94dcc7d..9272655 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15436,8 +15436,7 @@ 'wikivoyage' => 2, ], 'wmgGeoDataDebug' => [ - 'default' => false, - 'testwiki' => true, + 'default' => true, ], 'wmgUseEcho' => [ -- To view, visit https://gerrit.wikimedia.org/r/293037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08540a5dcdb8ba8af7a651cd2a9011d600150144 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] Handle missing revisions field in api response - change (mediawiki...ZeroPortal)
jenkins-bot has submitted this change and it was merged. Change subject: Handle missing revisions field in api response .. Handle missing revisions field in api response Bug: T137144 Change-Id: I9bb3bf8848b57ba89beb90893ec1bc8e6944bb55 --- M includes/ApiZeroPortal.php 1 file changed, 15 insertions(+), 15 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php index b99afb4..d0a8459 100644 --- a/includes/ApiZeroPortal.php +++ b/includes/ApiZeroPortal.php @@ -318,22 +318,22 @@ // remove '-', and make it "Opera" $title = ucfirst( strtolower( substr( $title, 1 ) ) ); } - foreach ( $page['revisions'] as $rev ) { - /** @var ZeroConfig $content */ - $content = JCSingleton::parseContent( $titleValue, $rev['*'] ); - if ( !$content || !$content->isValid() ) { - if ( !$hasWarnings ) { - wfLogWarning( - 'ZeroAPI: Unable to parse json of page ' . - $page['title'] - ); - $hasWarnings = true; // only log once per api request + if ( isset( $page['revisions'] ) ) { + foreach ( $page['revisions'] as $rev ) { + /** @var ZeroConfig $content */ + $content = JCSingleton::parseContent( $titleValue, $rev['*'] ); + if ( !$content || !$content->isValid() ) { + if ( !$hasWarnings ) { + wfLogWarning( 'ZeroAPI: Unable to parse json of page ' . + $page['title'] ); + $hasWarnings = true; // only log once per api request + } + continue; } - continue; - } - $res = $func( $content, $title, $rev['timestamp'] ); - if ( $res ) { - return $res; + $res = $func( $content, $title, $rev['timestamp'] ); + if ( $res ) { + return $res; + } } } } -- To view, visit https://gerrit.wikimedia.org/r/292991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9bb3bf8848b57ba89beb90893ec1bc8e6944bb55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroPortal Gerrit-Branch: master Gerrit-Owner: YurikGerrit-Reviewer: Anomie 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] BatchRowWriter: Allow running in transactionless mode - change (mediawiki/core)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/293036 Change subject: BatchRowWriter: Allow running in transactionless mode .. BatchRowWriter: Allow running in transactionless mode This is needed when using BatchRowWriter for a maintenance script that needs to be able to be run as an updater. Bug: T136427 Change-Id: Idf3fdb77a9f2e895a57eb0f982e06a7ab67ae124 --- M includes/utils/BatchRowWriter.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/293036/1 diff --git a/includes/utils/BatchRowWriter.php b/includes/utils/BatchRowWriter.php index ffb7053..6031134 100644 --- a/includes/utils/BatchRowWriter.php +++ b/includes/utils/BatchRowWriter.php @@ -38,13 +38,15 @@ /** * @param IDatabase $db The database to write to -* @param string $table The name of the table to update -* @param string|bool $clusterName A cluster name valid for use with LBFactory +* @param string $table The name of the table to update +* @param string|bool $clusterNameA cluster name valid for use with LBFactory +* @param bool $useTransaction Wrap the updates in a transaction */ - public function __construct( IDatabase $db, $table, $clusterName = false ) { + public function __construct( IDatabase $db, $table, $clusterName = false, $useTransaction = true ) { $this->db = $db; $this->table = $table; $this->clusterName = $clusterName; + $this->useTransaction = $useTransaction; } /** @@ -54,7 +56,9 @@ * names to update values to apply to the row. */ public function write( array $updates ) { - $this->db->begin(); + if ( $this->useTransaction ) { + $this->db->begin(); + } foreach ( $updates as $update ) { $this->db->update( @@ -65,7 +69,9 @@ ); } - $this->db->commit(); + if ( $this->useTransaction ) { + $this->db->commit(); + } wfGetLBFactory()->waitForReplication(); } } -- To view, visit https://gerrit.wikimedia.org/r/293036 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf3fdb77a9f2e895a57eb0f982e06a7ab67ae124 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Store URL as normal transaction data - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/293035 Change subject: [WIP] Store URL as normal transaction data .. [WIP] Store URL as normal transaction data TODO: * Decide when to set URL data from the getCommunicationUrl function. * Review transaction_option data such as path, maybe rewrite those too. Change-Id: I542cd0eff96c8fe8df17e93051379bb46ef37f3b --- M adyen_gateway/adyen.adapter.php M gateway_common/gateway.adapter.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/35/293035/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 3aed537..1edf6ab 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -193,7 +193,7 @@ switch ( $transaction ) { case 'donate': - $formaction = $this->getCommunicationUrl() . '/hpp/pay.shtml'; + $formaction = $this->getData_Unstaged_Escaped( 'url' ) . '/hpp/pay.shtml'; // Run API call hooks here because we don't cURL anything $this->runApiCallHooks(); $this->runAntifraudHooks(); diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index b717bb5..6aaf6e6 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -1039,7 +1039,7 @@ $this->transaction_response->setCommunicationStatus( true ); // Build the redirect URL. - $redirectUrl = $this->getCommunicationUrl(); + $redirectUrl = $this->getData_Unstaged_Escaped( 'url' ); $redirectParams = $this->buildRequestParams(); if ( $redirectParams ) { // Add GET parameters, if provided. @@ -1175,12 +1175,12 @@ //I chose to return this as a function so it's easy to override. //TODO: probably this for all the junk I currently have stashed in the constructor. //...maybe. - $path = $this->transaction_option( 'path' ); + $path = $this->getData_Unstaged_Escaped( 'path' ); if ( !$path ) { $path = ''; } $opts = array( - CURLOPT_URL => $this->getCommunicationUrl() . $path, + CURLOPT_URL => $this->getData_Unstaged_Escaped( 'url' ) . $path, CURLOPT_USERAGENT => WmfFramework::getUserAgent(), CURLOPT_HEADER => 1, CURLOPT_RETURNTRANSFER => 1, -- To view, visit https://gerrit.wikimedia.org/r/293035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I542cd0eff96c8fe8df17e93051379bb46ef37f3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add query to debug info - change (mediawiki...GeoData)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/293034 Change subject: Add query to debug info .. Add query to debug info Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData refs/changes/34/293034/1 diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..14aac74 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -3,6 +3,7 @@ namespace GeoData; use ApiPageSet; +use FormatJson; use MWNamespace; use Title; @@ -94,7 +95,7 @@ $resultSet = $searcher->performSearch( $query, 'GeoData_spatial_search' ); if ( isset( $params['debug'] ) && $params['debug'] ) { - $this->addDebugInfo( $resultSet ); + $this->addDebugInfo( $resultSet, $query ); } $data = $resultSet->getResponse()->getData(); @@ -232,8 +233,9 @@ /** * Adds debug information to API result * @param \Elastica\ResultSet $resultSet +* @param \Elastica\Query $query */ - private function addDebugInfo( \Elastica\ResultSet $resultSet ) { + private function addDebugInfo( \Elastica\ResultSet $resultSet, \Elastica\Query $query ) { $ti = $resultSet->getResponse()->getTransferInfo(); $neededData = [ 'url', @@ -246,7 +248,9 @@ 'starttransfer_time', 'redirect_time', ]; - $debug = []; + $debug = [ + 'query' => FormatJson::encode( $query->toArray(), true, FormatJson::UTF8_OK ), + ]; foreach ( $neededData as $name ) { if ( isset( $ti[$name] ) ) { $debug[$name] = $ti[$name]; -- To view, visit https://gerrit.wikimedia.org/r/293034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff1ecac5bf4b215e6cf7a169f16c021157bdf7b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make edit stash keys less preference sensitive - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/293033 Change subject: Make edit stash keys less preference sensitive .. Make edit stash keys less preference sensitive Only factor in the user ID/name/sig instead of anything that might happen to touch the user row. Bug: T136678 Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 --- M includes/api/ApiStashEdit.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/293033/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e739e51..01153a5 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -406,11 +406,15 @@ */ private static function getStashKey( Title $title, Content $content, User $user ) { $hash = sha1( implode( ':', [ + // Account for the edit model/text $content->getModel(), $content->getDefaultFormat(), sha1( $content->serialize( $content->getDefaultFormat() ) ), - $user->getId() ?: md5( $user->getName() ), // account for user parser options - $user->getId() ? $user->getDBTouched() : '-' // handle preference change races + // Account for user name related variables like signatures + $user->getId(), + md5( $user->getName() ), + (string)$user->getOption( 'nickname' ), + (int)$user->getBoolOption( 'fancysig' ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: remove non-functional code. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/293032 Change subject: Hygiene: remove non-functional code. .. Hygiene: remove non-functional code. This removes the code for interfacing with the Gather API :..( Change-Id: Ic0cbd19a1e0c58a4d4afc92c68e66434c9affcbb --- D app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java D app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java D app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingList.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListPageTitle.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListPageTitlesResponse.java D app/src/main/java/org/wikipedia/readinglist/api/legacy/LegacyReadingListsResponse.java D app/src/test/java/org/wikipedia/readinglist/api/legacy/GetLegacyReadingListPageTitlesTest.java D app/src/test/java/org/wikipedia/readinglist/api/legacy/GetLegacyReadingListsTest.java 9 files changed, 0 insertions(+), 469 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/32/293032/1 diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java deleted file mode 100644 index ffc6e1e..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingList.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.wikipedia.readinglist.api; - -/** - * A list of pages that are interesting to read later. - */ -public interface ReadingList { - -/** @return the ID of this collection */ -int getId(); - -/** @return the user visible label of this collection */ -String getLabel(); - -/** @return the timestamp of when this collection was last updated */ -String getLastUpdated(); - -/** @return the number of pages contained in this collection */ -int getCount(); - -/** @return a link to a thumbnail URL for this collection */ -String getImageUrl(); -} diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java deleted file mode 100644 index 71ad553..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.wikipedia.readinglist.api; - -import org.wikipedia.Site; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListPageTitlesResponse; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListsResponse; -import org.wikipedia.dataclient.retrofit.RetrofitFactory; - -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Query; - -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; - -import java.io.IOException; - -/** - * Gets and posts collection related data from and to the server. - */ -public class ReadingListDataClient { -private static final Site SITE = new Site("en.wikipedia.org"); - -@NonNull private final Api client; - -public ReadingListDataClient() { -client = RetrofitFactory.newInstance(SITE).create(Api.class); -} - -@VisibleForTesting -public ReadingListDataClient(String baseUrl) { -client = RetrofitFactory.newInstance(SITE, baseUrl).create(Api.class); -} - -/** - * Gets the Collections of the current user. - */ -public LegacyReadingListsResponse getReadingLists() throws IOException { -return client.getReadingLists().execute().body(); -} - -/** - * Gets the list of page titles of a single ReadingList of the current user. - * - * @param listId ID of the reading list to be retrieved - */ -public LegacyReadingListPageTitlesResponse getMemberPages(int listId) throws IOException { -return client.getMemberPages(listId).execute().body(); -} - -private interface Api { -String ACTION_QUERY_LIST = "w/api.php?format=json=2=query="; - -@GET(ACTION_QUERY_LIST + "lists" -+ "=label%7Cdescription%7Cpublic%7Creview%7Cimage%7Ccount%7Cupdated%7Cowner") -Call getReadingLists(); - -@GET(ACTION_QUERY_LIST + "listpages") -Call getMemberPages(@Query("lspid") int collectionId); -} -} diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java deleted file mode 100644 index ec3065b..000 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListPageTitle.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.wikipedia.readinglist.api; - -/** - * An entry in a collection representing a page title in a reading list. - */ -public interface ReadingListPageTitle { -String getPrefixedTitle(); -} diff --git
[MediaWiki-commits] [Gerrit] NumberFormatter fallback when ext-intl not installed - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: NumberFormatter fallback when ext-intl not installed .. NumberFormatter fallback when ext-intl not installed The only other class we're using from the Intl extension is Transliterator, and we've got a class_exists check around that. Do the same for NumberFormatter in the hopes of making DI useful in more situations. Change-Id: I0a0c40ad95a33198e6d796a83e5b3da2130b --- M gateway_forms/Mustache.php M tests/Adapter/Amazon/AmazonTest.php 2 files changed, 17 insertions(+), 8 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php index abb80e9..182d10b 100644 --- a/gateway_forms/Mustache.php +++ b/gateway_forms/Mustache.php @@ -207,11 +207,16 @@ 'selected' => ( $currency === $data['currency_code'] ), ); } - $locale = $data['language'] . '_' . $data['country']; - $formatter = new NumberFormatter( $locale, NumberFormatter::CURRENCY ); - $data['display_amount'] = $formatter->formatCurrency( - $data['amount'], $data['currency_code'] - ); + if ( class_exists( 'NumberFormatter' ) ) { + $locale = $data['language'] . '_' . $data['country']; + $formatter = new NumberFormatter( $locale, NumberFormatter::CURRENCY ); + $data['display_amount'] = $formatter->formatCurrency( + $data['amount'], + $data['currency_code'] + ); + } else { + $data['display_amount'] = "{$data['amount']} {$data['currency_code']}"; + } } /** diff --git a/tests/Adapter/Amazon/AmazonTest.php b/tests/Adapter/Amazon/AmazonTest.php index bf4dbc5..1bcd5c7 100644 --- a/tests/Adapter/Amazon/AmazonTest.php +++ b/tests/Adapter/Amazon/AmazonTest.php @@ -87,9 +87,13 @@ 'donate_interface-fallback-currency-notice', 'USD' )->inLanguage( $language )->text(); - $locale = $init['language'] . '_' . $init['country']; - $formatter = new NumberFormatter( $locale, NumberFormatter::CURRENCY ); - $expectedDisplayAmount = $formatter->formatCurrency( $expectedAmount, 'USD' ); + if ( class_exists( 'NumberFormatter' ) ) { + $locale = $init['language'] . '_' . $init['country']; + $formatter = new NumberFormatter( $locale, NumberFormatter::CURRENCY ); + $expectedDisplayAmount = $formatter->formatCurrency( $expectedAmount, 'USD' ); + } else { + $expectedDisplayAmount = "$expectedAmount USD"; + } $that = $this; //needed for PHP pre-5.4 $convertTest = function( $amountString ) use ( $expectedDisplayAmount, $that ) { -- To view, visit https://gerrit.wikimedia.org/r/291156 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a0c40ad95a33198e6d796a83e5b3da2130b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix comment typo in GeoData.body.php - change (mediawiki...GeoData)
jenkins-bot has submitted this change and it was merged. Change subject: Fix comment typo in GeoData.body.php .. Fix comment typo in GeoData.body.php Change-Id: Id5f6037321803ce37045f08c24d453a16cc5f6a7 --- M includes/GeoData.body.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GeoData.body.php b/includes/GeoData.body.php index b1283b3..bab7b4a 100644 --- a/includes/GeoData.body.php +++ b/includes/GeoData.body.php @@ -42,7 +42,7 @@ * * @param int $pageId ID of the page * @param array $conds Conditions for Database::select() -* @param int $dbType Database to select from DM_MASTER or DB_SLAVE +* @param int $dbType Database to select from DB_MASTER or DB_SLAVE * @return Coord[] */ public static function getAllCoordinates( $pageId, $conds = [], $dbType = DB_SLAVE ) { -- To view, visit https://gerrit.wikimedia.org/r/292885 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5f6037321803ce37045f08c24d453a16cc5f6a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: master Gerrit-Owner: AudeGerrit-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] Check responses of synchronous network requests - change (apps...wikipedia)
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/293031 Change subject: Check responses of synchronous network requests .. Check responses of synchronous network requests A follow up to 9a21153, check the response statuses of synchronous network requests. Probably simply because synchronous requests are less common, I don't see checking the status called out explicitly in the docs for the synchronous case. However, the status is checked in many usages of the asynchronous Callback.onResponse(), and it seems surprising not to for either case. There is also mention of checking the synchronous status in this sample[0]. [0] https://github.com/square/retrofit/blob/0e4fe60/samples/src/main/java/com/example/retrofit/DeserializeErrorBody.java#L60 Change-Id: I37042a3d4a36b63988d350a90ff7d5df02bfaff4 --- M app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java M app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java M app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java M app/src/main/java/org/wikipedia/server/restbase/RbPageService.java M app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java 5 files changed, 47 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/31/293031/1 diff --git a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java index 179c9aa..42e1cde 100644 --- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java +++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResponse.java @@ -31,6 +31,10 @@ return query; } +public boolean success() { +return error == null && query != null; +} + @VisibleForTesting protected void setQuery(@Nullable T query) { this.query = query; diff --git a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java index 71ad553..d2c9015 100644 --- a/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java +++ b/app/src/main/java/org/wikipedia/readinglist/api/ReadingListDataClient.java @@ -1,18 +1,19 @@ package org.wikipedia.readinglist.api; -import org.wikipedia.Site; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListPageTitlesResponse; -import org.wikipedia.readinglist.api.legacy.LegacyReadingListsResponse; -import org.wikipedia.dataclient.retrofit.RetrofitFactory; - -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Query; - import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; +import org.wikipedia.Site; +import org.wikipedia.dataclient.retrofit.RetrofitFactory; +import org.wikipedia.readinglist.api.legacy.LegacyReadingListPageTitlesResponse; +import org.wikipedia.readinglist.api.legacy.LegacyReadingListsResponse; + import java.io.IOException; + +import retrofit2.Call; +import retrofit2.Response; +import retrofit2.http.GET; +import retrofit2.http.Query; /** * Gets and posts collection related data from and to the server. @@ -35,7 +36,11 @@ * Gets the Collections of the current user. */ public LegacyReadingListsResponse getReadingLists() throws IOException { -return client.getReadingLists().execute().body(); +Response rsp = client.getReadingLists().execute(); +if (rsp.isSuccessful() && rsp.body().success()) { +return rsp.body(); +} +throw new IOException(rsp.message()); } /** @@ -44,7 +49,11 @@ * @param listId ID of the reading list to be retrieved */ public LegacyReadingListPageTitlesResponse getMemberPages(int listId) throws IOException { -return client.getMemberPages(listId).execute().body(); +Response rsp = client.getMemberPages(listId).execute(); +if (rsp.isSuccessful() && rsp.body().success()) { +return rsp.body(); +} +throw new IOException(rsp.message()); } private interface Api { diff --git a/app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java b/app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java index 291fa49..c918d9d 100644 --- a/app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java +++ b/app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java @@ -130,9 +130,14 @@ }); } +// Synchronous @Override public MwPageCombo pageCombo(String title, boolean noImages) throws IOException { -return webService.pageCombo(title, noImages).execute().body(); +Response rsp = webService.pageCombo(title, noImages).execute(); +if (rsp.isSuccessful() && !rsp.body().hasError()) { +return rsp.body(); +
[MediaWiki-commits] [Gerrit] Specify nested_path in geo distance sort - change (mediawiki...GeoData)
jenkins-bot has submitted this change and it was merged. Change subject: Specify nested_path in geo distance sort .. Specify nested_path in geo distance sort per https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_21_search_changes.html this is a breaking change in ElasticSearch 2.1+. Bug: T137023 Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..da5f946 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -79,6 +79,7 @@ $query->addSort( [ '_geo_distance' => [ + 'nested_path' => 'coordinates', 'coordinates.coord' => [ 'lat' => $this->coord->lat, 'lon' => $this->coord->lon @@ -116,6 +117,7 @@ $ids[$id] = true; } } + usort( $coordinates, function ( $coord1, $coord2 ) { if ( $coord1->distance == $coord2->distance ) { return 0; -- To view, visit https://gerrit.wikimedia.org/r/292884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: master Gerrit-Owner: AudeGerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson 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] Make edit stash keys less preference sensitive - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/293030 Change subject: Make edit stash keys less preference sensitive .. Make edit stash keys less preference sensitive Only factor in the user ID/name/sig instead of anything that might happen to touch the user row. Bug: T136678 Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 --- M includes/api/ApiStashEdit.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/293030/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index e739e51..01153a5 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -406,11 +406,15 @@ */ private static function getStashKey( Title $title, Content $content, User $user ) { $hash = sha1( implode( ':', [ + // Account for the edit model/text $content->getModel(), $content->getDefaultFormat(), sha1( $content->serialize( $content->getDefaultFormat() ) ), - $user->getId() ?: md5( $user->getName() ), // account for user parser options - $user->getId() ? $user->getDBTouched() : '-' // handle preference change races + // Account for user name related variables like signatures + $user->getId(), + md5( $user->getName() ), + (string)$user->getOption( 'nickname' ), + (int)$user->getBoolOption( 'fancysig' ) ] ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- To view, visit https://gerrit.wikimedia.org/r/293030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I004790a017c68cfcff6729f6fbfd0f79b6904c20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Amending system message - change (mediawiki...AccessControl)
jenkins-bot has submitted this change and it was merged. Change subject: Amending system message .. Amending system message The original text was mostly addressing admins of the wiki. However the information about access controlled and restricted pages should address the users of the wiki not being an admin. Change-Id: I90f8aa167e2f0dfd113cf8b0640cd561da85af5c --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Paladox: Looks good to me, but someone else must approve Kghbln: Looks good to me, but someone else must approve 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 168f5bd..726bd77 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,5 +9,5 @@ "accesscontrol-redirect-anonymous": "Deny_anonymous", "accesscontrol-redirect-users": "Deny_user", "accesscontrol-actions-deny": "Deny_action", - "accesscontrol-info-box": "This MediaWiki uses the [https://www.mediawiki.org/wiki/Extension:AccessControl AccessControl] extension that allows to restrict access to the site through a user-defined list. If you see this message, you have no access to this page." + "accesscontrol-info-box": "Access restrictions were established for this page. If you see this message, you have no access to this page." } -- To view, visit https://gerrit.wikimedia.org/r/292836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90f8aa167e2f0dfd113cf8b0640cd561da85af5c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AccessControl Gerrit-Branch: master Gerrit-Owner: KghblnGerrit-Reviewer: 20after4 Gerrit-Reviewer: Kghbln Gerrit-Reviewer: Paladox Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Want Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Completion suggester honor hard limit in all cases - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Completion suggester honor hard limit in all cases .. Completion suggester honor hard limit in all cases Change-Id: I4ebba5778f008cc7388369eb9efb8224da67a626 --- M includes/CompletionSuggester.php 1 file changed, 9 insertions(+), 1 deletion(-) 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/includes/CompletionSuggester.php b/includes/CompletionSuggester.php index 79e0348..1078f09 100644 --- a/includes/CompletionSuggester.php +++ b/includes/CompletionSuggester.php @@ -186,6 +186,13 @@ * @return Status */ public function suggest( $text, $variants = null, $context = null ) { + // If the offset requested is greater than the hard limit + // allowed we will always return an empty set so let's do it + // asap. + if ( $this->offset >= $this->getHardLimit() ) { + return Status::newGood( SearchSuggestionSet::emptySuggestionSet() ); + } + $this->checkRequestLength( $text ); $this->setTermAndVariants( $text, $variants ); $this->context = $context; @@ -312,11 +319,12 @@ return null; } $field = $config['field']; + $limit = $this->getHardLimit(); $suggest = array( 'text' => $query, 'completion' => array( 'field' => $field, - 'size' => ($this->limit + $this->offset) * $config['fetch_limit_factor'] + 'size' => $limit * $config['fetch_limit_factor'] ) ); if ( isset( $config['fuzzy'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/292590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ebba5778f008cc7388369eb9efb8224da67a626 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: DCausseGerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Gehel Gerrit-Reviewer: Manybubbles 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] Clean up and fix updateEchoSchemaForSuppression.php - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/293029 Change subject: Clean up and fix updateEchoSchemaForSuppression.php .. Clean up and fix updateEchoSchemaForSuppression.php This script was supposed to be run in production in 2013, but that never happened. It was also never added to update.php. * Use makeTitleSafe instead of newFromText, for correctness * Fetch the columns that the update generator needs * Replace wrapper for private method with closure Bug: T136427 Bug: T50059 Change-Id: I6c2972120189f035483b5ca49610c008c4ba2c88 --- M autoload.php M includes/schemaUpdate.php M maintenance/updateEchoSchemaForSuppression.php M tests/phpunit/maintenance/SupressionMaintenanceTest.php 4 files changed, 20 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/29/293029/1 diff --git a/autoload.php b/autoload.php index 69d13e2..ead2307 100644 --- a/autoload.php +++ b/autoload.php @@ -122,4 +122,5 @@ 'SpecialNotificationsFormatter' => __DIR__ . '/includes/formatters/SpecialNotificationsFormatter.php', 'SpecialNotificationsMarkRead' => __DIR__ . '/includes/special/SpecialNotificationsMarkRead.php', 'SuppressionMaintenanceTest' => __DIR__ . '/tests/phpunit/maintenance/SupressionMaintenanceTest.php', + 'UpdateEchoSchemaForSuppression' => __DIR__ . '/maintenance/updateEchoSchemaForSuppression.php', ]; diff --git a/includes/schemaUpdate.php b/includes/schemaUpdate.php index 5c20e43..82b2356 100644 --- a/includes/schemaUpdate.php +++ b/includes/schemaUpdate.php @@ -7,9 +7,9 @@ */ class EchoSuppressionRowUpdateGenerator implements RowUpdateGenerator { /** -* @var callable Hack to allow replacing Title::newFromText in tests +* @var callable Hack to allow replacing Title::makeTitleSafe in tests */ - protected $newTitleFromText = array( 'Title', 'newFromText' ); + protected $newTitleFromNsAndText = array( 'Title', 'makeTitleSafe' ); /** * {@inheritDoc} @@ -28,19 +28,19 @@ * * @param $callable callable */ - public function setNewTitleFromText( $callable ) { - $this->newTitleFromText = $callable; + public function setNewTitleFromNsAndText( $callable ) { + $this->newTitleFromNsAndText = $callable; } /** -* Hackish method of mocking Title::newFromText for tests +* Hackish method of mocking Title::makeTitleSafe for tests * +* @param $namespace integer The namespace of the page to look up * @param $text string The page name to look up -* @param $defaultNamespace integer The default namespace of the page to look up -* @return Title|null The title located for the text + namespace, or null if invalid +* @return Title|null The title located for the namespace + text, or null if invalid */ - protected function newTitleFromText( $text, $defaultNamespace = NS_MAIN ) { - return call_user_func( $this->newTitleFromText, $text, $defaultNamespace ); + protected function newTitleFromNsAndText( $namespace, $text ) { + return call_user_func( $this->newTitleFromNsAndText, $namespace, $text ); } /** @@ -53,7 +53,7 @@ */ protected function updatePageIdFromTitle( $row ) { $update = array(); - $title = $this->newTitleFromText( $row->event_page_title, $row->event_page_namespace ); + $title = $this->newTitleFromNsAndText( $row->event_page_namespace, $row->event_page_title ); if ( $title !== null ) { $pageId = $title->getArticleId(); if ( $pageId ) { @@ -86,7 +86,7 @@ $extra = $this->extra( $row, $update ); if ( isset( $extra['link-from-title'], $extra['link-from-namespace'] ) ) { - $title = $this->newTitleFromText( $extra['link-from-title'], $extra['link-from-namespace'] ); + $title = $this->newTitleFromNsAndText( $extra['link-from-namespace'], $extra['link-from-title'] ); unset( $extra['link-from-title'], $extra['link-from-namespace'] ); // Link from page is always from a content page, if null or no article id it was // somehow invalid diff --git a/maintenance/updateEchoSchemaForSuppression.php b/maintenance/updateEchoSchemaForSuppression.php index 0dd9123..9f2dd49 100644 --- a/maintenance/updateEchoSchemaForSuppression.php +++ b/maintenance/updateEchoSchemaForSuppression.php @@ -39,22 +39,17 @@ "event_page_title IS NOT NULL", "event_page_id" => null, ) ); + $reader->setFetchColumns( array(
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3af1ddc..fc9a4f7 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 3af1ddc..fc9a4f7 .. Syncronize VisualEditor: 3af1ddc..fc9a4f7 Change-Id: I9a97adaa41747e4b7991a66789a665b5c442807c --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 3af1ddc..fc9a4f7 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 3af1ddc4902903ff161da39628945384ce358a8f +Subproject commit fc9a4f70a4405f93cd538091f8da649225298f32 -- To view, visit https://gerrit.wikimedia.org/r/293028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a97adaa41747e4b7991a66789a665b5c442807c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-syncGerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3af1ddc..fc9a4f7 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/293028 Change subject: Syncronize VisualEditor: 3af1ddc..fc9a4f7 .. Syncronize VisualEditor: 3af1ddc..fc9a4f7 Change-Id: I9a97adaa41747e4b7991a66789a665b5c442807c --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/28/293028/1 diff --git a/VisualEditor b/VisualEditor index 3af1ddc..fc9a4f7 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 3af1ddc4902903ff161da39628945384ce358a8f +Subproject commit fc9a4f70a4405f93cd538091f8da649225298f32 -- To view, visit https://gerrit.wikimedia.org/r/293028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a97adaa41747e4b7991a66789a665b5c442807c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix popqual score for very small wikis - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix popqual score for very small wikis .. Fix popqual score for very small wikis log base 1 is never defined. Bug: T136940 Change-Id: Ie113e3bb524f2548f265a15ba871d735a234d251 --- M includes/BuildDocument/SuggestScoring.php M maintenance/updateSuggesterIndex.php M tests/unit/SuggestScoringTest.php 3 files changed, 82 insertions(+), 28 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/includes/BuildDocument/SuggestScoring.php b/includes/BuildDocument/SuggestScoring.php index 54d7cd6..ac62d7d 100644 --- a/includes/BuildDocument/SuggestScoring.php +++ b/includes/BuildDocument/SuggestScoring.php @@ -305,8 +305,14 @@ if ( $pop > self::POPULARITY_MAX ) { $pop = 1; } else { - // @fixme: rough log scale by using maxDocs... - $pop = log ( 1 + ( $pop * $this->maxDocs ), 1 + ( self::POPULARITY_MAX * $this->maxDocs ) ); + $logBase = 1 + self::POPULARITY_MAX * $this->maxDocs; + // log₁(x) is undefined + if ( $logBase > 1 ) { + // @fixme: rough log scale by using maxDocs... + $pop = log ( 1 + ( $pop * $this->maxDocs ), $logBase ); + } else { + $pop = 0; + } } $score += $pop * self::POPULARITY_WEIGHT; diff --git a/maintenance/updateSuggesterIndex.php b/maintenance/updateSuggesterIndex.php index 949e8ab..1f15196 100644 --- a/maintenance/updateSuggesterIndex.php +++ b/maintenance/updateSuggesterIndex.php @@ -76,6 +76,11 @@ private $indexIdentifier; /** +* @var string the score method name to use. +*/ + private $scoreMethodName; + + /** * @var SuggestScoringMethod the score function to use. */ private $scoreMethod; @@ -176,7 +181,8 @@ $wgCirrusSearchBannedPlugins, $wgPoolCounterConf, $wgCirrusSearchMasterTimeout, - $wgCirrusSearchMaxShardsPerNode; + $wgCirrusSearchMaxShardsPerNode, + $wgCirrusSearchCompletionDefaultScore; $this->masterTimeout = $this->getOption( 'masterTimeout', $wgCirrusSearchMasterTimeout ); $this->indexTypeName = Connection::TITLE_SUGGEST_TYPE; @@ -213,6 +219,10 @@ $this->utils->checkElasticsearchVersion(); $this->maxShardsPerNode = isset( $wgCirrusSearchMaxShardsPerNode[ $this->indexTypeName ] ) ? $wgCirrusSearchMaxShardsPerNode[ $this->indexTypeName ] : 'unlimited'; + + $this->scoreMethodName = $this->getOption( 'scoringMethod', $wgCirrusSearchCompletionDefaultScore ); + $this->scoreMethod = SuggestScoringMethodFactory::getScoringMethod( $this->scoreMethodName ); + $this->builder = new SuggestBuilder( $this->scoreMethod, $this->withGeo ); try { // If the version does not exist it's certainly because nothing has been indexed. @@ -503,20 +513,6 @@ } private function indexData() { - global $wgCirrusSearchCompletionDefaultScore; - $scoreMethodName = $this->getOption( 'scoringMethod', $wgCirrusSearchCompletionDefaultScore ); - if ( $this->scoreMethod == null ) { - $this->scoreMethod = SuggestScoringMethodFactory::getScoringMethod( $scoreMethodName ); - } - if ( $this->builder == null ) { - // NOTE: the builder stores a batchId value to flag - // documents indexed by this builder. Make sure to - // reuse the same instance when building docs otherwise - // the batchId might be regenerated and can cause data - // loss when recycling the index. - $this->builder = new SuggestBuilder( $this->scoreMethod, $this->withGeo ); - } - // We build the suggestions by reading CONTENT and GENERAL indices. // This does not support extra indices like FILES on commons. $sourceIndexTypes = array( Connection::CONTENT_INDEX_TYPE, Connection::GENERAL_INDEX_TYPE ); @@ -574,7 +570,7 @@ $totalDocsToDump = $totalDocsInIndex; $docsDumped = 0; - $this->log( "Indexing $totalDocsToDump documents from $sourceIndexType ($totalDocsInIndex in the index) with batchId:
[MediaWiki-commits] [Gerrit] Password change request should be optional on soft reset - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Password change request should be optional on soft reset .. Password change request should be optional on soft reset Non-optional fields are required by HTMLForm now so the skip button would not work properly. Change-Id: Iad937767f0f7cf6dce43f7882720d1ed730ee28d (cherry picked from commit 26d2ea79dd660fd9284de4cbe842e452d3313dc0) --- M includes/auth/ResetPasswordSecondaryAuthenticationProvider.php M tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php 2 files changed, 8 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php index f87a762..dd97830 100644 --- a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php +++ b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php @@ -99,6 +99,8 @@ if ( !$needReq->action ) { $needReq->action = AuthManager::ACTION_CHANGE; } + $needReq->required = $data->hard ? AuthenticationRequest::REQUIRED + : AuthenticationRequest::OPTIONAL; $needReqs = [ $needReq ]; if ( !$data->hard ) { $needReqs[] = new ButtonAuthenticationRequest( diff --git a/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php index 59edede..79c138b 100644 --- a/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php @@ -216,7 +216,9 @@ $this->assertSame( AuthenticationResponse::UI, $res->status ); $this->assertEquals( $msg, $res->message ); $this->assertCount( 2, $res->neededRequests ); - $this->assertEquals( $passReq, $res->neededRequests[0] ); + $expectedPassReq = clone $passReq; + $expectedPassReq->required = AuthenticationRequest::OPTIONAL; + $this->assertEquals( $expectedPassReq, $res->neededRequests[0] ); $this->assertEquals( $skipReq, $res->neededRequests[1] ); $this->assertNotNull( $manager->getAuthenticationSessionData( 'reset-pass' ) ); $this->assertFalse( $passReq->done ); @@ -304,7 +306,9 @@ $this->assertSame( AuthenticationResponse::UI, $res->status ); $this->assertEquals( $msg, $res->message ); $this->assertCount( 2, $res->neededRequests ); - $this->assertEquals( $passReq2, $res->neededRequests[0] ); + $expectedPassReq = clone $passReq2; + $expectedPassReq->required = AuthenticationRequest::OPTIONAL; + $this->assertEquals( $expectedPassReq, $res->neededRequests[0] ); $this->assertEquals( $skipReq, $res->neededRequests[1] ); $this->assertNotNull( $manager->getAuthenticationSessionData( 'reset-pass' ) ); $this->assertFalse( $passReq->done ); -- To view, visit https://gerrit.wikimedia.org/r/292990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad937767f0f7cf6dce43f7882720d1ed730ee28d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_27 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add header & footer View support to Feed list card - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add header & footer View support to Feed list card .. Add header & footer View support to Feed list card The continue reading card, and other cards, have a header View that is a little different than their item views. Add support for header and footer Views without requiring adapter index and type logic. Bug: T130963 Change-Id: I53bbf5dc70223c2775e83f38df49cce6480c7700 --- A app/src/main/java/org/wikipedia/feed/view/CardFooterView.java A app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java M app/src/main/java/org/wikipedia/feed/view/ListCardView.java M app/src/main/java/org/wikipedia/views/DrawableItemDecoration.java M app/src/main/java/org/wikipedia/views/MarginItemDecoration.java M app/src/main/java/org/wikipedia/views/ViewUtil.java A app/src/main/res/drawable/ic_arrow_forward_black_24dp.xml A app/src/main/res/layout/view_card_footer.xml A app/src/main/res/layout/view_card_header.xml M app/src/main/res/layout/view_list_card.xml M app/src/main/res/values/strings_no_translate.xml 11 files changed, 297 insertions(+), 25 deletions(-) Approvals: Mholloway: Looks good to me, but someone else must approve Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/feed/view/CardFooterView.java b/app/src/main/java/org/wikipedia/feed/view/CardFooterView.java new file mode 100644 index 000..ee1b21e --- /dev/null +++ b/app/src/main/java/org/wikipedia/feed/view/CardFooterView.java @@ -0,0 +1,27 @@ +package org.wikipedia.feed.view; + +import android.content.Context; +import android.support.annotation.Nullable; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import org.wikipedia.R; + +import butterknife.BindView; +import butterknife.ButterKnife; + +public class CardFooterView extends RelativeLayout { +@BindView(R.id.view_card_footer_text) TextView textView; + +public CardFooterView(Context context) { +super(context); + +inflate(getContext(), R.layout.view_card_footer, this); +ButterKnife.bind(this); +} + +public CardFooterView setText(@Nullable CharSequence text) { +textView.setText(text); +return this; +} +} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java b/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java new file mode 100644 index 000..539c247 --- /dev/null +++ b/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java @@ -0,0 +1,44 @@ +package org.wikipedia.feed.view; + +import android.content.Context; +import android.net.Uri; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import com.facebook.drawee.view.SimpleDraweeView; + +import org.wikipedia.R; + +import butterknife.BindView; +import butterknife.ButterKnife; + +public class CardHeaderView extends RelativeLayout { +@BindView(R.id.view_card_header_image) SimpleDraweeView imageView; +@BindView(R.id.view_card_header_title) TextView titleView; +@BindView(R.id.view_card_header_subtitle) TextView subtitleView; + +public CardHeaderView(Context context) { +super(context); + +inflate(getContext(), R.layout.view_card_header, this); +ButterKnife.bind(this); +} + +@NonNull +public CardHeaderView setImage(@NonNull Uri uri) { +imageView.setImageURI(uri); +return this; +} + +@NonNull public CardHeaderView setTitle(@Nullable CharSequence title) { +titleView.setText(title); +return this; +} + +@NonNull public CardHeaderView setSubtitle(@Nullable CharSequence subtitle) { +subtitleView.setText(subtitle); +return this; +} +} \ No newline at end of file diff --git a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java index 99b9bd8..2beaecf 100644 --- a/app/src/main/java/org/wikipedia/feed/view/ListCardView.java +++ b/app/src/main/java/org/wikipedia/feed/view/ListCardView.java @@ -5,6 +5,7 @@ import android.support.v7.widget.CardView; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; +import android.view.View; import android.view.ViewGroup; import org.wikipedia.R; @@ -12,6 +13,7 @@ import org.wikipedia.views.DefaultViewHolder; import org.wikipedia.views.DrawableItemDecoration; import org.wikipedia.views.MarginItemDecoration; +import org.wikipedia.views.ViewUtil; import java.util.Collections; import java.util.List; @@ -20,6 +22,9 @@ import butterknife.ButterKnife; public class ListCardView extends CardView { +@BindView(R.id.view_list_card_header) View headerView; +@BindView(R.id.view_list_card_footer) View footerView; +
[MediaWiki-commits] [Gerrit] MediaWiki.UI: Set max-width on inline elements - change (mediawiki/core)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/292993 Change subject: MediaWiki.UI: Set max-width on inline elements .. MediaWiki.UI: Set max-width on inline elements A quick fix to make sure that MediawikiUI inline elements are not sized larger than the width of the parent. Especially useful for InputBox textfields on narrow screens. Bug: T137108 Change-Id: I69f50ea5d57bd24ff6999b50297a276ca4f99ec2 --- M resources/src/mediawiki.ui/components/inputs.less 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/292993/1 diff --git a/resources/src/mediawiki.ui/components/inputs.less b/resources/src/mediawiki.ui/components/inputs.less index 579bd5f..fc07d1b 100644 --- a/resources/src/mediawiki.ui/components/inputs.less +++ b/resources/src/mediawiki.ui/components/inputs.less @@ -108,6 +108,9 @@ .mw-ui-input-inline { display: inline-block; width: auto; + // Make sure we limit the width to no more than the parent + // because in case of textfields, width:auto equals size attribute. + max-width: 100%; } // mw-ui-input-large -- To view, visit https://gerrit.wikimedia.org/r/292993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69f50ea5d57bd24ff6999b50297a276ca4f99ec2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TheDJ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T131526 A/B test on wikipedia.org - change (operations/mediawiki-config)
Jdrewniak has uploaded a new change for review. https://gerrit.wikimedia.org/r/292992 Change subject: T131526 A/B test on wikipedia.org .. T131526 A/B test on wikipedia.org Bug: T131526 Change-Id: I109bf551c8ba4446110098356c779d31b4a20420 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/92/292992/1 diff --git a/portals b/portals index 7800320..ab0ce9f 16 --- a/portals +++ b/portals -Subproject commit 7800320181b309e9f005d725b09676b85da18d45 +Subproject commit ab0ce9fa56468bba76f4a3228a0c1bc539d51956 -- To view, visit https://gerrit.wikimedia.org/r/292992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I109bf551c8ba4446110098356c779d31b4a20420 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdrewniak___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle missing revisions field in api response - change (mediawiki...ZeroPortal)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/292991 Change subject: Handle missing revisions field in api response .. Handle missing revisions field in api response Bug: T137144 Change-Id: I9bb3bf8848b57ba89beb90893ec1bc8e6944bb55 --- M includes/ApiZeroPortal.php 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal refs/changes/91/292991/1 diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php index b99afb4..d0a8459 100644 --- a/includes/ApiZeroPortal.php +++ b/includes/ApiZeroPortal.php @@ -318,22 +318,22 @@ // remove '-', and make it "Opera" $title = ucfirst( strtolower( substr( $title, 1 ) ) ); } - foreach ( $page['revisions'] as $rev ) { - /** @var ZeroConfig $content */ - $content = JCSingleton::parseContent( $titleValue, $rev['*'] ); - if ( !$content || !$content->isValid() ) { - if ( !$hasWarnings ) { - wfLogWarning( - 'ZeroAPI: Unable to parse json of page ' . - $page['title'] - ); - $hasWarnings = true; // only log once per api request + if ( isset( $page['revisions'] ) ) { + foreach ( $page['revisions'] as $rev ) { + /** @var ZeroConfig $content */ + $content = JCSingleton::parseContent( $titleValue, $rev['*'] ); + if ( !$content || !$content->isValid() ) { + if ( !$hasWarnings ) { + wfLogWarning( 'ZeroAPI: Unable to parse json of page ' . + $page['title'] ); + $hasWarnings = true; // only log once per api request + } + continue; } - continue; - } - $res = $func( $content, $title, $rev['timestamp'] ); - if ( $res ) { - return $res; + $res = $func( $content, $title, $rev['timestamp'] ); + if ( $res ) { + return $res; + } } } } -- To view, visit https://gerrit.wikimedia.org/r/292991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bb3bf8848b57ba89beb90893ec1bc8e6944bb55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroPortal Gerrit-Branch: master Gerrit-Owner: Yurik___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T134008 Language dropdown A/B test. - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: T134008 Language dropdown A/B test. .. T134008 Language dropdown A/B test. Bug: T134008 Change-Id: Ic4c5f954433a816c103f31c4b2544745b12d4805 --- M dev/wikipedia.org/assets/css/sprites.css M dev/wikipedia.org/assets/css/style.css M dev/wikipedia.org/assets/img/sprite-bookshelf_icons.png M dev/wikipedia.org/assets/img/sprite-bookshelf_ic...@1.5x.png M dev/wikipedia.org/assets/img/sprite-bookshelf_ic...@2x.png A dev/wikipedia.org/assets/img/sprite_assets/bookshelf_icons/arrow-down-blue.png A dev/wikipedia.org/assets/img/sprite_assets/bookshelf_icons/arrow-up-white..png A dev/wikipedia.org/assets/img/sprite_assets/bookshelf_icons/translate-icon.png A dev/wikipedia.org/assets/img/sprite_assets/bookshelf_icons/translate-icon.svg A dev/wikipedia.org/assets/js/lang-dropdown-abtest.js M dev/wikipedia.org/assets/js/polyfills.js A dev/wikipedia.org/assets/js/seedrandom.js M dev/wikipedia.org/assets/js/wm-test.js A dev/wikipedia.org/assets/postcss/_lang-dropdown.css M dev/wikipedia.org/assets/postcss/style.css M dev/wikipedia.org/assets/rev-manifest.json M dev/wikipedia.org/index.handlebars A dev/wikipedia.org/templates/language-list-button.handlebars M package.json M prod/wikipedia.org/assets/img/sprite-bookshelf_icons.png M prod/wikipedia.org/assets/img/sprite-bookshelf_ic...@1.5x.png M prod/wikipedia.org/assets/img/sprite-bookshelf_ic...@2x.png D prod/wikipedia.org/assets/js/index-372e412aca.js A prod/wikipedia.org/assets/js/index-5d3aabbbfd.js M prod/wikipedia.org/index.html M tests/el-abtest4.js A tests/lang-dropdown-abtest.js 27 files changed, 1,336 insertions(+), 230 deletions(-) Approvals: Bearloga: Looks good to me, but someone else must approve Jdrewniak: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/292889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4c5f954433a816c103f31c4b2544745b12d4805 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/portals Gerrit-Branch: master Gerrit-Owner: JdrewniakGerrit-Reviewer: Bearloga Gerrit-Reviewer: JGirault Gerrit-Reviewer: Jdrewniak Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Password change request should be optional on soft reset - change (mediawiki/core)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/292990 Change subject: Password change request should be optional on soft reset .. Password change request should be optional on soft reset Non-optional fields are required by HTMLForm now so the skip button would not work properly. Change-Id: Iad937767f0f7cf6dce43f7882720d1ed730ee28d (cherry picked from commit 26d2ea79dd660fd9284de4cbe842e452d3313dc0) --- M includes/auth/ResetPasswordSecondaryAuthenticationProvider.php M tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/292990/1 diff --git a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php index f87a762..dd97830 100644 --- a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php +++ b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php @@ -99,6 +99,8 @@ if ( !$needReq->action ) { $needReq->action = AuthManager::ACTION_CHANGE; } + $needReq->required = $data->hard ? AuthenticationRequest::REQUIRED + : AuthenticationRequest::OPTIONAL; $needReqs = [ $needReq ]; if ( !$data->hard ) { $needReqs[] = new ButtonAuthenticationRequest( diff --git a/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php index 59edede..79c138b 100644 --- a/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/ResetPasswordSecondaryAuthenticationProviderTest.php @@ -216,7 +216,9 @@ $this->assertSame( AuthenticationResponse::UI, $res->status ); $this->assertEquals( $msg, $res->message ); $this->assertCount( 2, $res->neededRequests ); - $this->assertEquals( $passReq, $res->neededRequests[0] ); + $expectedPassReq = clone $passReq; + $expectedPassReq->required = AuthenticationRequest::OPTIONAL; + $this->assertEquals( $expectedPassReq, $res->neededRequests[0] ); $this->assertEquals( $skipReq, $res->neededRequests[1] ); $this->assertNotNull( $manager->getAuthenticationSessionData( 'reset-pass' ) ); $this->assertFalse( $passReq->done ); @@ -304,7 +306,9 @@ $this->assertSame( AuthenticationResponse::UI, $res->status ); $this->assertEquals( $msg, $res->message ); $this->assertCount( 2, $res->neededRequests ); - $this->assertEquals( $passReq2, $res->neededRequests[0] ); + $expectedPassReq = clone $passReq2; + $expectedPassReq->required = AuthenticationRequest::OPTIONAL; + $this->assertEquals( $expectedPassReq, $res->neededRequests[0] ); $this->assertEquals( $skipReq, $res->neededRequests[1] ); $this->assertNotNull( $manager->getAuthenticationSessionData( 'reset-pass' ) ); $this->assertFalse( $passReq->done ); -- To view, visit https://gerrit.wikimedia.org/r/292990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad937767f0f7cf6dce43f7882720d1ed730ee28d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_27 Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid rollback and bot flagged edits in edit stash stats - change (mediawiki/core)
Aaron Schulz has submitted this change and it was merged. Change subject: Avoid rollback and bot flagged edits in edit stash stats .. Avoid rollback and bot flagged edits in edit stash stats This just skews the numbers with cases that could not use the cache anyway. Bug: T136678 Change-Id: Iaa90d4f6ee80e886f59bc43a1392e59fe2a8f900 --- M includes/page/WikiPage.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, but someone else must approve Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index cf533d6..13e5f14 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1628,7 +1628,8 @@ } // Get the pre-save transform content and final parser output - $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat ); + $useCache = !( $flags & EDIT_FORCE_BOT ); // avoid statsd noise (T136678) + $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat, $useCache ); $pstContent = $editInfo->pstContent; // Content object $meta = [ 'bot' => ( $flags & EDIT_FORCE_BOT ), -- To view, visit https://gerrit.wikimedia.org/r/292520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa90d4f6ee80e886f59bc43a1392e59fe2a8f900 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Send failmail and set no_thank_you on TY errors - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Send failmail and set no_thank_you on TY errors .. Send failmail and set no_thank_you on TY errors If it's a WATCHDOG_ERROR, we should hear about it... once. If there are enough bad errors in a row, we disable the thank you batch job. Introduces a new module setting thank_you_enabled to explicitly disable job rather than setting batch size to zero. Also convert error handling in thank you batch send to use exceptions rather than return values... mostly. I used WmfException, but maybe a TY-specific exception would be better. Bug: T131200 Change-Id: I4f71fecff7c7a3bd83878cad28498370e568b589 --- M sites/all/modules/thank_you/thank_you.module M sites/all/modules/wmf_common/WmfException.php 2 files changed, 107 insertions(+), 22 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 582777a..5c02715 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -242,15 +242,14 @@ if( !WMFCiviAPICheck::check_api_contribution( $contribution, $contribution_id ) ){ // the API result is bad $msg = 'Could not retrieve contribution record for: ' . $contribution_id . '' . print_r( $contribution, true ) . ''; - wmf_common_failmail( 'thank_you', $msg ); - return false; + throw new WmfException( 'GET_CONTRIBUTION', $msg ); } // go ahead and remove the extra layer of indirection to make it easier to use $simplified = WMFCiviAPICheck::check_api_simplify( $contribution, $contribution_id ); if( !$simplified ){ // simplification failed - watchdog('thank_you', 'Could not simplify contribution record for: ' . $contribution_id . '' . print_r( $contribution, true ) . '', array(), WATCHDOG_ERROR); - return false; + $msg = 'Could not simplify contribution record for: ' . $contribution_id . '' . print_r( $contribution, true ) . ''; + throw new WmfException( 'GET_CONTRIBUTION', $msg ); } $contribution = $simplified; @@ -277,14 +276,15 @@ // check that the API result is a valid contact result if( !WMFCiviAPICheck::check_api_contact( $contact, $contribution[ 'contact_id' ] ) ){ // the API result is bad - watchdog('thank_you', 'Could not retrieve contact record for: ' . $contribution['contact_id'] . '' . print_r( $contact, true ) . '', array(), WATCHDOG_ERROR); - return false; + $msg = 'Could not retrieve contact record for: ' . $contribution['contact_id'] . '' . print_r( $contact, true ) . ''; + throw new WmfException( 'GET_CONTACT', $msg ); } // go ahead and remove the extra layer of indirection to make it easier to use $simplified = WMFCiviAPICheck::check_api_simplify( $contact, $contribution[ 'contact_id' ] ); if( !$simplified ){ // simplification failed - watchdog('thank_you', 'Could not simplify contact record for: ' . $contribution['contact_id']. '' . print_r( $contact, true ). '', array(), WATCHDOG_ERROR); + $msg = 'Could not simplify contact record for: ' . $contribution['contact_id']. '' . print_r( $contact, true ). ''; + throw new WmfException( 'GET_CONTACT', $msg ); } $contact = $simplified; @@ -292,7 +292,7 @@ if ( empty( $contact['email'] ) or $contact['email'] === 'nob...@wikimedia.org' ) { watchdog('thank_you', 'No email address found. Processing as anonymous.', array(), WATCHDOG_INFO); wmf_civicrm_set_no_thank_you( $contribution['contribution_id'], 'anonymous' ); -return true; +return false; } $custom_values = wmf_civicrm_get_custom_values( $contribution_id, array( @@ -353,9 +353,10 @@ if ( $success ) { watchdog('thank_you', "Thank you mail sent successfully for contribution id: $contribution_id to " . $params['recipient_address'], array(), WATCHDOG_INFO); thank_you_update_ty_date( $contribution ); + return true; } else { - watchdog('thank_you', "Thank you mail failed for contribution id: $contribution_id to " . $params['recipient_address'], array(), WATCHDOG_ERROR); -wmf_civicrm_set_no_thank_you( $contribution_id, 'failed' ); + $msg = "Thank you mail failed for contribution id: $contribution_id to " . $params['recipient_address']; + throw new WmfException( 'BAD_EMAIL', $msg ); } } @@ -430,8 +431,8 @@ if ( $missing ) { $as_list = implode( ', ', $missing ); watchdog( 'thank_you',
[MediaWiki-commits] [Gerrit] mw.FirefoggHandler: Bail on non-ASCII filenames - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: mw.FirefoggHandler: Bail on non-ASCII filenames .. mw.FirefoggHandler: Bail on non-ASCII filenames Unfortunately, Firefogg does not correctly handle filenames with non-ASCII characters in them. There doesn't seem to be a way to work around this, so don't let it touch them, and display a message saying it's not our fault and explaining how to work around the issue. Bug: T136879 Change-Id: I28cc9617423145495aeebdb92a4637f418c1c042 --- M UploadWizard.php M i18n/en.json M i18n/qqq.json M resources/handlers/mw.FirefoggHandler.js 4 files changed, 10 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizard.php b/UploadWizard.php index a5bca53..de3b54e 100644 --- a/UploadWizard.php +++ b/UploadWizard.php @@ -328,6 +328,7 @@ 'mwe-upwiz-select-flickr', 'mwe-upwiz-flickr-disclaimer1', 'mwe-upwiz-flickr-disclaimer2', + 'mwe-upwiz-firefogg-nonascii', 'mwe-upwiz-encoding', 'mwe-upwiz-uploading', 'mwe-upwiz-queued', diff --git a/i18n/en.json b/i18n/en.json index 31da3c1..685c3ed 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -45,6 +45,7 @@ "mwe-upwiz-flickr-disclaimer2": "Please note that by using this tool, your IP address and request details will be available to Flickr.", "mwe-upwiz-error-no-image-retrieved": "We could not retrieve the file from $1.", "mwe-upwiz-multi-file-select": "Draw a box with your cursor over the files you would like to upload. Hold down the $2 key to make multiple non-adjacent selections. You can select up to $1 {{PLURAL:$1|file|files}} to upload.", + "mwe-upwiz-firefogg-nonascii": "Firefogg does not support filenames that contain accented characters, such as 'é' or 'ä'. Please rename the file to remove them all and try again. You will be able to correct the filename later.", "mwe-upwiz-transport-started": "Starting...", "mwe-upwiz-encoding": "Encoding...", "mwe-upwiz-uploading": "Uploading...", diff --git a/i18n/qqq.json b/i18n/qqq.json index a0c09b3..ae9c9d6 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -69,6 +69,7 @@ "mwe-upwiz-flickr-disclaimer2": "This is a legal disclaimer to let the user know that their IP address will be sent to Flickr when they submit the form. Please try to keep the wording similar to the approved version in English.", "mwe-upwiz-error-no-image-retrieved": "Error message shown when UploadWizard is not able to retrieve an image from a remote source. $1 is the name of the remote source, for example, Flickr.", "mwe-upwiz-multi-file-select": "Instructions that appear when the user can select multiple files to upload. See http://jqueryui.com/demos/selectable/#display-grid for how this works.\n* $1 - the maximum number of files that can be selected\n* $2 - either Command or Ctrl, depending on the user's detected operating system", + "mwe-upwiz-firefogg-nonascii": "Error message shown when the user chooses a video file that Firefogg can't handle.\n\nFeel free to replace 'é' and 'ä' with characters specific to your language, if any.", "mwe-upwiz-transport-started": "Status message when upload starts", "mwe-upwiz-encoding": "Status message while encoding with Firefogg", "mwe-upwiz-uploading": "Status message while upload is ongoing.\n{{Identical|Uploading}}", diff --git a/resources/handlers/mw.FirefoggHandler.js b/resources/handlers/mw.FirefoggHandler.js index f57c62f..9798452 100644 --- a/resources/handlers/mw.FirefoggHandler.js +++ b/resources/handlers/mw.FirefoggHandler.js @@ -60,6 +60,13 @@ handler = this, upload = this.upload; + // Bail on non-ASCII filenames + if ( !this.upload.title || !( /^[\x00-\x7F]*$/.test( this.upload.title.getMain() ) ) ) { + this.upload.setError( 'firefogg-nonascii', '' ); + this.upload.ui.setStatus( 'mwe-upwiz-firefogg-nonascii' ); + return $.Deferred().reject(); + } + mw.log( 'mw.FirefoggHandler::start> Upload start!' ); // pass file to Firefogg -- To view, visit https://gerrit.wikimedia.org/r/292789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28cc9617423145495aeebdb92a4637f418c1c042 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Jforrester
[MediaWiki-commits] [Gerrit] Use SpecialPage::getTitleFor() - change (mediawiki...GWToolset)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/292989 Change subject: Use SpecialPage::getTitleFor() .. Use SpecialPage::getTitleFor() For localized special page names. Change-Id: I66eb9b45379e4e387cb6176ff7f32d9742a4767e --- M includes/Forms/PreviewForm.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/89/292989/1 diff --git a/includes/Forms/PreviewForm.php b/includes/Forms/PreviewForm.php index d6e1f01..fc7b5f3 100644 --- a/includes/Forms/PreviewForm.php +++ b/includes/Forms/PreviewForm.php @@ -14,6 +14,7 @@ use IContextSource; use Linker; use ParserOptions; +use SpecialPage; use Title; class PreviewForm { @@ -56,7 +57,7 @@ 'li', [], Linker::link( - Title::newFromText( 'Special:GWToolset' ), + SpecialPage::getTitleFor( 'GWToolset' ), wfMessage( 'gwtoolset-step-1-heading' )->escaped(), [] ) -- To view, visit https://gerrit.wikimedia.org/r/292989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66eb9b45379e4e387cb6176ff7f32d9742a4767e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset 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] Make sure categories are passed to OutputPage in dbkey form - change (mediawiki...GWToolset)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/292988 Change subject: Make sure categories are passed to OutputPage in dbkey form .. Make sure categories are passed to OutputPage in dbkey form OutputPage::setCategoryLinks() expects the categories to be in dbkey form (using underscores) and not display form (spaces). Since we already create a Title object for validation, re-use that to get the dbkey. Bug: T137052 Change-Id: I00fbfe1f648485a19087ac6aaf0ff9137dc1e6ff --- M includes/Forms/PreviewForm.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/88/292988/1 diff --git a/includes/Forms/PreviewForm.php b/includes/Forms/PreviewForm.php index 30eb770..d6e1f01 100644 --- a/includes/Forms/PreviewForm.php +++ b/includes/Forms/PreviewForm.php @@ -297,8 +297,9 @@ // if the parser was not able to parse a template, {} will be left. // only include the text if valid category. - if ( Title::makeTitleSafe( NS_CATEGORY, $category ) ) { - $categories[$category] = 0; + $catTitle = Title::makeTitleSafe( NS_CATEGORY, $category ); + if ( $catTitle ) { + $categories[$catTitle->getDBkey()] = 0; } else { $notParsable[] = $category; } -- To view, visit https://gerrit.wikimedia.org/r/292988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00fbfe1f648485a19087ac6aaf0ff9137dc1e6ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GWToolset 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] Fix display of outdated label and description in EntityView ... - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/292987 Change subject: Fix display of outdated label and description in EntityView header .. Fix display of outdated label and description in EntityView header Problem was use of EntityInfoTermLookup, which retrieves terms from the terms table (via SqlEntityInfoBuilder). When an edit is made, ParserOutput (including page html) is generated before save and before the terms table is updated. So, whatever the terms were in the previous revision of an entity is what was displayed. This changes the code to use an EntityRetrievingTermLookup, with an InMemoryEntityLookup (populated with the entity that is being saved). This allows the language fallback to still be applied. More ideal would be a solution with less layers of indirection, and maybe not use LabelDescriptionLookup, though I think more refactoring is needed to make this possible. This is the smallest patch possible to fix the bug. I am not sure how best to add tests for this, other than to have a browser test that covers this and maybe we already have one? DEPLOY: there is an off-chance that this may affect the operation of SpamBlacklist and AbuseFilter. We did our best to check for this, but we should send a heads-up to wiki admins when deploying this, and we should double-check that the filters work after deployment. Bug: T135714 Change-Id: I1062d4451eca0218b3481fe2c13743273552fb4d (cherry picked from commit ed1ca9bbc886e1bf00a807fea9cc2c5272ce7c7f) --- M repo/includes/ParserOutput/EntityParserOutputGenerator.php M repo/includes/ParserOutput/PlaceholderEmittingEntityTermsView.php M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php M view/src/SimpleEntityTermsView.php 4 files changed, 78 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/87/292987/1 diff --git a/repo/includes/ParserOutput/EntityParserOutputGenerator.php b/repo/includes/ParserOutput/EntityParserOutputGenerator.php index 7fcfcf1..aeda587 100644 --- a/repo/includes/ParserOutput/EntityParserOutputGenerator.php +++ b/repo/includes/ParserOutput/EntityParserOutputGenerator.php @@ -7,6 +7,8 @@ use SpecialPage; use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Entity\EntityId; +use Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup; +use Wikibase\DataModel\Services\Lookup\InMemoryEntityLookup; use Wikibase\DataModel\Term\AliasesProvider; use Wikibase\DataModel\Term\LabelsProvider; use Wikibase\LanguageFallbackChain; @@ -157,13 +159,11 @@ $parserOutput->addJsConfigVars( $configVars ); $parserOutput->setExtensionData( 'wikibase-titletext', $this->getTitleText( $entity ) ); - $entityId = $entity->getId(); - if ( $generateHtml ) { $this->addHtmlToParserOutput( $parserOutput, $entity, - $this->getEntityInfo( $parserOutput, $entityId ) + $this->getEntityInfo( $parserOutput ) ); } else { // If we don't have HTML, the ParserOutput in question @@ -184,6 +184,7 @@ // Sometimes extensions like SpamBlacklist might call getParserOutput // before the id is assigned, during the process of creating a new entity. // in that case, no alternate links are added, which probably is no problem. + $entityId = $entity->getId(); if ( $entityId !== null ) { $this->addAlternateLinks( $parserOutput, $entityId ); } @@ -195,11 +196,10 @@ * Fetches some basic entity information from a set of entity IDs. * * @param ParserOutput $parserOutput -* @param EntityId|null $entityId * * @return EntityInfo */ - private function getEntityInfo( ParserOutput $parserOutput, EntityId $entityId = null ) { + private function getEntityInfo( ParserOutput $parserOutput ) { /** * Set in ReferencedEntitiesDataUpdater. * @@ -212,10 +212,6 @@ wfLogWarning( '$entityIds from ParserOutput "referenced-entities" extension data' . ' expected to be an array' ); $entityIds = []; - } - - if ( $entityId !== null ) { - $entityIds[] = $entityId; } $entityInfoBuilder = $this->entityInfoBuilderFactory->newEntityInfoBuilder( $entityIds ); @@ -272,8 +268,13 @@ EntityDocument $entity, EntityInfo $entityInfo ) { - $labelDescriptionLookup = new
[MediaWiki-commits] [Gerrit] clamav package update broken config workaround - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: clamav package update broken config workaround .. clamav package update broken config workaround Change-Id: Ia6070c01122f294249ddd6f30b2db63655f7d212 --- M modules/clamav/files/clamd.conf 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/clamav/files/clamd.conf b/modules/clamav/files/clamd.conf index 5649e55..d216912 100644 --- a/modules/clamav/files/clamd.conf +++ b/modules/clamav/files/clamd.conf @@ -8,7 +8,11 @@ # TemporaryDirectory is not set to its default /tmp here to make overriding # the default with environment variables TMPDIR/TMP/TEMP possible User clamav -AllowSupplementaryGroups true +# From package Changelog: +# clamav (0.99.2+dfsg-1) unstable; urgency=medium +# * Drop AllowSupplementaryGroups option which is default now +#(Closes: #822444). +# AllowSupplementaryGroups true ScanMail true ScanArchive true ArchiveBlockEncrypted false -- To view, visit https://gerrit.wikimedia.org/r/292986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6070c01122f294249ddd6f30b2db63655f7d212 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack Gerrit-Reviewer: RobH ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] clamav package update broken config workaround - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/292986 Change subject: clamav package update broken config workaround .. clamav package update broken config workaround Change-Id: Ia6070c01122f294249ddd6f30b2db63655f7d212 --- M modules/clamav/files/clamd.conf 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/292986/1 diff --git a/modules/clamav/files/clamd.conf b/modules/clamav/files/clamd.conf index 5649e55..d216912 100644 --- a/modules/clamav/files/clamd.conf +++ b/modules/clamav/files/clamd.conf @@ -8,7 +8,11 @@ # TemporaryDirectory is not set to its default /tmp here to make overriding # the default with environment variables TMPDIR/TMP/TEMP possible User clamav -AllowSupplementaryGroups true +# From package Changelog: +# clamav (0.99.2+dfsg-1) unstable; urgency=medium +# * Drop AllowSupplementaryGroups option which is default now +#(Closes: #822444). +# AllowSupplementaryGroups true ScanMail true ScanArchive true ArchiveBlockEncrypted false -- To view, visit https://gerrit.wikimedia.org/r/292986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6070c01122f294249ddd6f30b2db63655f7d212 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prefetch $wgCentralAuthLoginWiki DNS - change (mediawiki...CentralAuth)
Hello Krinkle, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/292985 to review the following change. Change subject: Prefetch $wgCentralAuthLoginWiki DNS .. Prefetch $wgCentralAuthLoginWiki DNS Insert a tag in the page HTML for anons, so that the browser can get to work on resolving the domain name of $wgCentralAuthLoginWiki sooner. Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Task: T92864 --- M includes/CentralAuthHooks.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/85/292985/1 diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index ed7ea8e..4283266 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -984,6 +984,15 @@ // For non-JS clients. Use WikiMap to avoid localization of the // 'Special' namespace, see bug 54195. $wiki = WikiMap::getWiki( wfWikiID() ); + + $loginWiki = WikiMap::getWiki( $wgCentralAuthLoginWiki ); + if ( $wiki->getCanonicalServer() !== $loginWiki->getCanonicalServer() ) { + $out->addHeadItem( 'centralauth-dns-prefetch', Html::element( 'link', [ + 'rel' => 'dns-prefetch', + 'href' => preg_replace( '/^https?:/', '', $loginWiki->getCanonicalServer() ), + ] ) ); + } + $params = array( 'type' => '1x1', ); -- To view, visit https://gerrit.wikimedia.org/r/292985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79cbb1dcc75a536dbef0a5d70b866c57e2c4a1ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Ori.livnehGerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jsduck: Update paths to OOjs UI files in eg-iframe.html - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/292984 Change subject: jsduck: Update paths to OOjs UI files in eg-iframe.html .. jsduck: Update paths to OOjs UI files in eg-iframe.html Follow-up to 1f49b66c6f89d56dee457196296a7869f0f7475d. Bug: T136954 Change-Id: Idb29a69992fff96c51d18d34b36ad751f3b0469f --- M maintenance/jsduck/eg-iframe.html 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/292984/1 diff --git a/maintenance/jsduck/eg-iframe.html b/maintenance/jsduck/eg-iframe.html index 5434735..d56d88e 100644 --- a/maintenance/jsduck/eg-iframe.html +++ b/maintenance/jsduck/eg-iframe.html @@ -47,7 +47,10 @@ - + + + +