Browse Source

Replace dba::select(limit => 1) by dba::selectOne()

pull/486/head
Hypolite Petovan 5 years ago
parent
commit
ca6e477701
  1. 2
      buffer/buffer.php
  2. 2
      diaspora/diaspora.php
  3. 2
      ifttt/ifttt.php
  4. 2
      libertree/libertree.php
  5. 2
      pumpio/pumpio.php
  6. 2
      statusnet/statusnet.php
  7. 2
      tumblr/tumblr.php
  8. 2
      twitter/twitter.php
  9. 2
      windowsphonepush/windowsphonepush.php
  10. 2
      wppost/wppost.php

2
buffer/buffer.php

@ -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;
}

2
diaspora/diaspora.php

@ -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;
}

2
ifttt/ifttt.php

@ -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;

2
libertree/libertree.php

@ -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;
}

2
pumpio/pumpio.php

@ -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;
}

2
statusnet/statusnet.php

@ -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;
}

2
tumblr/tumblr.php

@ -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;
}

2
twitter/twitter.php

@ -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;
}

2
windowsphonepush/windowsphonepush.php

@ -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"');

2
wppost/wppost.php

@ -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…
Cancel
Save