diff options
author | friendica <info@friendica.com> | 2014-08-12 21:51:32 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-12 21:51:32 -0700 |
commit | 041aff36b7feb4983a2cc5faed79e54863e06913 (patch) | |
tree | 468c6b21d51124d79ec6e9b70fc4fc7585d68b4d /include/photo/photo_driver.php | |
parent | da982c6c9f64b160bcc8e56cfbb44e96b19d9beb (diff) | |
download | volse-hubzilla-041aff36b7feb4983a2cc5faed79e54863e06913.tar.gz volse-hubzilla-041aff36b7feb4983a2cc5faed79e54863e06913.tar.bz2 volse-hubzilla-041aff36b7feb4983a2cc5faed79e54863e06913.zip |
provide a way to preserve photo timestamps when importing (rather than uploading)
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r-- | include/photo/photo_driver.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index f5e915402..5fb08b814 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -287,6 +287,8 @@ abstract class photo_driver { $p['allow_gid'] = (($arr['allow_gid']) ? $arr['allow_gid'] : ''); $p['deny_cid'] = (($arr['deny_cid']) ? $arr['deny_cid'] : ''); $p['deny_gid'] = (($arr['deny_gid']) ? $arr['deny_gid'] : ''); + $p['created'] = (($arr['created']) ? $arr['created'] : datetime_convert()); + $p['edited'] = (($arr['edited']) ? $arr['edited'] : $p['created']); // temporary until we get rid of photo['profile'] and just use photo['photo_flags'] // but this will require updating all existing photos in the DB. @@ -328,8 +330,8 @@ abstract class photo_driver { intval($p['uid']), dbesc($p['xchan']), dbesc($p['resource_id']), - dbesc(datetime_convert()), - dbesc(datetime_convert()), + dbesc($p['created']), + dbesc($p['edited']), dbesc(basename($p['filename'])), dbesc($this->getType()), dbesc($p['album']), @@ -355,8 +357,8 @@ abstract class photo_driver { intval($p['uid']), dbesc($p['xchan']), dbesc($p['resource_id']), - dbesc(datetime_convert()), - dbesc(datetime_convert()), + dbesc($p['created']), + dbesc($p['edited']), dbesc(basename($p['filename'])), dbesc($this->getType()), dbesc($p['album']), |