From: Jeff Date: Wed, 23 Apr 2014 06:56:23 +0000 (-0700) Subject: PostgreSQL: decode image.img_metadata X-Git-Tag: 1.31.0-rc.0~15876 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=8c62609dc877b6ed687e9a3835cfc24fb87e5be2;p=lhc%2Fweb%2Fwiklou.git PostgreSQL: decode image.img_metadata The img_metadata field was not being decoded from bytea into text. This change to core fixes the reported problem with PdfHandler against 1.22.6, origin/REL1_23 and git head. Bug: 59147 Change-Id: I285a317a57a29713af1f7f630b340278bd5400da --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 4b8e590d0f..b3d5d5dc51 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -496,6 +496,8 @@ class LocalFile extends File { $decoded['timestamp'] = wfTimestamp( TS_MW, $decoded['timestamp'] ); + $decoded['metadata'] = $this->repo->getSlaveDB()->decodeBlob( $decoded['metadata'] ); + if ( empty( $decoded['major_mime'] ) ) { $decoded['mime'] = 'unknown/unknown'; } else {