aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-10 20:44:17 -0700
committerfriendica <info@friendica.com>2012-07-10 20:44:17 -0700
commit31c218e785931bcb69f0abc058056ad5f60ae28c (patch)
tree3cf09b10478cb160fd83665f0618ea1fd568c600
parentcc35457971c769c2ad64927814e31617dc2b618f (diff)
downloadvolse-hubzilla-31c218e785931bcb69f0abc058056ad5f60ae28c.tar.gz
volse-hubzilla-31c218e785931bcb69f0abc058056ad5f60ae28c.tar.bz2
volse-hubzilla-31c218e785931bcb69f0abc058056ad5f60ae28c.zip
catchup
-rwxr-xr-xinclude/items.php2
-rw-r--r--mod/item.php5
-rwxr-xr-xmod/like.php8
3 files changed, 1 insertions, 14 deletions
diff --git a/include/items.php b/include/items.php
index d48a04da5..ac5ddbf45 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3675,7 +3675,7 @@ function store_diaspora_retract_sig($item, $user, $baseurl) {
}
else {
$r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1",
- $item['contact-id']
+ $item['contact-id'] // If this function gets called, drop_item() has already checked remote_user() == $item['contact-id']
);
if(count($r)) {
// The below handle only works for NETWORK_DFRN. I think that's ok, because this function
diff --git a/mod/item.php b/mod/item.php
index 7dd4eff76..7e8d0499d 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -1050,16 +1050,11 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item,
require_once('include/bb2diaspora.php');
$signed_body = html_entity_decode(bb2diaspora($datarray['body']));
-// $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3);
-// if( $author['network'] === NETWORK_DIASPORA)
-// $diaspora_handle = $author['addr'];
-// else {
// 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;
diff --git a/mod/like.php b/mod/like.php
index 1176c3110..5519bffdb 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -245,9 +245,6 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact)
if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) {
$signed_text = $like_item['guid'] . ';' . 'Like';
-// if( $contact['network'] === NETWORK_DIASPORA)
-// $diaspora_handle = $contact['addr'];
-// else {
// Only works for NETWORK_DFRN
$contact_baseurl_start = strpos($contact['url'],'://') + 3;
$contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
@@ -268,7 +265,6 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact)
if( $r)
$authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
}
-// }
if(! isset($authorsig))
$authorsig = '';
@@ -299,9 +295,6 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
logger('mod_like: storing diaspora like signature');
if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) {
-// if( $contact['network'] === NETWORK_DIASPORA)
-// $diaspora_handle = $contact['addr'];
-// else {
// Only works for NETWORK_DFRN
$contact_baseurl_start = strpos($contact['url'],'://') + 3;
$contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
@@ -322,7 +315,6 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
if( $r)
$contact_uprvkey = $r['prvkey'];
}
-// }
$r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1",
intval($post_id)