]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
vier: fix missing icons
[friendica.git] / include / items.php
index 1e68787d2435416d2aa1638c177862ecbde7d9e8..eff13668992a6c47a03ae9a021ae643b23c3a326 100644 (file)
@@ -1250,8 +1250,10 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        if ($notify)
                $guid_prefix = "";
-       else
-               $guid_prefix = $arr['network'];
+       else {
+               $parsed = parse_url($arr["author-link"]);
+               $guid_prefix = hash("crc32", $parsed["host"]);
+       }
 
        $arr['wall']          = ((x($arr,'wall'))          ? intval($arr['wall'])                : 0);
        $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $guid_prefix));
@@ -2320,6 +2322,9 @@ function edited_timestamp_is_newer($existing, $update) {
 function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) {
        if ($contact['network'] === NETWORK_OSTATUS) {
                if ($pass < 2) {
+                       // Test - remove before flight
+                       //$tempfile = tempnam(get_temppath(), "ostatus2");
+                       //file_put_contents($tempfile, $xml);
                        logger("Consume OStatus messages ", LOGGER_DEBUG);
                        ostatus_import($xml,$importer,$contact, $hub);
                }
@@ -4397,7 +4402,7 @@ function atom_author($tag,$name,$uri,$h,$w,$photo,$geo) {
 
                        $o .= "\t<poco:preferredUsername>".xmlify($r[0]["nick"])."</poco:preferredUsername>\r\n";
                        $o .= "\t<poco:displayName>".xmlify($r[0]["name"])."</poco:displayName>\r\n";
-                       $o .= "\t<poco:note>".xmlify($r[0]["about"])."</poco:note>\r\n";
+                       $o .= "\t<poco:note>".xmlify(bbcode($r[0]["about"]))."</poco:note>\r\n";
                        $o .= "\t<poco:address>\r\n";
                        $o .= "\t\t<poco:formatted>".xmlify($location)."</poco:formatted>\r\n";
                        $o .= "\t</poco:address>\r\n";