]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'nightly' of gitorious.org:social/mainline into nightly
authorRoland Häder <haeder@hmmdeutschland.de>
Thu, 22 Jan 2015 12:36:26 +0000 (13:36 +0100)
committerRoland Häder <haeder@hmmdeutschland.de>
Thu, 22 Jan 2015 12:36:26 +0000 (13:36 +0100)
Conflicts:
actions/apiaccountverifycredentials.php
actions/apimediaupload.php
actions/public.php
actions/register.php
plugins/OStatus/scripts/update_ostatus_profiles.php
plugins/OpportunisticQM/lib/opportunisticqueuemanager.php

Signed-off-by: Roland Häder <haeder@hmmdeutschland.de>
1  2 
actions/apiaccountverifycredentials.php
actions/apimediaupload.php
actions/public.php
actions/register.php
lib/action.php
lib/default.php
lib/router.php
lib/util.php
plugins/OStatus/classes/Ostatus_profile.php
plugins/OStatus/scripts/testfeed.php
plugins/OStatus/scripts/update_ostatus_profiles.php

index dfa366cbb61f492f0eede95beb7411c9a5d28763,9b98fa6d810ba384fbea24599c7f47ae4285c3bc..4835a2ca63f0018171a98b2c3b89ce9a50c2e883
@@@ -48,17 -48,9 +48,17 @@@ if (!defined('STATUSNET')) 
   */
  class ApiAccountVerifyCredentialsAction extends ApiAuthAction
  {
 -    protected function handle()
 +    /**
 +     * Handle the request
 +     *
 +     * Check whether the credentials are valid and output the result
 +     *
 +     * @param array $args $_REQUEST data (unused)
 +     * @return void
 +     */
-     function handle(array $args=array())
++    protected function handle(array $args=array())
      {
 -        parent::handle();
 +        parent::handle($args);
  
          if (!in_array($this->format, array('xml', 'json'))) {
              // TRANS: Client error displayed when coming across a non-supported API method.
index 14c26d238f677f2cb0d92464e9d5613ae2db1655,2d81af157e06362db885ca5f62fb3643babcce7d..a3703fad060f5419afaf6342499210498564d890
@@@ -53,18 -53,10 +53,10 @@@ class ApiMediaUploadAction extends ApiA
       *
       * @return void
       */
-     function handle(array $args=array())
 -    protected function handle()
++    protected function handle(array $args=array())
      {
 -        parent::handle();
 +        parent::handle($args);
  
-         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
-             );
-         }
          // Workaround for PHP returning empty $_POST and $_FILES when POST
          // length > post_max_size in php.ini
  
index 8e5da476466a93f36203917cf319e9c726ad4e31,52bab072aec60ea5172f0e432e3a9829b3218383..193365309f9fb0e1f1035e8ffac63cee3fc0f602
@@@ -53,9 -53,10 +53,10 @@@ class PublicAction extends Actio
  
      var $page = null;
      var $notice;
-     var $userProfile = null;
+     protected $stream = null;
  
 -    function isReadOnly($args)
 +    function isReadOnly(array $args=array())
      {
          return true;
      }
       *
       * @return void
       */
-     function handle(array $args=array())
 -    protected function handle()
++    protected function handle(array $args=array())
      {
-         parent::handle($args);
+         parent::handle();
  
          $this->showPage();
      }
Simple merge
diff --cc lib/action.php
Simple merge
diff --cc lib/default.php
Simple merge
diff --cc lib/router.php
Simple merge
diff --cc lib/util.php
Simple merge
index d698ba81a36339c56c315ef9bbb1310d8f157f11,2fb869e2f3bafef92ed4d90666cdb732cbabfe5c..4081edadaa6a7b847580462f5b5c2aabbc64d89d
@@@ -1261,12 -1260,17 +1261,17 @@@ class Ostatus_profile extends Managed_D
  
          // @todo FIXME: This should be better encapsulated
          // ripped from oauthstore.php (for old OMB client)
 -        $temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar');
 +        $temp_filename = tempnam(common_get_temp_dir(), 'listener_avatar');
          try {
-             if (!copy($url, $temp_filename)) {
+             $client = new HTTPClient();
+             $response = $client->get($url);
+             if (!$response->isOk()) {
                  // TRANS: Server exception. %s is a URL.
 -                throw new ServerException(sprintf(_m('Unable to fetch avatar from %s.'), $url));
 +                throw new ServerException(sprintf(_m('Unable to fetch avatar from %s to %s.'), $url, $temp_filename));
              }
+             // FIXME: make sure it's an image here instead of _after_ writing to a file?
+             file_put_contents($temp_filename, $response->getBody());
  
              if ($this->isGroup()) {
                  $id = $this->group_id;
Simple merge