Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -10,6 +10,7 @@
namespace Friendica\Network;
use Friendica\Core\Config;
use Friendica\Core\Logger;
use Friendica\Database\DBA;
use OAuthConsumer;
use OAuthDataStore;
@ -39,7 +40,7 @@ class FKOAuthDataStore extends OAuthDataStore
*/
public function lookup_consumer($consumer_key)
{
logger(__function__ . ":" . $consumer_key);
Logger::log(__function__ . ":" . $consumer_key);
$s = DBA::select('clients', ['client_id', 'pw', 'redirect_uri'], ['client_id' => $consumer_key]);
$r = DBA::toArray($s);
@ -59,7 +60,7 @@ class FKOAuthDataStore extends OAuthDataStore
*/
public function lookup_token($consumer, $token_type, $token)
{
logger(__function__ . ":" . $consumer . ", " . $token_type . ", " . $token);
Logger::log(__function__ . ":" . $consumer . ", " . $token_type . ", " . $token);
$s = DBA::select('tokens', ['id', 'secret', 'scope', 'expires', 'uid'], ['client_id' => $consumer->key, 'scope' => $token_type, 'id' => $token]);
$r = DBA::toArray($s);
@ -99,7 +100,7 @@ class FKOAuthDataStore extends OAuthDataStore
*/
public function new_request_token($consumer, $callback = null)
{
logger(__function__ . ":" . $consumer . ", " . $callback);
Logger::log(__function__ . ":" . $consumer . ", " . $callback);
$key = self::genToken();
$sec = self::genToken();
@ -134,7 +135,7 @@ class FKOAuthDataStore extends OAuthDataStore
*/
public function new_access_token($token, $consumer, $verifier = null)
{
logger(__function__ . ":" . $token . ", " . $consumer . ", " . $verifier);
Logger::log(__function__ . ":" . $token . ", " . $consumer . ", " . $verifier);
// return a new access token attached to this consumer
// for the user associated with this token if the request token
@ -145,7 +146,7 @@ class FKOAuthDataStore extends OAuthDataStore
// get user for this verifier
$uverifier = Config::get("oauth", $verifier);
logger(__function__ . ":" . $verifier . "," . $uverifier);
Logger::log(__function__ . ":" . $verifier . "," . $uverifier);
if (is_null($verifier) || ($uverifier !== false)) {
$key = self::genToken();