]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountupdatedeliverydevice.php
Merge branch 'genericons-fix' into 'nightly'
[quix0rs-gnu-social.git] / actions / apiaccountupdatedeliverydevice.php
index 425624707ae218995e18b81ad94139cfb872c7b5..549ab5243aa9e7e337b3971eb9b8f9d2b0e1314d 100644 (file)
@@ -54,7 +54,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    function prepare(array $args = array())
     {
         parent::prepare($args);
 
@@ -73,9 +73,9 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
      *
      * @return void
      */
-    function handle($args)
+    function handle()
     {
-        parent::handle($args);
+        parent::handle();
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
@@ -84,7 +84,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
                 404,
                 $this->format
             );
-            return;
         }
 
         // Note: Twitter no longer supports IM
@@ -93,7 +92,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
             // TRANS: Client error displayed when no valid device parameter is provided for a user's delivery device setting.
             $this->clientError(_( 'You must specify a parameter named ' .
                                   '\'device\' with a value of one of: sms, im, none.' ));
-            return;
         }
 
         if (empty($this->user)) {
@@ -124,7 +122,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
             common_log_db_error($this->user, 'UPDATE', __FILE__);
             // TRANS: Server error displayed when a user's delivery device cannot be updated.
             $this->serverError(_('Could not update user.'));
-            return;
         }
 
         $profile = $this->user->getProfile();