]> git.mxchange.org Git - friendica.git/blobdiff - mod/poco.php
Merge branch 'develop' into rewrites/dbm_is_result
[friendica.git] / mod / poco.php
index e454d1e668fce7deeea29a82c5017c1eb4719d88..11f984757a925e2d157f77cbfba8831143790a11 100644 (file)
@@ -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(&$a) {
+function poco_init(App &$a) {
        require_once("include/bbcode.php");
 
        $system_mode = false;
@@ -16,8 +16,9 @@ function poco_init(&$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;
        }