X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpoco.php;h=4ce075301cb9b1ed5ad27496fb3025bddf5ad06d;hb=e1d22ef5d4333cff860079c92fea92d82fe58fda;hp=787776b90657babc03474f4af57b085e1c6a7d14;hpb=4dce3d822470537e40a0f77330d62ac05bf73806;p=friendica.git diff --git a/mod/poco.php b/mod/poco.php index 787776b906..4ce075301c 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -2,7 +2,7 @@ // See here for a documentation for portable contacts: // https://web.archive.org/web/20160405005550/http://portablecontacts.net/draft-spec.html -function poco_init(App &$a) { +function poco_init(App $a) { require_once("include/bbcode.php"); $system_mode = false; @@ -16,8 +16,9 @@ function poco_init(App &$a) { } if(! x($user)) { $c = q("SELECT * FROM `pconfig` WHERE `cat` = 'system' AND `k` = 'suggestme' AND `v` = 1"); - if(! count($c)) + if (! dbm::is_result($c)) { http_status_exit(401); + } $system_mode = true; } @@ -174,7 +175,7 @@ function poco_init(App &$a) { if(is_array($r)) { if (dbm::is_result($r)) { - foreach($r as $rr) { + foreach ($r as $rr) { if (!isset($rr['generation'])) { if ($global) $rr['generation'] = 3;