]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't try to free faves in User
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 2 Oct 2008 16:27:39 +0000 (12:27 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 2 Oct 2008 16:27:39 +0000 (12:27 -0400)
darcs-hash:20081002162739-5ed1f-7d83c69d986cc704ef1bb9703a105ac04ad38d06.gz

classes/User.php

index 8c9ffbb6d6be837d2c4f20e9221fd18ca1ed067f..2d689fd2b9743316280c2b7165a8c6f9aafc4fe1 100644 (file)
@@ -267,14 +267,7 @@ class User extends Memcached_DataObject
        function hasFave($notice) {
                $fave = Fave::pkeyGet(array('user_id' => $this->id,
                                                                        'notice_id' => $notice->id));
-               if (!is_null($fave)) {
-                       $result = true;
-               } else {
-                       $result = false;
-               }
-               $fave->free();
-               unset($fave);
-               return $result;
+               return ((is_null($fave)) ? false : true);
        }
        
        function mutuallySubscribed($other) {