summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Profile_block.php6
-rw-r--r--classes/User.php6
2 files changed, 8 insertions, 4 deletions
diff --git a/classes/Profile_block.php b/classes/Profile_block.php
index 04b5f2fae..6ea26a3bc 100644
--- a/classes/Profile_block.php
+++ b/classes/Profile_block.php
@@ -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));
+ }
}
diff --git a/classes/User.php b/classes/User.php
index a64dc449d..ddb2e3310 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -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;