Merge "Installer: Link 4.0 family of CC licenses"
[lhc/web/wiklou.git] / includes / media / FormatMetadata.php
index 5b57821..73eeba6 100644 (file)
@@ -190,8 +190,18 @@ class FormatMetadata extends ContextSource {
 
                                        case 'PhotometricInterpretation':
                                                switch ( $val ) {
+                                                       case 0:
+                                                       case 1:
                                                        case 2:
+                                                       case 3:
+                                                       case 4:
+                                                       case 5:
                                                        case 6:
+                                                       case 8:
+                                                       case 9:
+                                                       case 10:
+                                                       case 32803:
+                                                       case 34892:
                                                                $val = $this->exifMsg( $tag, $val );
                                                                break;
                                                        default:
@@ -1571,7 +1581,7 @@ class FormatMetadata extends ContextSource {
         * @since 1.23
         */
        public function fetchExtendedMetadata( File $file ) {
-               global $wgMemc;
+               $cache = ObjectCache::getMainWANInstance();
 
                // If revision deleted, exit immediately
                if ( $file->isDeleted( File::DELETED_FILE ) ) {
@@ -1585,7 +1595,7 @@ class FormatMetadata extends ContextSource {
                        $file->getSha1()
                );
 
-               $cachedValue = $wgMemc->get( $cacheKey );
+               $cachedValue = $cache->get( $cacheKey );
                if (
                        $cachedValue
                        && Hooks::run( 'ValidateExtendedMetadataCache', array( $cachedValue['timestamp'], $file ) )
@@ -1605,7 +1615,7 @@ class FormatMetadata extends ContextSource {
                        // computation on a cache hit.
                        $this->sanitizeArrayForAPI( $extendedMetadata );
                        $valueToCache = array( 'data' => $extendedMetadata, 'timestamp' => wfTimestampNow() );
-                       $wgMemc->set( $cacheKey, $valueToCache, $maxCacheTime );
+                       $cache->set( $cacheKey, $valueToCache, $maxCacheTime );
                }
 
                return $extendedMetadata;