diff options
author | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-12-05 12:32:33 +0100 |
---|---|---|
committer | Manuel Jiménez Friaza <mjfriaza@openmailbox.org> | 2018-12-05 12:32:33 +0100 |
commit | 4cd5529027efa19288ddce125f0d41ccb5519578 (patch) | |
tree | 69b5bb1b43d807908d38d7febec21732fd334a49 /include/channel.php | |
parent | 5ac08ec3aa8ede14141390670a8097a60769e11e (diff) | |
parent | d12744011affe7f6b79201442ad9fce6e083bdbb (diff) | |
download | volse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.tar.gz volse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.tar.bz2 volse-hubzilla-4cd5529027efa19288ddce125f0d41ccb5519578.zip |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'include/channel.php')
-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. * |