aboutsummaryrefslogtreecommitdiffstats
path: root/mod/post.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-10 23:26:12 -0800
committerfriendica <info@friendica.com>2012-11-10 23:26:12 -0800
commit093ab7177ad19459438579d608dad89cf68d4378 (patch)
treed45705dc3c63d51f7fffd47050abca9c7ae10ac6 /mod/post.php
parentdd00fcc7bb3a3b50bd453fddb9a88b7f74d24140 (diff)
downloadvolse-hubzilla-093ab7177ad19459438579d608dad89cf68d4378.tar.gz
volse-hubzilla-093ab7177ad19459438579d608dad89cf68d4378.tar.bz2
volse-hubzilla-093ab7177ad19459438579d608dad89cf68d4378.zip
rework a couple of zot basics
Diffstat (limited to 'mod/post.php')
-rw-r--r--mod/post.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/post.php b/mod/post.php
index ef94c9b5d..fb8885b93 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -11,12 +11,16 @@ function post_post(&$a) {
$ret = array('result' => false, 'message' => '');
- $msgtype = ((x($_REQUEST,'type')) ? $_REQUEST['type'] : '');
+ $msgtype = ((array_key_exists('type',$_REQUEST)) ? $_REQUEST['type'] : '');
- $hub = zot_gethub($_REQUEST);
+ if(array_key_exists('sender',$_REQUEST)) {
+ $j_sender = json_decode($_REQUEST['sender']);
+ }
+
+ $hub = zot_gethub($j_sender);
if(! $hub) {
- $result = zot_register_hub($_REQUEST);
- if((! $result) || (! zot_gethub($_REQUEST))) {
+ $result = zot_register_hub($j_sender);
+ if((! $result['success']) || (! zot_gethub($j_sender))) {
$ret['message'] = 'Hub not available.';
json_return_and_die($ret);
}