require token signatures in zot_refresh, also move channel specific stuff into include/channel.php from include/connections.php

This commit is contained in:
redmatrix
2016-05-24 23:05:00 -07:00
parent 80f2ba640e
commit c37eaff263
5 changed files with 50 additions and 23 deletions

View File

@@ -48,27 +48,6 @@ function abook_self($channel_id) {
return(($r) ? $r[0] : array());
}
function channelx_by_nick($nick) {
$r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_address = '%s' and channel_removed = 0 LIMIT 1",
dbesc($nick)
);
return(($r) ? $r[0] : false);
}
function channelx_by_hash($hash) {
$r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_hash = '%s' and channel_removed = 0 LIMIT 1",
dbesc($hash)
);
return(($r) ? $r[0] : false);
}
function channelx_by_n($id) {
$r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_id = %d and channel_removed = 0 LIMIT 1",
dbesc($id)
);
return(($r) ? $r[0] : false);
}
function vcard_from_xchan($xchan, $observer = null, $mode = '') {