Merge "API: Change default continuation format for action=query"
[lhc/web/wiklou.git] / includes / media / XMP.php
index 6b36e37..a838355 100644 (file)
@@ -339,9 +339,9 @@ class XMPReader implements LoggerAwareInterface {
                        }
                        if ( $this->charset !== 'UTF-8' ) {
                                //don't convert if already utf-8
-                               wfSuppressWarnings();
+                               MediaWiki\suppressWarnings();
                                $content = iconv( $this->charset, 'UTF-8//IGNORE', $content );
-                               wfRestoreWarnings();
+                               MediaWiki\restoreWarnings();
                        }
 
                        // Ensure the XMP block does not have an xml doctype declaration, which
@@ -415,7 +415,7 @@ class XMPReader implements LoggerAwareInterface {
                $len = unpack( 'Nlength/Noffset', substr( $content, 32, 8 ) );
 
                if ( !$len || $len['length'] < 4 || $len['offset'] < 0 || $len['offset'] > $len['length'] ) {
-                       $this->logger->info(  __METHOD__ . 'Error reading extended XMP block, invalid length or offset.' );
+                       $this->logger->info( __METHOD__ . 'Error reading extended XMP block, invalid length or offset.' );
 
                        return false;
                }
@@ -533,7 +533,7 @@ class XMPReader implements LoggerAwareInterface {
 
                // Even with LIBXML_NOWARNING set, XMLReader::read gives a warning
                // when parsing truncated XML, which causes unit tests to fail.
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                while ( $reader->read() ) {
                        if ( $reader->nodeType === XMLReader::ELEMENT ) {
                                // Reached the first element without hitting a doctype declaration
@@ -547,7 +547,7 @@ class XMPReader implements LoggerAwareInterface {
                                break;
                        }
                }
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
 
                if ( !is_null( $result ) ) {
                        return $result;
@@ -638,7 +638,6 @@ class XMPReader implements LoggerAwareInterface {
                // Validate structures.
                list( $ns, $tag ) = explode( ' ', $elm, 2 );
                if ( isset( $this->items[$ns][$tag]['validate'] ) ) {
-
                        $info =& $this->items[$ns][$tag];
                        $finalName = isset( $info['map_name'] )
                                ? $info['map_name'] : $tag;