Merge "API: Change default continuation format for action=query"
[lhc/web/wiklou.git] / includes / media / JpegMetadataExtractor.php
index 0d8013d..5069f18 100644 (file)
@@ -48,7 +48,7 @@ class JpegMetadataExtractor {
         * @throws MWException If given invalid file.
         */
        static function segmentSplitter( $filename ) {
-               $showXMP = function_exists( 'xml_parser_create_ns' );
+               $showXMP = XMPReader::isSupported();
 
                $segmentCount = 0;
 
@@ -102,9 +102,9 @@ class JpegMetadataExtractor {
                                // turns $com to valid utf-8.
                                // thus if no change, its utf-8, otherwise its something else.
                                if ( $com !== $oldCom ) {
-                                       wfSuppressWarnings();
+                                       MediaWiki\suppressWarnings();
                                        $com = $oldCom = iconv( 'windows-1252', 'UTF-8//IGNORE', $oldCom );
-                                       wfRestoreWarnings();
+                                       MediaWiki\restoreWarnings();
                                }
                                // Try it again, if its still not a valid string, then probably
                                // binary junk or some really weird encoding, so don't extract.