aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 04:49:15 -0700
committerfriendica <info@friendica.com>2012-07-18 04:49:15 -0700
commitd683df17bd530739bc64c79f152957ab229b6a02 (patch)
tree80d8a9e92d764aeacbb7bc09551ca1e501456ace /mod/item.php
parent22cf19e174bcee88b44968f2773d1bad2da2b54d (diff)
downloadvolse-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/item.php')
-rw-r--r--mod/item.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/mod/item.php b/mod/item.php
index 3bfa3ebe7..1053bb8ca 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -775,10 +775,6 @@ function item_post(&$a) {
}
-
- // Store the comment signature information in case we need to relay to Diaspora
- store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id);
-
}
else {
$parent = $post_id;
@@ -1064,40 +1060,3 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
}
-function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) {
- // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
-
- $enabled = intval(get_config('system','diaspora_enabled'));
- if(! $enabled) {
- logger('mod_item: diaspora support disabled, not storing comment signature', LOGGER_DEBUG);
- return;
- }
-
-
- logger('mod_item: storing diaspora comment signature');
-
- require_once('include/bb2diaspora.php');
- $signed_body = html_entity_decode(bb2diaspora($datarray['body']));
-
- // Only works for NETWORK_DFRN
- $contact_baseurl_start = strpos($author['url'],'://') + 3;
- $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start;
- $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length);
- $diaspora_handle = $author['nick'] . '@' . $contact_baseurl;
-
- $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle;
-
- if( $uprvkey !== false )
- $authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256'));
- else
- $authorsig = '';
-
- q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
- intval($post_id),
- dbesc($signed_text),
- dbesc(base64_encode($authorsig)),
- dbesc($diaspora_handle)
- );
-
- return;
-}