diff options
author | redmatrix <git@macgirvin.com> | 2016-05-24 23:05:00 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-24 23:05:00 -0700 |
commit | c37eaff26331c49a2c8754f6d49c6145863f47ca (patch) | |
tree | fbeaa955e7819a104fbd1a015a9414a6ebff4bc3 /include/channel.php | |
parent | 80f2ba640ec528bd43db243122a69e765703b7c0 (diff) | |
download | volse-hubzilla-c37eaff26331c49a2c8754f6d49c6145863f47ca.tar.gz volse-hubzilla-c37eaff26331c49a2c8754f6d49c6145863f47ca.tar.bz2 volse-hubzilla-c37eaff26331c49a2c8754f6d49c6145863f47ca.zip |
require token signatures in zot_refresh, also move channel specific stuff into include/channel.php from include/connections.php
Diffstat (limited to 'include/channel.php')
-rw-r--r-- | include/channel.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php index 8f93ca16f..35084741f 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1945,3 +1945,26 @@ function get_zcard_embed($channel,$observer_hash = '',$args = array()) { return $o; } + + +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); +} + |