From 1fdc495f910994fc01d9e9998b0be32db5eac45a Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sat, 12 Apr 2014 17:30:50 +0200 Subject: [PATCH] Set original date for uploaded file --- php/modules/Photo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/modules/Photo.php b/php/modules/Photo.php index f9cb542..c1d1f05 100755 --- a/php/modules/Photo.php +++ b/php/modules/Photo.php @@ -90,6 +90,9 @@ class Photo extends Module { # Read infos $info = $this->getInfo($path); + # Set original date + if ($info['takestamp']!=='') @touch($path, $info['takestamp']); + # Use title of file if IPTC title missing if ($info['title']==='') $info['title'] = mysqli_real_escape_string($this->database, substr(basename($file['name'], ".$extension"), 0, 30));