jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I3ca54b36d1089668ab94781edcfbb2687e8c0f4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to