]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix Profile_block::get() again
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 9 Dec 2008 04:16:48 +0000 (23:16 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 9 Dec 2008 04:16:48 +0000 (23:16 -0500)
darcs-hash:20081209041648-5ed1f-fb6ed96047ebfbbe769a11cc3171ce8a5a1440a7.gz

classes/Profile_block.php
classes/User.php

index 04b5f2faeba85f56d9b5949050d9846be556ff94..6ea26a3bc46718a8357f33820eac6941d4dd7149 100644 (file)
@@ -40,4 +40,10 @@ class Profile_block extends Memcached_DataObject
 
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
+
+    function get($blocker, $blocked) {
+        return Memcached_DataObject::pkeyGet('Profile_block',
+                                             array('blocker' => $blocker,
+                                                   'blocked' => $blocked));
+     }
 }
index a64dc449d8fa5e5db22b342dd3a20efff997d1d1..ddb2e33103243510e79a6d551d317b10b5591346 100644 (file)
@@ -146,8 +146,7 @@ class User extends Memcached_DataObject
 
     function hasBlocked($other) {
 
-        $block = Profile_block::pkeyGet(array('blocker' => $this->id,
-                                              'blocked' => $other->id));
+        $block = Profile_block::get($this->id, $other->id);
 
         if (is_null($block)) {
             $result = false;
@@ -467,8 +466,7 @@ class User extends Memcached_DataObject
 
         # Get the block record
 
-        $block = Profile_block::pkeyGet(array('blocker' => $this->id,
-                                              'blocked' => $other->id));
+        $block = Profile_block::get($this->id, $other->id);
 
         if (!$block) {
             return false;