Rename selectOne to selectFirst
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 10 Jan 2018 13:37:11 +0000 (08:37 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 10 Jan 2018 13:37:11 +0000 (08:37 -0500)
buffer/buffer.php
diaspora/diaspora.php
ifttt/ifttt.php
libertree/libertree.php
pumpio/pumpio.php
statusnet/statusnet.php
tumblr/tumblr.php
twitter/twitter.php
windowsphonepush/windowsphonepush.php
wppost/wppost.php

index a85e843..932789d 100644 (file)
@@ -253,7 +253,7 @@ function buffer_send(App $a, &$b)
 
        // Dont't post if the post doesn't belong to us.
        // This is a check for forum postings
-       $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+       $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }
index 6f54f44..db4cc46 100644 (file)
@@ -289,7 +289,7 @@ function diaspora_send(&$a,&$b) {
 
        // Dont't post if the post doesn't belong to us.
        // This is a check for forum postings
-       $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+       $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }
index ad7a367..199aace 100644 (file)
@@ -97,7 +97,7 @@ function ifttt_post(App $a)
 
        $nickname = $a->argv[1];
 
-       $user = dba::selectOne('user', ['uid'], ['nickname' => $nickname]);
+       $user = dba::selectFirst('user', ['uid'], ['nickname' => $nickname]);
        if (!DBM::is_result($user)) {
                logger('User ' . $nickname . ' not found.', LOGGER_DEBUG);
                return;
index c421d07..f5a157e 100644 (file)
@@ -169,7 +169,7 @@ function libertree_send(&$a,&$b) {
 
        // Dont't post if the post doesn't belong to us.
        // This is a check for forum postings
-       $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+       $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }
index af93218..3f6f8a8 100644 (file)
@@ -419,7 +419,7 @@ function pumpio_send(&$a,&$b) {
 
                // Dont't post if the post doesn't belong to us.
                // This is a check for forum postings
-               $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+               $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
                if ($b['contact-id'] != $self['id']) {
                        return;
                }
index 084b233..34bbf20 100644 (file)
@@ -582,7 +582,7 @@ function statusnet_post_hook(App $a, &$b)
 
                // Dont't post if the post doesn't belong to us.
                // This is a check for forum postings
-               $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+               $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
                if ($b['contact-id'] != $self['id']) {
                        return;
                }
index c255f5a..78c12a5 100644 (file)
@@ -330,7 +330,7 @@ function tumblr_send(&$a,&$b) {
 
        // Dont't post if the post doesn't belong to us.
        // This is a check for forum postings
-       $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+       $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }
index e501a34..ccfdeb1 100644 (file)
@@ -468,7 +468,7 @@ function twitter_post_hook(App $a, &$b)
 
                // Dont't post if the post doesn't belong to us.
                // This is a check for forum postings
-               $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+               $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
                if ($b['contact-id'] != $self['id']) {
                        return;
                }
index c9d58bd..ca61520 100644 (file)
@@ -458,7 +458,7 @@ function windowsphonepush_login(App $a)
        $user_id = User::authenticate($_SERVER['PHP_AUTH_USER'], trim($_SERVER['PHP_AUTH_PW']));
 
        if ($user_id) {
-               $record = dba::selectOne('user', [], ['uid' => $user_id]);
+               $record = dba::selectFirst('user', [], ['uid' => $user_id]);
        } else {
                logger('API_login failure: ' . print_r($_SERVER, true), LOGGER_DEBUG);
                header('WWW-Authenticate: Basic realm="Friendica"');
index 96e9597..323fcef 100644 (file)
@@ -205,7 +205,7 @@ function wppost_send(&$a,&$b) {
 
        // Dont't post if the post doesn't belong to us.
        // This is a check for forum postings
-       $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+       $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }