Avoid a few overly complicated is_null() checks
[lhc/web/wiklou.git] / includes / media / DjVuImage.php
index d25111c..04ddda2 100644 (file)
@@ -117,9 +117,9 @@ class DjVuImage {
        }
 
        function getInfo() {
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $file = fopen( $this->mFilename, 'rb' );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
                if ( $file === false ) {
                        wfDebug( __METHOD__ . ": missing or failed file read\n" );
 
@@ -285,8 +285,8 @@ class DjVuImage {
 EOR;
                                $txt = preg_replace_callback( $reg, [ $this, 'pageTextCallback' ], $txt );
                                $txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n";
-                               $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml, 1 );
-                               $xml = $xml . $txt . '</mw-djvu>';
+                               $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml, 1 ) .
+                                       $txt . '</mw-djvu>';
                        }
                }