Anomie has uploaded a new change for review.

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

Change subject: Use Title::isExternal, not Title::isLocal
......................................................................

Use Title::isExternal, not Title::isLocal

The latter considers prefixes such as 'fr:' to be local on enwiki, which
is completely not what we want here.

Bug: T99523
Change-Id: I7becc344cf41c7f7551dc469005a52fba5374742
---
M SpecialTemplateSandbox.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/15/211715/1

diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index fdf5471..83953e6 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -194,7 +194,7 @@
                        if ( !$title instanceof Title || $title->getFragment() 
!== '' ) {
                                return $this->msg( 
'templatesandbox-invalid-prefix' )->parseAsBlock();
                        }
-                       if ( !$title->isLocal() ) {
+                       if ( $title->isExternal() ) {
                                return $this->msg( 
'templatesandbox-prefix-not-local' )->parseAsBlock();
                        }
                        $this->prefixes[] = $title->getFullText();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7becc344cf41c7f7551dc469005a52fba5374742
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

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

Reply via email to