aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-22 16:25:02 -0700
committerfriendica <info@friendica.com>2012-04-22 16:25:02 -0700
commit724e1d15d0441fa169598397416d1e470e539d02 (patch)
treeea3df9b38646ed1d6343426b84cf50a8a3e3004c /include
parent00cb7f9efb4826a6ad5c0791f26bc5e8db644f77 (diff)
parentc0dffa7442abdcaee8bcc2eb97a3ed71d60ce554 (diff)
downloadvolse-hubzilla-724e1d15d0441fa169598397416d1e470e539d02.tar.gz
volse-hubzilla-724e1d15d0441fa169598397416d1e470e539d02.tar.bz2
volse-hubzilla-724e1d15d0441fa169598397416d1e470e539d02.zip
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'include')
-rw-r--r--include/api.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/api.php b/include/api.php
index 0885a1434..f9be68c3d 100644
--- a/include/api.php
+++ b/include/api.php
@@ -567,8 +567,17 @@
$_REQUEST['profile_uid'] = local_user();
if(requestdata('parent'))
$_REQUEST['type'] = 'net-comment';
- else
+ else {
$_REQUEST['type'] = 'wall';
+ if(x($_FILES,'media')) {
+ // upload the image if we have one
+ $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
+ require_once('mod/wall_upload.php');
+ $media = wall_upload_post($a);
+ if(strlen($media)>0)
+ $_REQUEST['body'] .= "\n\n".$media;
+ }
+ }
// set this so that the item_post() function is quiet and doesn't redirect or emit json