]> git.mxchange.org Git - friendica.git/commitdiff
rino recipient patch
authorFriendika <info@friendika.com>
Wed, 1 Dec 2010 21:39:00 +0000 (13:39 -0800)
committerFriendika <info@friendika.com>
Wed, 1 Dec 2010 21:39:00 +0000 (13:39 -0800)
include/items.php
mod/dfrn_notify.php

index 4bd46b4276146c67a2e970b1276b0327239ee688..04b86ab3fe55605226c3cf98ee21743e7738c885 100644 (file)
@@ -726,7 +726,7 @@ function dfrn_deliver($owner,$contact,$atom) {
                $postvars['data'] = str_replace('<dfrn:comment-allow>1','<dfrn:comment-allow>0',$atom);
        }
 
-       if($rino && rino_allowed) {
+       if($rino && $rino_allowed) {
                $key = substr(random_string(),0,16);
                $data = bin2hex(aes_encrypt($postvars['data'],$key));
                $postvars['data'] = $data;
@@ -772,7 +772,7 @@ function dfrn_deliver($owner,$contact,$atom) {
  * $contact =  the person who is sending us stuff. If not set, we MAY be processing a "follow" activity
  *             from an external network and MAY create an appropriate contact record. Otherwise, we MUST 
  *             have a contact record.
- * $hub = should wefind ahub declation in the feed, pass it back to our calling process, who might (or 
+ * $hub = should we find a hub declation in the feed, pass it back to our calling process, who might (or 
  *        might not) try and subscribe to it.
  *
  */
index 830a2d255637f6cc3ef472f737669e7f5b8aca9b..cd7523a01c27cb8a891f9a5e972dfa667dedb6f2 100644 (file)
@@ -483,12 +483,21 @@ function dfrn_notify_content(&$a) {
                $challenge    = bin2hex($challenge);
                $encrypted_id = bin2hex($encrypted_id);
 
+               $rino = ((function_exists('mcrypt_encrypt')) ? 1 : 0);
+
+               $rino_enable = get_config('system','rino_encrypt');
+
+               if(! $rino_enable)
+                       $rino = 0;
+
+
                header("Content-type: text/xml");
 
                echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" 
                        . '<dfrn_notify>' . "\r\n"
                        . "\t" . '<status>' . $status . '</status>' . "\r\n"
                        . "\t" . '<dfrn_version>' . DFRN_PROTOCOL_VERSION . '</dfrn_version>' . "\r\n"
+                       . "\t" . '<rino>' . $rino . '</rino>' . "\r\n" 
                        . "\t" . '<dfrn_id>' . $encrypted_id . '</dfrn_id>' . "\r\n" 
                        . "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
                        . '</dfrn_notify>' . "\r\n" ;