diff options
author | zotlabs <mike@macgirvin.com> | 2018-12-03 18:50:45 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-12-03 18:50:45 -0800 |
commit | 7d694dca074f905fb120da9b60d1a665b40e5293 (patch) | |
tree | 9b260602aee91f48bc54751f22aab1de3e37e71e /include | |
parent | 7a693500c4a112e9116e0df5dc2f0b531f6de2c7 (diff) | |
download | volse-hubzilla-7d694dca074f905fb120da9b60d1a665b40e5293.tar.gz volse-hubzilla-7d694dca074f905fb120da9b60d1a665b40e5293.tar.bz2 volse-hubzilla-7d694dca074f905fb120da9b60d1a665b40e5293.zip |
more work on z6 commenting
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php index 1e5570f6b..95a3f96cf 100644 --- a/include/channel.php +++ b/include/channel.php @@ -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. * |