diff options
author | Tony Baldwin <tonybaldwin@gmx.com> | 2014-03-09 19:22:54 -0400 |
---|---|---|
committer | Tony Baldwin <tonybaldwin@gmx.com> | 2014-03-09 19:22:54 -0400 |
commit | 5cca00ddc79dad667464674e08a2a860e262eabd (patch) | |
tree | 53df980e32a6706e977a5a2276e0f9aa9ec09300 /include/Contact.php | |
parent | 67166180bb560276273a20bcd9ca2a7aae036aba (diff) | |
parent | a79072ce478a999b06df38ae324fbcef6d3a76e7 (diff) | |
download | volse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.tar.gz volse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.tar.bz2 volse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
view/theme/redbasic/tpl/theme_settings.tpl
reset to upstream
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/Contact.php b/include/Contact.php index 09f7925cb..9883c598d 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -52,24 +52,27 @@ function abook_self($channel_id) { } function channelx_by_nick($nick) { - return q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_address = '%s' and not ( channel_pageflags & %d ) LIMIT 1", + $r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_address = '%s' and not ( channel_pageflags & %d ) LIMIT 1", dbesc($nick), intval(PAGE_REMOVED) ); + return(($r) ? $r[0] : false); } function channelx_by_hash($hash) { - return q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_hash = '%s' and not ( channel_pageflags & %d ) LIMIT 1", + $r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_hash = '%s' and not ( channel_pageflags & %d ) LIMIT 1", dbesc($hash), intval(PAGE_REMOVED) ); + return(($r) ? $r[0] : false); } function channelx_by_n($id) { - return q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_id = %d and not ( channel_pageflags & %d ) LIMIT 1", + $r = q("SELECT * FROM channel left join xchan on channel_hash = xchan_hash WHERE channel_id = %d and not ( channel_pageflags & %d ) LIMIT 1", dbesc($id), intval(PAGE_REMOVED) ); + return(($r) ? $r[0] : false); } |