From 6e2ee8d9210e9f376f5ff749e890f777b4b99b39 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 11 Aug 2010 18:56:38 +0000 Subject: [PATCH] Follow up r24808. mime is not in getCacheFields(), so $this->mime was never populated at this point (regardless of $info['mime']) and splitMime() always returned unknown. --- includes/filerepo/LocalFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 86ee34db05..ac8b161fee 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -377,10 +377,12 @@ class LocalFile extends File { $this->$field = $info[$field]; } } + // Fix up mime fields if ( isset( $info['major_mime'] ) ) { $this->mime = "{$info['major_mime']}/{$info['minor_mime']}"; } elseif ( isset( $info['mime'] ) ) { + $this->mime = $info['mime']; list( $this->major_mime, $this->minor_mime ) = self::splitMime( $this->mime ); } } -- 2.20.1