issue123, instead of using the Exif-Metadata-Time or mtime of the photo itself, rely...
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 1 Jun 2008 07:20:33 +0000 (09:20 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 1 Jun 2008 07:20:33 +0000 (09:20 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php

index 797c6047abbe299d2d15ad432550b5967c6eb775..2b5e180d4a985fa077c61e1bbefe759cee01523a 100644 (file)
@@ -719,7 +719,6 @@ class PHPFSPOT {
          $meta_res = $info[0] ."x". $info[1]; 
       }
 
          $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";
 
       $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('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);
       $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 = $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>
 ?>
   <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>
    <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
 
   </item>
 <?php