Merge "Use User::equals() where applicable in the class"
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index e598f0b..38baf5b 100644 (file)
@@ -92,7 +92,14 @@ class SpecialVersion extends SpecialPage {
                                        if ( $file ) {
                                                $wikiText = file_get_contents( $file );
                                                if ( substr( $file, -4 ) === '.txt' ) {
-                                                       $wikiText = Html::element( 'pre', array(), $wikiText );
+                                                       $wikiText = Html::element(
+                                                               'pre',
+                                                               array(
+                                                                       'lang' => 'en',
+                                                                       'dir' => 'ltr',
+                                                               ),
+                                                               $wikiText
+                                                       );
                                                }
                                        }
                                }
@@ -109,7 +116,14 @@ class SpecialVersion extends SpecialPage {
                                        $file = $this->getExtLicenseFileName( dirname( $extNode['path'] ) );
                                        if ( $file ) {
                                                $wikiText = file_get_contents( $file );
-                                               $wikiText = "<pre>$wikiText</pre>";
+                                               $wikiText = Html::element(
+                                                       'pre',
+                                                       array(
+                                                               'lang' => 'en',
+                                                               'dir' => 'ltr',
+                                                       ),
+                                                       $wikiText
+                                               );
                                        }
                                }
 
@@ -215,6 +229,10 @@ class SpecialVersion extends SpecialPage {
                }
                $software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
 
+               if ( IcuCollation::getICUVersion() ) {
+                       $software['[http://site.icu-project.org/ ICU]'] = IcuCollation::getICUVersion();
+               }
+
                // Allow a hook to add/remove items.
                Hooks::run( 'SoftwareInfo', array( &$software ) );
 
@@ -1120,7 +1138,10 @@ class SpecialVersion extends SpecialPage {
                if ( is_array( $list ) && count( $list ) == 1 ) {
                        $list = $list[0];
                }
-               if ( is_object( $list ) ) {
+               if ( $list instanceof Closure ) {
+                       // Don't output stuff like "Closure$;1028376090#8$48499d94fe0147f7c633b365be39952b$"
+                       return 'Closure';
+               } elseif ( is_object( $list ) ) {
                        $class = wfMessage( 'parentheses' )->params( get_class( $list ) )->escaped();
 
                        return $class;