aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Wall_attach.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-27 15:28:52 -0800
committerzotlabs <mike@macgirvin.com>2016-12-27 15:28:52 -0800
commitdb9ea66069f2a2df6044e8267a68eae377c45911 (patch)
treeaa93597df2ee43ceeaa980db864b58143f2e06df /Zotlabs/Module/Wall_attach.php
parentef02464e3c3188563349bfda42585ce40cdb45ad (diff)
parentc2830c4a98cf3c9983b3c4b61024d52a6d7187df (diff)
downloadvolse-hubzilla-db9ea66069f2a2df6044e8267a68eae377c45911.tar.gz
volse-hubzilla-db9ea66069f2a2df6044e8267a68eae377c45911.tar.bz2
volse-hubzilla-db9ea66069f2a2df6044e8267a68eae377c45911.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla into master_merge
Diffstat (limited to 'Zotlabs/Module/Wall_attach.php')
-rw-r--r--Zotlabs/Module/Wall_attach.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index 9a1019ddb..c6fe7518e 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -12,15 +12,20 @@ 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;
- $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();