Add uploader to photo view.

This commit is contained in:
Aaron van Geffen 2016-09-04 21:34:08 +02:00
parent 5b7099e0e5
commit 09a662b4eb
2 changed files with 10 additions and 1 deletions

View File

@ -234,6 +234,11 @@ class Asset
return $this->id_asset;
}
public function getAuthor()
{
return Member::fromId($this->id_user_uploaded);
}
public function getDateCaptured()
{
return $this->date_captured;

View File

@ -96,9 +96,13 @@ class PhotoPage extends SubTemplate
<dt>Date Taken</dt>
<dd>', date("j M Y, H:i:s", $this->exif->created_timestamp), '</dd>';
echo '
<dt>Uploaded by</dt>
<dd>', $this->photo->getAuthor()->getfullName(), '</dd>';
if (!empty($this->exif->camera))
echo '
<dt>Model</dt>
<dt>Camera Model</dt>
<dd>', $this->exif->camera, '</dd>';
if (!empty($this->exif->shutter_speed))