DavidW
5th of October 2006 (Thu), 18:08
I'm 99% sure that these predate 2.0 anyway, but fixing them anyway seems to be a good move.
View XMP Camera Data on the Server Tools page does nothing
The command to print the array is commented out at the end of PHOTODATA_xmp.php, and it seems most sensible to reinstate it in this single context.
Add line 869 to EDITOR_server_tools.php so that 868 to 870 read:
include("PHOTODATA_xmp.php");
ee_printvars_plain ($ddd,"0");
}
EE fails to read XMP Rights, Description and Title from a file saved by Photoshop CS2
In SCRIPT_editor_functions.php lines 1741-1743 replace 'x-default' with ['\"]x\-default['\"]
(CS2 uses "x-default" rather than the 'x-default' the code previously assumed)
['\"] means either ' or ". Whilst a regex doesn't require you to escape ", PHP does - otherwise it thinks it's the end of the double-quoted string!
I've added an escape for the - as well. Whilst - only has a special meaning inside [] characters, I figure that it's best to be explicit as it can prevent weird bugs from cropping up later when the regex is further modified.
I had to fix the first bug to be able to get at the second.
Pekka - your comments (and if appropriate, merge into the source for later releases) would be appreciated. I'm pretty secure in the second fix, but the first one feels messy even if it's the only way with the code as it is.
David
View XMP Camera Data on the Server Tools page does nothing
The command to print the array is commented out at the end of PHOTODATA_xmp.php, and it seems most sensible to reinstate it in this single context.
Add line 869 to EDITOR_server_tools.php so that 868 to 870 read:
include("PHOTODATA_xmp.php");
ee_printvars_plain ($ddd,"0");
}
EE fails to read XMP Rights, Description and Title from a file saved by Photoshop CS2
In SCRIPT_editor_functions.php lines 1741-1743 replace 'x-default' with ['\"]x\-default['\"]
(CS2 uses "x-default" rather than the 'x-default' the code previously assumed)
['\"] means either ' or ". Whilst a regex doesn't require you to escape ", PHP does - otherwise it thinks it's the end of the double-quoted string!
I've added an escape for the - as well. Whilst - only has a special meaning inside [] characters, I figure that it's best to be explicit as it can prevent weird bugs from cropping up later when the regex is further modified.
I had to fix the first bug to be able to get at the second.
Pekka - your comments (and if appropriate, merge into the source for later releases) would be appreciated. I'm pretty secure in the second fix, but the first one feels messy even if it's the only way with the code as it is.
David