untested patch for issue #58 - will require theming if it works
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
<?php /** @file */
|
||||
|
||||
|
||||
|
||||
function rconnect_url($channel_id,$xchan) {
|
||||
if(! $xchan)
|
||||
return '';
|
||||
$r = q("select abook_id from abook where abook_channel_id = %d and abook_xchan = '%s' limit 1",
|
||||
intval($channel_id),
|
||||
dbesc($xchan)
|
||||
);
|
||||
if($r)
|
||||
return '';
|
||||
$r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and (hubloc_flags & HUBLOC_FLAGS_PRIMARY) limit 1",
|
||||
dbesc($xchan)
|
||||
);
|
||||
if($r)
|
||||
return $r[0]['hubloc_url'];
|
||||
return '';
|
||||
}
|
||||
|
||||
function abook_connections($channel_id, $sql_conditions = '') {
|
||||
$r = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d
|
||||
and not ( abook_flags & %d ) $sql_conditions",
|
||||
|
||||
Reference in New Issue
Block a user