From c7c5cde2b67ab4d2e5b7ed3afa26011f0193c52c Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 14 Dec 2013 12:38:07 +0100 Subject: [PATCH] Fixed removing from favorites --- src/Models/Model_User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Model_User.php b/src/Models/Model_User.php index 874fb593..85c98b15 100644 --- a/src/Models/Model_User.php +++ b/src/Models/Model_User.php @@ -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; }