Skip to content

Commit

Permalink
#7: Actually show S3 avatars on artist pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
EventideGlow committed Jul 17, 2016
1 parent 1574fde commit 12f7ebe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions app/models/Entity/Artist.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,10 @@ public static function getArtistImage($image_url)
{
if ($image_url)
{
$file_path = DF_UPLOAD_FOLDER.DIRECTORY_SEPARATOR.$image_url;
if (file_exists($file_path))
return $image_url;
return $image_url;
} else {
return 'pvl_square.png';
}

return 'pvl_square.png';
}

public static function findAbandonedByName($name)
Expand All @@ -183,4 +181,4 @@ public static function getSocialTypes()
{
return Podcast::getSocialTypes();
}
}
}
2 changes: 1 addition & 1 deletion app/modules/admin/controllers/ArtistsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ public function deleteAction()
$this->alert('Record deleted.', 'green');
$this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'csrf' => NULL));
}
}
}
2 changes: 1 addition & 1 deletion app/modules/admin/views/scripts/artists/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ $title = 'Manage Artists';
</tbody>
</table>

<?=$this->viewHelper->paginate($pager) ?>
<?=$this->viewHelper->paginate($pager) ?>

0 comments on commit 12f7ebe

Please sign in to comment.