more work on z6 commenting

This commit is contained in:
zotlabs
2018-12-03 18:50:45 -08:00
parent 7a693500c4
commit 7d694dca07
3 changed files with 271 additions and 67 deletions

View File

@@ -2333,6 +2333,21 @@ function channelx_by_hash($hash) {
return(($r) ? $r[0] : false);
}
/**
* @brief Get a channel array by a channel_hash.
*
* @param string $hash
* @return array|boolean false if channel ID not found, otherwise the channel array
*/
function channelx_by_portid($hash) {
$r = q("SELECT * FROM channel left join xchan on channel_portable_id = xchan_hash WHERE channel_portable_id = '%s' and channel_removed = 0 LIMIT 1",
dbesc($hash)
);
return(($r) ? $r[0] : false);
}
/**
* @brief Get a channel array by a channel ID.
*