KartikMistry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201709

Change subject: Fix undefined 'cx' error
......................................................................

Fix undefined 'cx' error

Bug: T94898
Change-Id: I893c2083f795a4785424429b3b191ae76cc388be
(cherry picked from commit 687eba157e2fc2067f68198f78f4929ddb369911)
---
M ContentTranslation.hooks.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/09/201709/1

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 6563f41..d02b880 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -199,7 +199,8 @@
                $out = RequestContext::getMain()->getOutput();
 
                if (
-                       $saveOptions['cx'] &&
+                       isset( $saveOptions['cx'] ) &&
+                       $saveOptions['cx'] === '1' &&
                        !isset( $saveOptions['cx-know'] ) &&
                        !$out->getTitle()->isSpecial( 'ContentTranslation' )
                ) {
@@ -209,6 +210,7 @@
                        // This make sure the auto-open contribution menu shown 
exactly once.
                        // and it is not in Special:CX
                        $saveOptions['cx-know'] = true;
+
                }
 
                return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/201709
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I893c2083f795a4785424429b3b191ae76cc388be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: wmf/1.25wmf23
Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to