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() --- Zotlabs/Module/Wall_attach.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Module/Wall_attach.php') 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(); -- cgit v1.2.3 From 8e6ff32c97fe6abbbc93e3d7d2769142c285b948 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 2 Dec 2016 23:09:25 -0800 Subject: more api work for item/store and doco --- Zotlabs/Module/Wall_attach.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Wall_attach.php') diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php index 9268fbb0a..c6fe7518e 100644 --- a/Zotlabs/Module/Wall_attach.php +++ b/Zotlabs/Module/Wall_attach.php @@ -12,7 +12,7 @@ class Wall_attach extends \Zotlabs\Web\Controller { $using_api = false; - if(\App::$data['api_info'] && array_key_exists('media',$_FILES)) { + if($_REQUEST['api_source'] && array_key_exists('media',$_FILES)) { $using_api = true; } -- cgit v1.2.3