Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/89149
Change subject: TranslationStash: If user is not sandboxed, redirect to
Special:Translate
......................................................................
TranslationStash: If user is not sandboxed, redirect to Special:Translate
Change-Id: Iefaf8379ba6d4faf315b047398b81879a1fa032d
---
M specials/SpecialTranslationStash.php
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/49/89149/1
diff --git a/specials/SpecialTranslationStash.php
b/specials/SpecialTranslationStash.php
index fa8ad96..33b86de 100644
--- a/specials/SpecialTranslationStash.php
+++ b/specials/SpecialTranslationStash.php
@@ -20,6 +20,13 @@
public function execute( $params ) {
$this->setHeaders();
$out = $this->getOutput();
+ if ( !TranslateSandbox::isSandboxed( $this->getUser() ) ) {
+ // Not a sandboxed user, redirect to Special:Translate
+ $code = $this->getLanguage()->getCode();
+ $title = SpecialPage::getTitleFor( 'Translate', $code );
+ $out->redirect( $title->getLocalUrl() );
+ return;
+ }
$out->addModules( 'ext.translate.special.translationstash' );
$this->showPage();
}
--
To view, visit https://gerrit.wikimedia.org/r/89149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefaf8379ba6d4faf315b047398b81879a1fa032d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits