]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
track whether contact is a community page or not
[friendica.git] / include / items.php
index 70c72ae165315f7975df384bf8805b308600d224..68acb45f9b6fc7bbf86183316421dd3587b2bf3d 100755 (executable)
@@ -1046,6 +1046,22 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
        if(! $rino_enable)
                $rino = 0;
 
+       $ssl_val = intval(get_config('system','ssl_policy'));
+       $ssl_policy = '';
+
+       switch($ssl_val){
+               case SSL_POLICY_FULL:
+                       $ssl_policy = 'full';
+                       break;
+               case SSL_POLICY_SELFSIGN:
+                       $ssl_policy = 'self';
+                       break;                  
+               case SSL_POLICY_NONE:
+               default:
+                       $ssl_policy = 'none';
+                       break;
+       }
+
        $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : '');
 
        logger('dfrn_deliver: ' . $url);
@@ -1077,6 +1093,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
        $challenge    = hex2bin((string) $res->challenge);
        $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0);
        $rino_allowed = ((intval($res->rino) === 1) ? 1 : 0);
+       $page         = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0);
 
        $final_dfrn_id = '';
 
@@ -1118,6 +1135,11 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
                $postvars['perm'] = 'r';
        }
 
+       $postvars['ssl_policy'] = $ssl_policy;
+
+       if($page)
+               $postvars['page'] = '1';
+       
        if($rino && $rino_allowed && (! $dissolve)) {
                $key = substr(random_string(),0,16);
                $data = bin2hex(aes_encrypt($postvars['data'],$key));