X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Flike.php;h=15633fc7671de1112414d54086c4f327b45855bb;hb=6da01c1a3db29960f7c81582cb52e4254981e9cb;hp=2e5367e51e48aee4008d335094b896edfbf76590;hpb=be5267edda51eb4b523324c001bcf90ca60e1fa5;p=friendica.git diff --git a/include/like.php b/include/like.php index 2e5367e51e..15633fc767 100644 --- a/include/like.php +++ b/include/like.php @@ -1,4 +1,5 @@ 0)) { - $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", - intval($contact['uid']) - ); - - if($r) - $contact_uprvkey = $r[0]['prvkey']; - } - - $r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1", - intval($post_id) - ); - if( $r) { - $p = q("SELECT guid FROM `item` WHERE id = %d AND parent = %d LIMIT 1", - intval($r[0]['parent']), - intval($r[0]['parent']) - ); - if( $p) { - $signed_text = 'true;'.$r[0]['guid'].';Post;'.$p[0]['guid'].';'.$diaspora_handle; - - if(isset($contact_uprvkey)) - $authorsig = base64_encode(rsa_sign($signed_text,$contact_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($authorsig), - dbesc($diaspora_handle) - ); - } - } - } - - return; -}