jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/371590 )

Change subject: Remove deprecated function usage
......................................................................


Remove deprecated function usage

* Delete wfProfileIn()/wfProfleOut()
* Replace wfSuppressWarnings()/wfRestoreWarnings() with alternatives

Change-Id: Iab716ec99643c63f0ce045d1883e8bb33fb30593
---
M PagedTiffHandler.image.php
M PagedTiffHandler_body.php
2 files changed, 2 insertions(+), 16 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PagedTiffHandler.image.php b/PagedTiffHandler.image.php
index 937aa25..c645dc3 100644
--- a/PagedTiffHandler.image.php
+++ b/PagedTiffHandler.image.php
@@ -91,8 +91,6 @@
                global $wgShowEXIF;
 
                if ( $this->metadata === null ) {
-                       wfProfileIn( 'PagedTiffImage::retrieveMetaData' );
-
                        // fetch base info: number of pages, size and alpha for 
each page.
                        // run hooks first, then optionally tiffinfo or, per 
default,
                        // ImageMagic's identify command
@@ -108,11 +106,9 @@
                                $cmd = wfEscapeShellArg( $wgTiffTiffinfoCommand 
) .
                                        ' ' . wfEscapeShellArg( 
$this->mFilename ) . ' 2>&1';
 
-                               wfProfileIn( 'tiffinfo' );
                                wfDebug( __METHOD__ . ": $cmd\n" );
                                $retval = '';
                                $dump = wfShellExec( $cmd, $retval );
-                               wfProfileOut( 'tiffinfo' );
 
                                if ( $retval ) {
                                        $data['errors'][] = "tiffinfo command 
failed: $cmd";
@@ -127,11 +123,9 @@
                                        
'"[BEGIN]page=%p\nalpha=%A\nalpha2=%r\nheight=%h\nwidth=%w\ndepth=%z[END]" ' .
                                        wfEscapeShellArg( $this->mFilename ) . 
' 2>&1';
 
-                               wfProfileIn( 'identify' );
                                wfDebug( __METHOD__ . ": $cmd\n" );
                                $retval = '';
                                $dump = wfShellExec( $cmd, $retval );
-                               wfProfileOut( 'identify' );
 
                                if ( $retval ) {
                                        $data['errors'][] = "identify command 
failed: $cmd";
@@ -164,11 +158,9 @@
                                $cmd = wfEscapeShellArg( $wgExiv2Command ) .
                                        ' -u -psix -Pnt ' . wfEscapeShellArg( 
$this->mFilename ) . ' 2>&1';
 
-                               wfProfileIn( 'exiv2' );
                                wfDebug( __METHOD__ . ": $cmd\n" );
                                $retval = '';
                                $dump = wfShellExec( $cmd, $retval );
-                               wfProfileOut( 'exiv2' );
 
                                if ( $retval ) {
                                        $data['errors'][] = "exiv command 
failed: $cmd";
@@ -202,8 +194,6 @@
                        unset( $this->metadata['exif']['ImageResources'] );
 
                        $this->metadata['TIFF_METADATA_VERSION'] = 
PagedTiffHandler::TIFF_METADATA_VERSION;
-
-                       wfProfileOut( 'PagedTiffImage::retrieveMetaData' );
                }
 
                return $this->metadata;
diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php
index 8c4f620..7dc6ef2 100644
--- a/PagedTiffHandler_body.php
+++ b/PagedTiffHandler_body.php
@@ -406,9 +406,7 @@
 
                wfDebug( __METHOD__ . ": $cmd\n" );
                $retval = null;
-               wfProfileIn( 'PagedTiffHandler' );
                $err = wfShellExecWithStderr( $cmd, $retval );
-               wfProfileOut( 'PagedTiffHandler' );
 
                if ( $retval !== 0 ) {
                        wfDebugLog( 'thumbnail', "thumbnail failed on " . 
wfHostname() .
@@ -716,11 +714,9 @@
                        return false;
                }
 
-               wfProfileIn( __METHOD__ );
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $image->tiffMetaArray = unserialize( $metadata );
-               wfRestoreWarnings();
-               wfProfileOut( __METHOD__ );
+               MediaWiki\restoreWarnings();
 
                return $image->tiffMetaArray;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/371590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab716ec99643c63f0ce045d1883e8bb33fb30593
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to