fix Profile_block::get() again
darcs-hash:20081209041648-5ed1f-fb6ed96047ebfbbe769a11cc3171ce8a5a1440a7.gz
This commit is contained in:
parent
facba2566b
commit
8445796908
@ -40,4 +40,10 @@ class Profile_block extends Memcached_DataObject
|
|||||||
|
|
||||||
/* the code above is auto generated do not remove the tag below */
|
/* the code above is auto generated do not remove the tag below */
|
||||||
###END_AUTOCODE
|
###END_AUTOCODE
|
||||||
|
|
||||||
|
function get($blocker, $blocked) {
|
||||||
|
return Memcached_DataObject::pkeyGet('Profile_block',
|
||||||
|
array('blocker' => $blocker,
|
||||||
|
'blocked' => $blocked));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,7 @@ class User extends Memcached_DataObject
|
|||||||
|
|
||||||
function hasBlocked($other) {
|
function hasBlocked($other) {
|
||||||
|
|
||||||
$block = Profile_block::pkeyGet(array('blocker' => $this->id,
|
$block = Profile_block::get($this->id, $other->id);
|
||||||
'blocked' => $other->id));
|
|
||||||
|
|
||||||
if (is_null($block)) {
|
if (is_null($block)) {
|
||||||
$result = false;
|
$result = false;
|
||||||
@ -467,8 +466,7 @@ class User extends Memcached_DataObject
|
|||||||
|
|
||||||
# Get the block record
|
# Get the block record
|
||||||
|
|
||||||
$block = Profile_block::pkeyGet(array('blocker' => $this->id,
|
$block = Profile_block::get($this->id, $other->id);
|
||||||
'blocked' => $other->id));
|
|
||||||
|
|
||||||
if (!$block) {
|
if (!$block) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user