diff --git a/actions/apiqvittersandboxcreate.php b/actions/apiqvittersandboxcreate.php index 41f1603..f713e61 100644 --- a/actions/apiqvittersandboxcreate.php +++ b/actions/apiqvittersandboxcreate.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSandboxCreateAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSandboxCreateAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; @@ -89,7 +92,7 @@ class ApiQvitterSandboxCreateAction extends ApiAuthAction } // only sandbox of the user isn't sandboxed - if (!$this->isSandboxed()) { + if (!$this->other->isSandboxed()) { try { $this->other->sandbox(); } catch (Exception $e) { diff --git a/actions/apiqvittersandboxdestroy.php b/actions/apiqvittersandboxdestroy.php index 551d4b5..1b55e23 100644 --- a/actions/apiqvittersandboxdestroy.php +++ b/actions/apiqvittersandboxdestroy.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSandboxDestroyAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSandboxDestroyAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; @@ -85,9 +88,9 @@ class ApiQvitterSandboxDestroyAction extends ApiAuthAction } // only unsandbox if the user is sandboxed - if ($this->isSandboxed()) { + if ($this->other->isSandboxed()) { try { - $this->other->sandbox(); + $this->other->unsandbox(); } catch (Exception $e) { $this->clientError($e->getMessage(), $e->getCode()); } diff --git a/actions/apiqvittersilencecreate.php b/actions/apiqvittersilencecreate.php index bc4378b..b465077 100644 --- a/actions/apiqvittersilencecreate.php +++ b/actions/apiqvittersilencecreate.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSilenceCreateAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSilenceCreateAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; diff --git a/actions/apiqvittersilencedestroy.php b/actions/apiqvittersilencedestroy.php index 66dc09c..92e206a 100644 --- a/actions/apiqvittersilencedestroy.php +++ b/actions/apiqvittersilencedestroy.php @@ -44,6 +44,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } class ApiQvitterSilenceDestroyAction extends ApiAuthAction { + protected $needPost = true; /** * Take arguments for running @@ -56,6 +57,8 @@ class ApiQvitterSilenceDestroyAction extends ApiAuthAction { parent::prepare($args); + $this->format = 'json'; + $this->other = $this->getTargetProfile($this->arg('id')); return true; diff --git a/actions/qvitter.php b/actions/qvitter.php index fcc1c75..50f8081 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -429,7 +429,19 @@ class QvitterAction extends ApiAction ?> - "> + ">