Merge "Add autocomplete for WhatLinksHere subpages"
[lhc/web/wiklou.git] / includes / media / FormatMetadata.php
index 07d7618..e8e73af 100644 (file)
@@ -1595,11 +1595,8 @@ class FormatMetadata extends ContextSource {
        public function fetchExtendedMetadata( File $file ) {
                global $wgMemc;
 
-               wfProfileIn( __METHOD__ );
-
                // If revision deleted, exit immediately
                if ( $file->isDeleted( File::DELETED_FILE ) ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array();
                }
@@ -1614,7 +1611,7 @@ class FormatMetadata extends ContextSource {
                $cachedValue = $wgMemc->get( $cacheKey );
                if (
                        $cachedValue
-                       && wfRunHooks( 'ValidateExtendedMetadataCache', array( $cachedValue['timestamp'], $file ) )
+                       && Hooks::run( 'ValidateExtendedMetadataCache', array( $cachedValue['timestamp'], $file ) )
                ) {
                        $extendedMetadata = $cachedValue['data'];
                } else {
@@ -1634,8 +1631,6 @@ class FormatMetadata extends ContextSource {
                        $wgMemc->set( $cacheKey, $valueToCache, $maxCacheTime );
                }
 
-               wfProfileOut( __METHOD__ );
-
                return $extendedMetadata;
        }
 
@@ -1657,8 +1652,6 @@ class FormatMetadata extends ContextSource {
                        return $file->getExtendedMetadata() ?: array();
                }
 
-               wfProfileIn( __METHOD__ );
-
                $uploadDate = wfTimestamp( TS_ISO_8601, $file->getTimestamp() );
 
                $fileMetadata = array(
@@ -1697,8 +1690,6 @@ class FormatMetadata extends ContextSource {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
-
                return $fileMetadata;
        }
 
@@ -1715,9 +1706,8 @@ class FormatMetadata extends ContextSource {
        protected function getExtendedMetadataFromHook( File $file, array $extendedMetadata,
                &$maxCacheTime
        ) {
-               wfProfileIn( __METHOD__ );
 
-               wfRunHooks( 'GetExtendedMetadata', array(
+               Hooks::run( 'GetExtendedMetadata', array(
                        &$extendedMetadata,
                        $file,
                        $this->getContext(),
@@ -1732,8 +1722,6 @@ class FormatMetadata extends ContextSource {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
-
                return $extendedMetadata;
        }