]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountupdateprofilecolors.php
Fix i18n issue: please number variables when using more than one to allow word order...
[quix0rs-gnu-social.git] / actions / apiaccountupdateprofilecolors.php
index d7d2161fea19d403f85ec8d5eef0bd19d0b63044..3cac829749679353ec4fc608a2ee9894367698da 100644 (file)
@@ -113,6 +113,15 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
             return;
         }
 
+        if (!in_array($this->format, array('xml', 'json'))) {
+            $this->clientError(
+                _('API method not found.'),
+                404,
+                $this->format
+            );
+            return;
+        }
+
         $design = $this->user->getDesign();
 
         if (!empty($design)) {
@@ -130,7 +139,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if ($result === false) {
                 common_log_db_error($design, 'UPDATE', __FILE__);
-                $this->clientError(_('Couldn\'t update your design.'));
+                $this->clientError(_('Could not update your design.'));
                 return;
             }
 
@@ -152,7 +161,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if (empty($id)) {
                 common_log_db_error($id, 'INSERT', __FILE__);
-                $this->clientError(_('Unable to save your design settings!'));
+                $this->clientError(_('Unable to save your design settings.'));
                 return;
             }
 
@@ -162,7 +171,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
 
             if (empty($result)) {
                 common_log_db_error($original, 'UPDATE', __FILE__);
-                $this->clientError(_('Unable to save your design settings!'));
+                $this->clientError(_('Unable to save your design settings.'));
                 $this->user->query('ROLLBACK');
                 return;
             }
@@ -177,7 +186,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
             return;
         }
 
-        $twitter_user = $this->twitterUserArray($this->user->getProfile(), true);
+        $twitter_user = $this->twitterUserArray($profile, true);
 
         if ($this->format == 'xml') {
             $this->initDocument('xml');