aboutsummaryrefslogtreecommitdiffstats
path: root/mod/viewconnections.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-14 21:08:00 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-14 21:08:00 -0700
commitbe0459a98b9c047e4cf89b835fd35a32da51ca31 (patch)
treebf4ddf3797fbd64b56853ac090361fb552ecfc6e /mod/viewconnections.php
parentf0b255b1a9053e3983047354f0147225f2b29cd9 (diff)
downloadvolse-hubzilla-be0459a98b9c047e4cf89b835fd35a32da51ca31.tar.gz
volse-hubzilla-be0459a98b9c047e4cf89b835fd35a32da51ca31.tar.bz2
volse-hubzilla-be0459a98b9c047e4cf89b835fd35a32da51ca31.zip
convert the abook fields
Diffstat (limited to 'mod/viewconnections.php')
-rw-r--r--mod/viewconnections.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/mod/viewconnections.php b/mod/viewconnections.php
index c1da07292..d9a9aecc1 100644
--- a/mod/viewconnections.php
+++ b/mod/viewconnections.php
@@ -34,25 +34,23 @@ function viewconnections_content(&$a) {
$is_owner = ((local_channel() && local_channel() == $a->profile['uid']) ? true : false);
- $abook_flags = ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF;
+ $abook_flags = " and abook_pending = 0 and abook_self = 0 ";
$sql_extra = '';
if(! $is_owner) {
- $abook_flags = $abook_flags | ABOOK_FLAG_HIDDEN;
+ $abook_flags = " and abook_hidden = 0 ";
$sql_extra = " and xchan_hidden = 0 ";
}
- $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d )>0 and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra ",
- intval($a->profile['uid']),
- intval($abook_flags)
+ $r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d $abook_flags and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra ",
+ intval($a->profile['uid'])
);
if($r) {
$a->set_pager_total($r[0]['total']);
}
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not ( abook_flags & %d )>0 and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra order by xchan_name LIMIT %d OFFSET %d ",
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d $abook_flags and xchan_orphan = 0 and xchan_deleted = 0 $sql_extra order by xchan_name LIMIT %d OFFSET %d ",
intval($a->profile['uid']),
- intval($abook_flags),
intval($a->pager['itemspage']),
intval($a->pager['start'])
);
@@ -70,7 +68,7 @@ function viewconnections_content(&$a) {
if($url) {
$contacts[] = array(
'id' => $rr['abook_id'],
- 'archived' => (($rr['abook_flags'] & ABOOK_FLAG_ARCHIVED) ? true : false),
+ 'archived' => (intval($rr['abook_archived']) ? true : false),
'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['xchan_name'], $rr['xchan_url']),
'thumb' => $rr['xchan_photo_m'],
'name' => substr($rr['xchan_name'],0,20),