aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-10-07 18:39:03 -0300
committerSilvio <silvio@devlet.com.br>2010-10-07 18:39:03 -0300
commita70367ee97eda8749960ab2606bd6c811aec99fa (patch)
tree74a434900e6327706cb805f07df03f4e968e0fbc
parentc1159f9872aca3275af2a79b86692dc902726fcc (diff)
downloadexif-a70367ee97eda8749960ab2606bd6c811aec99fa.tar.gz
exif-a70367ee97eda8749960ab2606bd6c811aec99fa.tar.bz2
Updating XMP handling due to API changes
-rw-r--r--exif.class.php5
-rwxr-xr-xexif.module3
2 files changed, 5 insertions, 3 deletions
diff --git a/exif.class.php b/exif.class.php
index b5ad35b..29a0b02 100644
--- a/exif.class.php
+++ b/exif.class.php
@@ -190,6 +190,7 @@ Class Exif {
*/
function openXMP($file) {
// Setup.
+ SXMPFiles::Initialize();
$xmpfiles = new SXMPFiles();
$xmpmeta = new SXMPMeta();
@@ -241,10 +242,10 @@ Class Exif {
// Try to read XMP data if the namespace is available.
if(@$xmpmeta->GetNamespacePrefix($config['ns'])) {
if ($config['type'] == 'property') {
- $value = @$xmpmeta->GetProperty($config['name'], $config['ns']);
+ $value = @$xmpmeta->GetProperty($config['ns'], $config['name']);
}
elseif ($config['type'] == 'array') {
- $value = @$xmpmeta->GetArrayItem($config['name'], $key, $config['ns']);
+ $value = @$xmpmeta->GetArrayItem($key, $config['ns'], $config['name']);
}
elseif ($config['type'] == 'struct') {
$value = @$xmpmeta->GetStructField($config['ns'], $config['struct'], $config['ns'], $config['name']);
diff --git a/exif.module b/exif.module
index ecbbd6e..7d955f1 100755
--- a/exif.module
+++ b/exif.module
@@ -60,6 +60,7 @@ function exif_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
if (! _exif_check_for_exif_data($node->type)) {
return;
}
+
$info = content_types($node->type);
$fields = $info['fields'];
$exif = _exif_get_class();
@@ -344,4 +345,4 @@ function fast_gallery_token_values($type, $object = NULL, $options = array()) {
//dsm($tokens);
return $tokens;
}
-} \ No newline at end of file
+}