Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/213196
Change subject: Allow transclusion with Special:MyLanguage
......................................................................
Allow transclusion with Special:MyLanguage
Change-Id: I6966d12df4e0fb215b6b7a614535ac7d6d1f0b68
---
M includes/specials/SpecialMyLanguage.php
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/96/213196/1
diff --git a/includes/specials/SpecialMyLanguage.php
b/includes/specials/SpecialMyLanguage.php
index 3d8ff97..eea1803 100644
--- a/includes/specials/SpecialMyLanguage.php
+++ b/includes/specials/SpecialMyLanguage.php
@@ -37,6 +37,23 @@
parent::__construct( 'MyLanguage' );
}
+ public function isIncludable() {
+ return true;
+ }
+
+ public function execute( $subpage ) {
+ if ( $this->including() ) {
+ $title = $this->findTitle( $subpage );
+ $page = new WikiPage( $title );
+ $content = $page->getContent();
+ if ( $content ) {
+ $this->getOutput()->addWikitext(
$content->getWikitextForTransclusion() );
+ }
+ } else {
+ parent::execute( $subpage );
+ }
+ }
+
/**
* If the special page is a redirect, then get the Title object it
redirects to.
* False otherwise.
--
To view, visit https://gerrit.wikimedia.org/r/213196
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6966d12df4e0fb215b6b7a614535ac7d6d1f0b68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits