]> git.mxchange.org Git - friendica-addons.git/blobdiff - libertree/libertree.php
Rename selectOne to selectFirst
[friendica-addons.git] / libertree / libertree.php
index 95def07a0b01dfd5dd0119bc74cf0e5f671f7ebf..f5a157ec84b32f350f55b1451b57b8020b474c42 100644 (file)
@@ -155,18 +155,21 @@ function libertree_send(&$a,&$b) {
 
        logger('libertree_send: invoked');
 
-       if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
+       if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
                return;
+       }
 
-       if (! strstr($b['postopts'],'libertree'))
+       if (! strstr($b['postopts'],'libertree')) {
                return;
+       }
 
-       if ($b['parent'] != $b['id'])
+       if ($b['parent'] != $b['id']) {
                return;
+       }
 
        // 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::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
        if ($b['contact-id'] != $self['id']) {
                return;
        }