]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
share not available in display module, as no editor window to paste into
[friendica.git] / include / items.php
index e9594cff2c35432ee506351fc49f8b02536b5703..facd8b2d4df313e9ed99b2fa24ead393dd2d6873 100644 (file)
@@ -20,6 +20,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
                for($x = 2; $x < $a->argc; $x++) {
                        if($a->argv[$x] == 'converse')
                                $converse = true;
+                       if($a->argv[$x] == 'starred')
+                               $starred = true;
                }
        }
 
@@ -376,6 +378,10 @@ function get_atom_elements($feed,$item) {
        if($dguid)
                $res['guid'] = unxmlify($dguid[0]['data']);
 
+       $bm = $item->get_item_tags(NAMESPACE_DFRN,'bookmark');
+       if($bm)
+               $res['bookmark'] = ((unxmlify($bm[0]['data']) === 'true') ? 1 : 0);
+
 
        /**
         * If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it.
@@ -731,6 +737,7 @@ function item_store($arr,$force_parent = false) {
        $arr['deny_cid']      = ((x($arr,'deny_cid'))      ? trim($arr['deny_cid'])              : '');
        $arr['deny_gid']      = ((x($arr,'deny_gid'))      ? trim($arr['deny_gid'])              : '');
        $arr['private']       = ((x($arr,'private'))       ? intval($arr['private'])             : 0 );
+       $arr['bookmark']      = ((x($arr,'bookmark'))      ? intval($arr['bookmark'])            : 0 );
        $arr['body']          = ((x($arr,'body'))          ? trim($arr['body'])                  : '');
        $arr['tag']           = ((x($arr,'tag'))           ? notags(trim($arr['tag']))           : '');
        $arr['attach']        = ((x($arr,'attach'))        ? notags(trim($arr['attach']))        : '');
@@ -927,7 +934,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
        if(! $curl_stat)
                return(-1); // timed out
 
-       logger('dfrn_deliver: ' . $xml);
+       logger('dfrn_deliver: ' . $xml, LOGGER_DATA);
 
        if(! $xml)
                return 3;
@@ -991,7 +998,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
                $key = substr(random_string(),0,16);
                $data = bin2hex(aes_encrypt($postvars['data'],$key));
                $postvars['data'] = $data;
-               logger('rino: sent key = ' . $key);     
+               logger('rino: sent key = ' . $key, LOGGER_DEBUG);       
 
 
                if($dfrn_version >= 2.1) {      
@@ -1704,6 +1711,8 @@ function atom_entry($item,$type,$author,$owner,$comment = false) {
 
        if($item['extid'])
                $o .= '<dfrn:extid>' . xmlify($item['extid']) . '</dfrn:extid>' . "\r\n";
+       if($item['bookmark'])
+               $o .= '<dfrn:bookmark>true</dfrn:bookmark>' . "\r\n";
 
        if($item['app'])
                $o .= '<statusnet:notice_info local_id="' . $item['id'] . '" source="' . xmlify($item['app']) . '" ></statusnet:notice_info>' . "\r\n";