]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountupdateprofileimage.php
Workaround for http_build_query() oddities in low-level router parent code when PHP...
[quix0rs-gnu-social.git] / actions / apiaccountupdateprofileimage.php
index 2f8e9628c42b0896d85a83b4aa84d5d4863840c9..1f38bd22042c872794144881d55808f0cec53dbc 100644 (file)
@@ -81,6 +81,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
 
         if ($_SERVER['REQUEST_METHOD'] != 'POST') {
             $this->clientError(
+                // TRANS: Client error. POST is a HTTP command. It should not be translated.
                 _('This method requires a POST.'),
                 400, $this->format
             );
@@ -94,9 +95,11 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
             && empty($_POST)
             && ($_SERVER['CONTENT_LENGTH'] > 0)
         ) {
-             $msg = _('The server was unable to handle that much POST ' .
-                    'data (%s bytes) due to its current configuration.');
-
+            // TRANS: Client error displayed when the number of bytes in a POST request exceeds a limit.
+            // TRANS: %s is the number of bytes of the CONTENT_LENGTH.
+            $msg = _m('The server was unable to handle that much POST data (%s byte) due to its current configuration.',
+                      'The server was unable to handle that much POST data (%s bytes) due to its current configuration.',
+                      intval($_SERVER['CONTENT_LENGTH']));
             $this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
             return;
         }
@@ -135,7 +138,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
 
         common_broadcast_profile($profile);
 
-        $twitter_user = $this->twitterUserArray($this->user->getProfile(), true);
+        $twitter_user = $this->twitterUserArray($profile, true);
 
         if ($this->format == 'xml') {
             $this->initDocument('xml');