Revert r19877; no reason is given for it but it breaks things such as parameter subst...
[lhc/web/wiklou.git] / includes / SpecialVersion.php
index dba694c..5bc1318 100644 (file)
@@ -2,8 +2,7 @@
 /**#@+
  * Give information about the version of MediaWiki, PHP, the DB and extensions
  *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  *
  * @bug 2019, 4531
  *
@@ -50,10 +49,7 @@ class SpecialVersion {
         */
        function MediaWikiCredits() {
                $version = self::getVersion();
-               $dbr =& wfGetDB( DB_SLAVE );
-
-               global $wgLanguageNames, $wgLanguageCode;
-               $mwlang = $wgLanguageNames[$wgLanguageCode];
+               $dbr = wfGetDB( DB_SLAVE );
 
                $ret =
                "__NOTOC__
@@ -110,21 +106,19 @@ class SpecialVersion {
                $out .= wfOpenElement('table', array('id' => 'sv-ext') );
 
                foreach ( $extensionTypes as $type => $text ) {
-                       if ( count( @$wgExtensionCredits[$type] ) ) {
+                       if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) {
                                $out .= $this->openExtType( $text );
 
                                usort( $wgExtensionCredits[$type], array( $this, 'compare' ) );
 
                                foreach ( $wgExtensionCredits[$type] as $extension ) {
-                                       wfSuppressWarnings();
                                        $out .= $this->formatCredits(
-                                               $extension['name'],
-                                               $extension['version'],
-                                               $extension['author'],
-                                               $extension['url'],
-                                               $extension['description']
+                                               isset ( $extension['name'] )        ? $extension['name']        : '',
+                                               isset ( $extension['version'] )     ? $extension['version']     : null,
+                                               isset ( $extension['author'] )      ? $extension['author']      : '',
+                                               isset ( $extension['url'] )         ? $extension['url']         : null,
+                                               isset ( $extension['description'] ) ? $extension['description'] : ''
                                        );
-                                       wfRestoreWarnings();
                                }
                        }
                }
@@ -195,7 +189,7 @@ class SpecialVersion {
 
                        foreach ($myWgHooks as $hook => $hooks)
                                $ret .= "<tr><td>$hook</td><td>" . $this->listToText( $hooks ) . "</td></tr>\n";
-                       
+
                        $ret .= '</table>';
                        return $ret;
                } else
@@ -292,10 +286,7 @@ class SpecialVersion {
                                return false;
                        }
 
-                       // SimpleXml whines about the xmlns...
-                       wfSuppressWarnings();
-                       $xml = simplexml_load_file( $entries );
-                       wfRestoreWarnings();
+                       $xml = simplexml_load_file( $entries, "SimpleXMLElement", LIBXML_NOWARNING );
 
                        if( $xml ) {
                                foreach( $xml->entry as $entry ) {