Merge "Instrument edit failures"
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index df91588..f17681c 100644 (file)
@@ -746,11 +746,11 @@ abstract class UploadBase {
                $file = $this->getLocalFile();
 
                foreach ( $sizes as $size ) {
-                       if ( $file->isVectorized()
-                               || $file->getWidth() > $size ) {
-                                       $jobs[] = new ThumbnailRenderJob( $file->getTitle(), array(
-                                               'transformParams' => array( 'width' => $size ),
-                                       ) );
+                       if ( $file->isVectorized() || $file->getWidth() > $size ) {
+                               $jobs[] = new ThumbnailRenderJob(
+                                       $file->getTitle(),
+                                       array( 'transformParams' => array( 'width' => $size ) )
+                               );
                        }
                }
 
@@ -1221,9 +1221,9 @@ abstract class UploadBase {
                // detect the encoding in case is specifies an encoding not whitelisted in self::$safeXmlEncodings
                $attemptEncodings = array( 'UTF-16', 'UTF-16BE', 'UTF-32', 'UTF-32BE' );
                foreach ( $attemptEncodings as $encoding ) {
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        $str = iconv( $encoding, 'UTF-8', $contents );
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                        if ( $str != '' && preg_match( "!<\?xml\b(.*?)\?>!si", $str, $matches ) ) {
                                if ( preg_match( $encodingRegex, $matches[1], $encMatch )
                                        && !in_array( strtoupper( $encMatch[1] ), self::$safeXmlEncodings )