https://bugzilla.wikimedia.org/show_bug.cgi?id=13172

Ilmari Karonen <nos...@vyznev.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6960|0                           |1
        is obsolete|                            |

--- Comment #13 from Ilmari Karonen <nos...@vyznev.net> 2010-01-21 18:02:37 UTC 
---
Created an attachment (id=7000)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=7000)
Modified patch to Exif.php to fix this for GPS coordinates only

Okay, I took Lupo's patch and modified it a bit to get rid of the toRational()
hack.  What I'm doing is just setting the datatype to Exif::ASCII and passing
the float as is: the validation only checks that values of type Exif::ASCII
don't contain any non-ASCII characters, which is true for numeric values.  Yes,
it could break if someone made the validation stricter, but I very much doubt
anyone ever will, since the whole thing is both broken and pointless.  Nobody
sane is going to touch it except either to work around its brokenness or to
scrap and rewrite it completely.

I also added a method to format the coordinates nicely as degrees, minutes and
seconds, rather than presenting them as just a bare float.  This part doesn't
affect the stored metadata in any way, just the presentation.

If nobody spots any obvious problems with this, I'm planning to commit it
shortly.

(Ps. In the future, I think the right way forward would be to design a saner
metadata storage format, rewrite the whole thing (both the back and the front
ends) and only retain enough of the current code in a deprecated compatibility
class to be able to keep displaying old metadata blobs.  Then we could write a
maintenance script to regenerate the metadata for old files and, later, when
most files on most wikis have been converted to use the new format, get rid of
the compatibility class.)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to