Fix for photos with no exif:DateTime
This commit is contained in:
parent
008e5eacc0
commit
6a17fd3716
@ -140,11 +140,22 @@ class Photo extends Abstracted\Catalog
|
||||
|
||||
switch ($property)
|
||||
{
|
||||
case 'creationdate': return strtotime($this->property('exif:DateTimeOriginal') ? $this->property('exif:DateTimeOriginal') : $this->property('exif:DateTime')); break;
|
||||
case 'height': return $this->_o->getImageHeight(); break;
|
||||
case 'orientation': return $this->_o->getImageOrientation(); break;
|
||||
case 'signature': return $this->_o->getImageSignature(); break;
|
||||
case 'width': return $this->_o->getImageWidth(); break;
|
||||
case 'creationdate':
|
||||
if ($this->property('exif:DateTimeOriginal') == '0000:00:00 00:00:00'
|
||||
&& $this->property('exif:DateTimeOriginal') == '0000:00:00 00:00:00')
|
||||
return NULL;
|
||||
|
||||
return strtotime(
|
||||
$this->property('exif:DateTimeOriginal') && $this->property('exif:DateTimeOriginal') != '0000:00:00 00:00:00'
|
||||
? $this->property('exif:DateTimeOriginal')
|
||||
: $this->property('exif:DateTime'));
|
||||
break;
|
||||
|
||||
case 'height': return $this->_o->getImageHeight();
|
||||
case 'orientation': return $this->_o->getImageOrientation();
|
||||
case 'signature': return $this->_o->getImageSignature();
|
||||
case 'width': return $this->_o->getImageWidth();
|
||||
|
||||
default:
|
||||
return $this->_o->getImageProperty($property);
|
||||
}
|
||||
@ -157,8 +168,7 @@ class Photo extends Abstracted\Catalog
|
||||
|
||||
public function setDateCreated()
|
||||
{
|
||||
if ($this->property('creationdate'))
|
||||
$this->date_created = $this->property('creationdate');
|
||||
$this->date_created = $this->property('creationdate');
|
||||
}
|
||||
|
||||
public function setLocation()
|
||||
|
Loading…
Reference in New Issue
Block a user