aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Wall_attach.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-08 18:15:57 -0800
committerzotlabs <mike@macgirvin.com>2016-11-08 18:15:57 -0800
commit74947d1c1cb7c669ef2a167990066b34d89b5b07 (patch)
treec0c22dd1d190c23e6a93043be07d0e2ff1381701 /Zotlabs/Module/Wall_attach.php
parentdb3d230ad9a63ac9363fc3f3a658f8b6c3c5eab4 (diff)
downloadvolse-hubzilla-74947d1c1cb7c669ef2a167990066b34d89b5b07.tar.gz
volse-hubzilla-74947d1c1cb7c669ef2a167990066b34d89b5b07.tar.bz2
volse-hubzilla-74947d1c1cb7c669ef2a167990066b34d89b5b07.zip
deprecate/remove get_channel_by_nick() which is just a less generalised variant of channelx_by_nick()
Diffstat (limited to 'Zotlabs/Module/Wall_attach.php')
-rw-r--r--Zotlabs/Module/Wall_attach.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index 9a1019ddb..9268fbb0a 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -14,13 +14,18 @@ class Wall_attach extends \Zotlabs\Web\Controller {
if(\App::$data['api_info'] && array_key_exists('media',$_FILES)) {
$using_api = true;
- $user_info = \App::$data['api_info'];
- $nick = $user_info['screen_name'];
- $channel = get_channel_by_nick($user_info['screen_name']);
}
- elseif(argc() > 1)
- $channel = get_channel_by_nick(argv(1));
-
+
+ if($using_api) {
+ require_once('include/api.php');
+ if(api_user())
+ $channel = channelx_by_n(api_user());
+ }
+ else {
+ if(argc() > 1)
+ $channel = channelx_by_nick(argv(1));
+ }
+
if(! $channel)
killme();