Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56385
Change subject: Add $wgTranslateUseTux
......................................................................
Add $wgTranslateUseTux
With this enabling TUX can be done by just flipping a variable.
Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
---
M Translate.php
M specials/SpecialTranslate.php
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/85/56385/1
diff --git a/Translate.php b/Translate.php
index 6a08405..91f51b5 100644
--- a/Translate.php
+++ b/Translate.php
@@ -572,6 +572,13 @@
*/
$wgTranslateTestTTMServer = null;
+/**
+ * Whether to use the TUX interface by default. tux=1 and tux=0 in the url can
+ * be used to switch between old and new. This variable will be removed after
+ * transition time.
+ */
+$wgTranslateUseTux = false;
+
# </source>
/** @cond cli_support */
diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index 6d59143..5275bcd 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -891,14 +891,16 @@
}
public static function isBeta( WebRequest $request ) {
+ global $wgTranslateUseTux;
+
$tux = $request->getVal( 'tux', null );
if ( $tux === null ) {
- $tux = $request->getCookie( 'tux', null, false );
+ $tux = $request->getCookie( 'tux', null,
$wgTranslateUseTux );
} elseif ( $tux ) {
$request->response()->setCookie( 'tux', 1 );
} else {
- $request->response()->setCookie( 'tux', '', 1 );
+ $request->response()->setCookie( 'tux', 0 );
}
return $tux;
--
To view, visit https://gerrit.wikimedia.org/r/56385
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits