Replace dba::select(limit => 1) by dba::selectOne()
This commit is contained in:
parent
4b05d70b94
commit
ca6e477701
10 changed files with 10 additions and 10 deletions
|
@ -250,7 +250,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -286,7 +286,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ function ifttt_post(App $a)
|
|||
|
||||
$nickname = $a->argv[1];
|
||||
|
||||
$user = dba::select('user', ['uid'], ['nickname' => $nickname], ['limit' => 1]);
|
||||
$user = dba::selectOne('user', ['uid'], ['nickname' => $nickname]);
|
||||
if (!DBM::is_result($user)) {
|
||||
logger('User ' . $nickname . ' not found.', LOGGER_DEBUG);
|
||||
return;
|
||||
|
|
|
@ -166,7 +166,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -418,7 +418,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -580,7 +580,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -327,7 +327,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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::select('user', [], ['uid' => $user_id], ['limit' => 1]);
|
||||
$record = dba::selectOne('user', [], ['uid' => $user_id]);
|
||||
} else {
|
||||
logger('API_login failure: ' . print_r($_SERVER, true), LOGGER_DEBUG);
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
|
|
|
@ -202,7 +202,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::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
|
||||
$self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
|
||||
if ($b['contact-id'] != $self['id']) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue