summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-06-01 09:20:33 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-06-07 17:25:18 +0200
commitc338e2fdc6b4f0b385672ac9140284ccbd7244a4 (patch)
treec1253a167e1d0217881c2bb6ab8a7b62a936eb82
parent8996f568db6eb662e9bc54ffe2f6766d11429ee7 (diff)
issue123, instead of using the Exif-Metadata-Time or mtime of the photo itself, rely on the F-Spot date in the photos-table (column time)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r--phpfspot.class.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 797c604..2b5e180 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -719,7 +719,6 @@ class PHPFSPOT {
$meta_res = $info[0] ."x". $info[1];
}
- $meta_date = isset($meta['FileDateTime']) ? strftime("%a %x %X", $meta['FileDateTime']) : "n/a";
$meta_make = isset($meta['Make']) ? $meta['Make'] ." / ". $meta['Model'] : "n/a";
$meta_size = isset($meta['FileSize']) ? round($meta['FileSize']/1024, 1) ."kbyte" : "n/a";
@@ -747,7 +746,7 @@ class PHPFSPOT {
$this->tmpl->assign('width', $info_thumb[0]);
$this->tmpl->assign('height', $info_thumb[1]);
- $this->tmpl->assign('ExifMadeOn', $meta_date);
+ $this->tmpl->assign('ExifMadeOn', strftime("%a %x %X", $details['time']));
$this->tmpl->assign('ExifMadeWith', $meta_make);
$this->tmpl->assign('ExifOrigResolution', $meta_res);
$this->tmpl->assign('ExifFileSize', $meta_size);
@@ -2574,18 +2573,16 @@ class PHPFSPOT {
$meta = $this->get_meta_informations($orig_path);
}
- $meta_date = isset($meta['FileDateTime']) ? $meta['FileDateTime'] : filemtime($orig_path);
-
?>
<item>
<title><?php print htmlspecialchars($this->parse_uri($details['uri'], 'filename')); ?></title>
<link><?php print htmlspecialchars($orig_url); ?></link>
<guid><?php print htmlspecialchars($orig_url); ?></guid>
- <dc:date.Taken><?php print strftime("%Y-%m-%dT%H:%M:%S+00:00", $meta_date); ?></dc:date.Taken>
+ <dc:date.Taken><?php print strftime("%Y-%m-%dT%H:%M:%S+00:00", $details['time']); ?></dc:date.Taken>
<description>
<?php print $thumb_html; ?>
</description>
- <pubDate><?php print strftime("%a, %d %b %Y %T %z", $meta_date); ?></pubDate>
+ <pubDate><?php print strftime("%a, %d %b %Y %T %z", $details['time']); ?></pubDate>
</item>
<?php