jenkins-bot has submitted this change and it was merged.
Change subject: Don't show the red interlanguage link when creating a page
......................................................................
Don't show the red interlanguage link when creating a page
It's better to check that a page exists than to check
that the action is 'view':
* It works with both VE and wikitext editor.
* Showing the red link on an existing page that is being edited is OK.
Thanks to Matma Rex for pointing these things out.
Bug: T94845
Change-Id: I3ea97f7deb40921d7cefe7e402699e362f10dd5f
---
M ContentTranslation.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Bartosz Dziewoński: Looks good to me, but someone else must approve
Santhosh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index fafa3b6..c4e591c 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -59,7 +59,7 @@
}
if ( $title->inNamespace( NS_MAIN ) &&
- Action::getActionName( $out->getContext() ) === 'view'
+ $title->exists()
) {
$out->addModules( 'ext.cx.redlink' );
}
--
To view, visit https://gerrit.wikimedia.org/r/203364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3ea97f7deb40921d7cefe7e402699e362f10dd5f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits