X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frequesttoken.php;h=a17efcdd50abaf55dbc5bc21b2f7daf52cd33a0d;hb=dcca9fbec0cea9c5e15c4d58a8e9870514dfdbdd;hp=fb577fdd57bfea0902b4bab9b822ffa591a0e35f;hpb=41b247ac1ac1f7752f5449d772307d78a6102964;p=quix0rs-gnu-social.git diff --git a/actions/requesttoken.php b/actions/requesttoken.php index fb577fdd57..a17efcdd50 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -6,14 +6,14 @@ * PHP version 5 * * @category Action - * @package Laconica - * @author Evan Prodromou - * @author Robin Millette + * @package StatusNet + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ * - * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * StatusNet - the distributed open-source microblogging tool + * Copyright (C) 2008, 2009, StatusNet, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/omb.php'; * Request token action class. * * @category Action - * @package Laconica - * @author Evan Prodromou - * @author Robin Millette + * @package StatusNet + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ */ class RequesttokenAction extends Action { @@ -69,10 +69,10 @@ class RequesttokenAction extends Action parent::handle($args); try { common_remove_magic_from_request(); - $req = OAuthRequest::from_request(); + $req = OAuthRequest::from_request('POST', common_local_url('requesttoken')); $server = omb_oauth_server(); $token = $server->fetch_request_token($req); - print $token; + print $token.'&omb_version='.OMB_VERSION_01; } catch (OAuthException $e) { $this->serverError($e->getMessage()); }