$condition = ["`term` = ? AND `otype` = ? AND `type` = ? AND `uid` = ?",
$file, TERM_OBJ_POST, TERM_FILE, local_user()];
$params = ['order' => ['tid' => true], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
- $result = DBA::select('term', ['oid'], $condition);
+ $result = DBA::select('term', ['oid'], $condition, $params);
$posts = [];
while ($term = DBA::fetch($result)) {
}
} elseif (intval($a->argv[$x])) {
$gid = intval($a->argv[$x]);
- $default_permissions = ['allow_gid' => '<' . $gid . '>'];
+ $default_permissions['allow_gid'] = [$gid];
}
}
}
$nets = defaults($_GET, 'nets' , '');
if ($cid) {
- $default_permissions = ['allow_cid' => '<' . intval($cid) . '>'];
+ $default_permissions['allow_cid'] = [(int) $cid];
}
if ($nets) {
$r = DBA::select('contact', ['id'], ['uid' => local_user(), 'network' => $nets], ['self' => false]);
- $str = '';
+ $str = [];
while ($rr = DBA::fetch($r)) {
- $str .= '<' . $rr['id'] . '>';
+ $str[] = (int) $rr['id'];
}
if (strlen($str)) {
- $default_permissions = ['allow_cid' => $str];
+ $default_permissions['allow_cid'] = $str;
}
}