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)
|
switch ($property)
|
||||||
{
|
{
|
||||||
case 'creationdate': return strtotime($this->property('exif:DateTimeOriginal') ? $this->property('exif:DateTimeOriginal') : $this->property('exif:DateTime')); break;
|
case 'creationdate':
|
||||||
case 'height': return $this->_o->getImageHeight(); break;
|
if ($this->property('exif:DateTimeOriginal') == '0000:00:00 00:00:00'
|
||||||
case 'orientation': return $this->_o->getImageOrientation(); break;
|
&& $this->property('exif:DateTimeOriginal') == '0000:00:00 00:00:00')
|
||||||
case 'signature': return $this->_o->getImageSignature(); break;
|
return NULL;
|
||||||
case 'width': return $this->_o->getImageWidth(); break;
|
|
||||||
|
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:
|
default:
|
||||||
return $this->_o->getImageProperty($property);
|
return $this->_o->getImageProperty($property);
|
||||||
}
|
}
|
||||||
@ -157,8 +168,7 @@ class Photo extends Abstracted\Catalog
|
|||||||
|
|
||||||
public function setDateCreated()
|
public function setDateCreated()
|
||||||
{
|
{
|
||||||
if ($this->property('creationdate'))
|
$this->date_created = $this->property('creationdate');
|
||||||
$this->date_created = $this->property('creationdate');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLocation()
|
public function setLocation()
|
||||||
|
Loading…
Reference in New Issue
Block a user