Fixed removing from favorites

This commit is contained in:
Marcin Kurczewski 2013-12-14 12:38:07 +01:00
parent 5d45d6da2c
commit c7c5cde2b6

View file

@ -249,8 +249,8 @@ class Model_User extends AbstractModel
public function hasFavorited($post)
{
foreach ($this->bean->ownFavoritee as $fav)
if ($fav->post->id == $post->id)
foreach ($this->bean->via('favoritee')->sharedPost as $favPost)
if ($favPost->id == $post->id)
return true;
return false;
}