Add mediawiki.userSuggest to Special:[Deleted]Contributions
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index 4b1abac..6b9173f 100644 (file)
@@ -204,7 +204,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string
         */
-       static function softwareInformation() {
+       public static function softwareInformation() {
                $dbr = wfGetDB( DB_SLAVE );
 
                // Put the software in an array of form 'name' => 'version'. All messages should
@@ -212,9 +212,11 @@ class SpecialVersion extends SpecialPage {
                // wikimarkup can be used.
                $software = array();
                $software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
-               $phpKey = wfIsHHVM() ? '[http://hhvm.com/ HHVM]' :
-                       '[https://php.net/ PHP]';
-               $software[$phpKey] = PHP_VERSION . " (" . PHP_SAPI . ")";
+               if ( wfIsHHVM() ) {
+                       $software['[http://hhvm.com/ HHVM]'] = HHVM_VERSION . " (" . PHP_SAPI . ")";
+               } else {
+                       $software['[https://php.net/ PHP]'] = PHP_VERSION . " (" . PHP_SAPI . ")";
+               }
                $software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
 
                // Allow a hook to add/remove items.
@@ -426,7 +428,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string Wikitext
         */
-       function getExtensionCredits() {
+       public function getExtensionCredits() {
                global $wgExtensionCredits;
 
                if (
@@ -480,7 +482,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string Wikitext
         */
-       function getSkinCredits() {
+       public function getSkinCredits() {
                global $wgExtensionCredits;
                if ( !isset( $wgExtensionCredits['skin'] ) || count( $wgExtensionCredits['skin'] ) === 0 ) {
                        return '';
@@ -523,8 +525,17 @@ class SpecialVersion extends SpecialPage {
                        );
 
                        array_walk( $tags, function ( &$value ) {
-                               $value = '<' . htmlspecialchars( $value ) . '>';
+                               // Bidirectional isolation improves readability in RTL wikis
+                               $value = Html::element(
+                                       'bdi',
+                                       // Prevent < and > from slipping to another line
+                                       array(
+                                               'style' => 'white-space: nowrap;',
+                                       ),
+                                       "<$value>"
+                               );
                        } );
+
                        $out .= $this->listToText( $tags );
                } else {
                        $out = '';
@@ -591,7 +602,7 @@ class SpecialVersion extends SpecialPage {
         * @param array $b
         * @return int
         */
-       function compare( $a, $b ) {
+       public function compare( $a, $b ) {
                if ( $a['name'] === $b['name'] ) {
                        return 0;
                } else {
@@ -618,7 +629,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string Raw HTML
         */
-       function getCreditsForExtension( array $extension ) {
+       public function getCreditsForExtension( array $extension ) {
                $out = $this->getOutput();
 
                // We must obtain the information for all the bits and pieces!
@@ -741,13 +752,19 @@ class SpecialVersion extends SpecialPage {
                        $licenseLink = Linker::link(
                                $this->getPageTitle( 'License/' . $extensionName ),
                                $out->parseInline( $extension['license-name'] ),
-                               array( 'class' => 'mw-version-ext-license' )
+                               array(
+                                       'class' => 'mw-version-ext-license',
+                                       'dir' => 'auto',
+                               )
                        );
                } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
                        $licenseLink = Linker::link(
                                $this->getPageTitle( 'License/' . $extensionName ),
                                $this->msg( 'version-ext-license' ),
-                               array( 'class' => 'mw-version-ext-license' )
+                               array(
+                                       'class' => 'mw-version-ext-license',
+                                       'dir' => 'auto',
+                               )
                        );
                }
 
@@ -903,7 +920,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string HTML fragment
         */
-       function listAuthors( $authors, $extName, $extDir ) {
+       public function listAuthors( $authors, $extName, $extDir ) {
                $hasOthers = false;
 
                $list = array();
@@ -1006,7 +1023,7 @@ class SpecialVersion extends SpecialPage {
         *
         * @return string
         */
-       function listToText( $list, $sort = true ) {
+       public function listToText( $list, $sort = true ) {
                if ( !count( $list ) ) {
                        return '';
                }