]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correctly init the document type for block API actions
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 8 Dec 2008 19:39:39 +0000 (14:39 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 8 Dec 2008 19:39:39 +0000 (14:39 -0500)
darcs-hash:20081208193939-5ed1f-3275ec50dd2dbb23689710f9e52a071bcba94cc9.gz

actions/twitapiblocks.php

index 6bfdec0d0008a578c94d391e0ceff1530325b220..4852ff9388c90f3bfb399cf7a5709e4a48b3f6d1 100644 (file)
@@ -37,7 +37,10 @@ class TwitapiblocksAction extends TwitterapiAction {
         $user = $apidata['user'];
 
         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 {
                        common_server_error(_('Block user failed.'));
         }
@@ -55,7 +58,10 @@ class TwitapiblocksAction extends TwitterapiAction {
         $user = $apidata['user'];
 
         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 {
                        common_server_error(_('Unblock user failed.'));
         }