r94277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94276‎ | r94277 | r94278 >
Date:19:51, 11 August 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
Fix Bug #30322 “SVG metadata is read incorrectly” by applying supplied patch
Modified paths:
  • /trunk/phase3/includes/media/SVGMetadataExtractor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/SVGMetadataExtractor.php
@@ -55,7 +55,7 @@
5656 $size = filesize( $source );
5757 if ( $size === false ) {
5858 throw new MWException( "Error getting filesize of SVG." );
59 - }
 59+ }
6060
6161 if ( $size > $wgSVGMetadataCutoff ) {
6262 $this->debug( "SVG is $size bytes, which is bigger than $wgSVGMetadataCutoff. Truncating." );
@@ -157,7 +157,7 @@
158158 }
159159 $keepReading = $this->reader->read();
160160 while( $keepReading ) {
161 - if( $this->reader->localName == $name && $this->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
 161+ if( $this->reader->localName == $name && $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
162162 break;
163163 } elseif( $this->reader->nodeType == XmlReader::TEXT ){
164164 $this->metadata[$metafield] = trim( $this->reader->value );

Follow-up revisions

RevisionCommit summaryAuthorDate
r945571.17wmf1: MFT r87099, r90729, r93141, r93517, r93891, r94155, r94277, r94372catrope20:12, 15 August 2011
r95632MFT to REL1_18...hashar17:57, 28 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88871* (bug 27465) Fix metadata extraction for SVG files using unusual namespace n...brion23:59, 25 May 2011

Comments

#Comment by TheDJ (talk | contribs)   20:05, 11 August 2011

This fixes r88871

Status & tagging log