Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386790 )
Change subject: Allow anonymous usage of ApiQueryContentTranslation ...................................................................... Allow anonymous usage of ApiQueryContentTranslation There was a regression that caused the api failure if used from an anonymous context. For example, action=query&list=contenttranslation&from=en&to=es&sourcetitle=Hibiscus will fail with error: 'User account is not global' This also unbreaks my translation debugger tooling. Change-Id: Ia7ec94c23ae3a97662db5417d314905be6c3450a --- M api/ApiQueryContentTranslation.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/90/386790/1 diff --git a/api/ApiQueryContentTranslation.php b/api/ApiQueryContentTranslation.php index 534fc22..ea16f03 100644 --- a/api/ApiQueryContentTranslation.php +++ b/api/ApiQueryContentTranslation.php @@ -117,8 +117,9 @@ */ public function find( TranslationWork $work, Translator $translator ) { $result = $this->getResult(); - $translation = Translation::findForTranslator( $work, $translator ); - + if ( $this->user ) { + $translation = Translation::findForTranslator( $work, $translator ); + } // Check for other drafts. If one exists, return that to the UI which will then // know to display an error to the user because we disallow two users to start // drafts on the same translation work. -- To view, visit https://gerrit.wikimedia.org/r/386790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7ec94c23ae3a97662db5417d314905be6c3450a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits