Hiong3-eng5 has uploaded a new change for review. https://gerrit.wikimedia.org/r/125371
Change subject: SpecialLanguages 1.22 and below compatibility ...................................................................... SpecialLanguages 1.22 and below compatibility Change-Id: I643919fb701755cfcb54df938a6e6e0c94a7d74e --- M SpecialLanguages.php 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData refs/changes/71/125371/1 diff --git a/SpecialLanguages.php b/SpecialLanguages.php index 860f749..48d92b7 100644 --- a/SpecialLanguages.php +++ b/SpecialLanguages.php @@ -23,7 +23,14 @@ class SpecialLanguages extends SpecialPage { function SpecialLanguages() { + global $wgVersion; parent::__construct( 'Languages' ); + // compatibility for mw 1.22 or below + $this->pre1_23 = false; + preg_match( '/^(\d+).(\d+)/', $wgVersion, $match ); + if ( $match[1] == 1 && $match[2] < 23 ) { + $this->pre1_23 = true; + } } function execute( $par ) { @@ -64,7 +71,11 @@ } function showForm() { global $wgOut; - $action = htmlspecialchars( $this->getPageTitle()->getLocalURL( 'action=submit' ) ); + if ( $this->pre1_23 ) { + $action = htmlspecialchars( $this->getTitle()->getLocalURL( 'action=submit' ) ); + } else { + $action = htmlspecialchars( $this->getPageTitle()->getLocalURL( 'action=submit' ) ); + } $wgOut->addHTML( <<<END <form name="addlanguage" method="post" action="$action"> -- To view, visit https://gerrit.wikimedia.org/r/125371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I643919fb701755cfcb54df938a6e6e0c94a7d74e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Hiong3-eng5 <hiong3.e...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits