From 74947d1c1cb7c669ef2a167990066b34d89b5b07 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 8 Nov 2016 18:15:57 -0800 Subject: deprecate/remove get_channel_by_nick() which is just a less generalised variant of channelx_by_nick() --- include/channel.php | 9 +-------- include/widgets.php | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/channel.php b/include/channel.php index 1f12e9927..c02d5266e 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1532,19 +1532,12 @@ function remote_online_status($webbie) { } -function get_channel_by_nick($nick) { - $r = q("select * from channel where channel_address = '%s' limit 1", - dbesc($nick) - ); - return(($r) ? $r[0] : false); - -} - /** * @brief * * @return string */ + function identity_selector() { if (local_channel()) { $r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel.channel_account_id = %d and channel_removed = 0 order by channel_name ", diff --git a/include/widgets.php b/include/widgets.php index 6cff4e4b7..ff97b8bd5 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -905,7 +905,7 @@ function widget_wiki_list($arr) { // This should not occur because /wiki should redirect to /wiki/channel ... $channel = \App::get_channel(); } else { - $channel = get_channel_by_nick(argv(1)); // Channel being viewed by observer + $channel = channelx_by_nick(argv(1)); // Channel being viewed by observer } if (!$channel) { return ''; -- cgit v1.2.3