mirror of
https://github.com/friendica/friendica
synced 2025-05-06 15:04:10 +02:00
Improve dba::selectFirst calls
- Fix remaining $r[0] references - Rename $r to meaningful names
This commit is contained in:
parent
465e1d6a5c
commit
5fc4927764
29 changed files with 228 additions and 250 deletions
|
@ -88,10 +88,9 @@ class FKOAuthDataStore extends OAuthDataStore
|
|||
*/
|
||||
public function lookup_nonce($consumer, $token, $nonce, $timestamp)
|
||||
{
|
||||
$r = dba::selectFirst('tokens', ['id', 'secret'], ['client_id' => $consumer->key, 'id' => $nonce, 'expires' => $timestamp]);
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
return new \OAuthToken($r['id'], $r['secret']);
|
||||
$token = dba::selectFirst('tokens', ['id', 'secret'], ['client_id' => $consumer->key, 'id' => $nonce, 'expires' => $timestamp]);
|
||||
if (DBM::is_result($token)) {
|
||||
return new \OAuthToken($token['id'], $token['secret']);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue