// 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;
}
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;
}
dbesc(NETWORK_STATUSNET)
);
}
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
$totalResults = intval($r[0]['total']);
else
$totalResults = 0;
}
if(is_array($r)) {
- if(count($r) > 0) {
+ if (dbm::is_result($r)) {
foreach($r as $rr) {
if (!isset($rr['generation'])) {
if ($global)