diff options
author | friendica <info@friendica.com> | 2012-07-18 04:49:15 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-18 04:49:15 -0700 |
commit | d683df17bd530739bc64c79f152957ab229b6a02 (patch) | |
tree | 80d8a9e92d764aeacbb7bc09551ca1e501456ace /mod/receive.php | |
parent | 22cf19e174bcee88b44968f2773d1bad2da2b54d (diff) | |
download | volse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.tar.gz volse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.tar.bz2 volse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.zip |
Removing connectors we won't be needing - this is probably going to break some shit.
Diffstat (limited to 'mod/receive.php')
-rw-r--r-- | mod/receive.php | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/mod/receive.php b/mod/receive.php deleted file mode 100644 index 2bd3cc65b..000000000 --- a/mod/receive.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -/** - * Diaspora endpoint - */ - - -require_once('include/salmon.php'); -require_once('include/crypto.php'); -require_once('include/diaspora.php'); - - -function receive_post(&$a) { - - - $enabled = intval(get_config('system','diaspora_enabled')); - if(! $enabled) { - logger('mod-diaspora: disabled'); - http_status_exit(500); - } - - $public = false; - - if(($a->argc == 2) && ($a->argv[1] === 'public')) { - $public = true; - } - else { - - if($a->argc != 3 || $a->argv[1] !== 'users') - http_status_exit(500); - - $guid = $a->argv[2]; - - $r = q("SELECT * FROM `user` WHERE `guid` = '%s' AND `account_expired` = 0 LIMIT 1", - dbesc($guid) - ); - if(! count($r)) - http_status_exit(500); - - $importer = $r[0]; - } - - // It is an application/x-www-form-urlencoded - - $xml = urldecode($_POST['xml']); - - logger('mod-diaspora: new salmon ' . $xml, LOGGER_DATA); - - if(! $xml) - http_status_exit(500); - - $msg = diaspora_decode($importer,$xml); - - logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DATA); - - if(! is_array($msg)) - http_status_exit(500); - - $ret = 0; - if($public) - diaspora_dispatch_public($msg); - else - $ret = diaspora_dispatch($importer,$msg); - - http_status_exit(($ret) ? $ret : 200); - // NOTREACHED -} - |