aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-11 21:52:50 -0700
committerFriendika <info@friendika.com>2011-09-11 21:52:50 -0700
commit17b081f9f79c30fb792912a884fd65984eb7c391 (patch)
treec41874c267bac89e3b718f883e52758a524cc29a /mod/item.php
parent7a06c7c3bfcf4f496930efc8cef92f7dbe6f54a2 (diff)
downloadvolse-hubzilla-17b081f9f79c30fb792912a884fd65984eb7c391.tar.gz
volse-hubzilla-17b081f9f79c30fb792912a884fd65984eb7c391.tar.bz2
volse-hubzilla-17b081f9f79c30fb792912a884fd65984eb7c391.zip
allow html post to api
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/mod/item.php b/mod/item.php
index b4ec7666f..e6ce1ea6f 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -38,6 +38,7 @@ function item_post(&$a) {
call_hooks('post_local_start', $_POST);
$api_source = ((x($_POST,'api_source') && $_POST['api_source']) ? true : false);
+ $return_path = ((x($_POST,'return')) ? $_POST['return'] : '');
/**
* Is this a reply to something?
@@ -834,12 +835,6 @@ function item_post(&$a) {
}
}
-
-
-
-
-
-
logger('post_complete');
// figure out how to return, depending on from whence we came
@@ -847,10 +842,10 @@ function item_post(&$a) {
if($api_source)
return;
- if((x($_POST,'return')) && strlen($_POST['return'])) {
- logger('return: ' . $_POST['return']);
- goaway($a->get_baseurl() . "/" . $_POST['return'] );
+ if($return_path) {
+ goaway($a->get_baseurl() . "/" . $return_path);
}
+
$json = array('success' => 1);
if(x($_POST,'jsreload') && strlen($_POST['jsreload']))
$json['reload'] = $a->get_baseurl() . '/' . $_POST['jsreload'];