correctly init the document type for block API actions
darcs-hash:20081208193939-5ed1f-3275ec50dd2dbb23689710f9e52a071bcba94cc9.gz
This commit is contained in:
parent
ef3d487ae0
commit
fa81041ec7
@ -37,7 +37,10 @@ class TwitapiblocksAction extends TwitterapiAction {
|
|||||||
$user = $apidata['user'];
|
$user = $apidata['user'];
|
||||||
|
|
||||||
if ($user->hasBlocked($blockee) || $user->block($blockee)) {
|
if ($user->hasBlocked($blockee) || $user->block($blockee)) {
|
||||||
$this->show_profile($blockee, $apidata['content-type']);
|
$type = $apidata['content-type'];
|
||||||
|
$this->init_document($type);
|
||||||
|
$this->show_profile($blockee, $type);
|
||||||
|
$this->end_document($type);
|
||||||
} else {
|
} else {
|
||||||
common_server_error(_('Block user failed.'));
|
common_server_error(_('Block user failed.'));
|
||||||
}
|
}
|
||||||
@ -55,7 +58,10 @@ class TwitapiblocksAction extends TwitterapiAction {
|
|||||||
$user = $apidata['user'];
|
$user = $apidata['user'];
|
||||||
|
|
||||||
if (!$user->hasBlocked($blockee) || $user->unblock($blockee)) {
|
if (!$user->hasBlocked($blockee) || $user->unblock($blockee)) {
|
||||||
$this->show_profile($blockee, $apidata['content-type']);
|
$type = $apidata['content-type'];
|
||||||
|
$this->init_document($type);
|
||||||
|
$this->show_profile($blockee, $type);
|
||||||
|
$this->end_document($type);
|
||||||
} else {
|
} else {
|
||||||
common_server_error(_('Unblock user failed.'));
|
common_server_error(_('Unblock user failed.'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user