]> git.mxchange.org Git - friendica.git/commitdiff
some fixes to attachment output in feed
authorFriendika <info@friendika.com>
Thu, 7 Apr 2011 03:03:06 +0000 (20:03 -0700)
committerFriendika <info@friendika.com>
Thu, 7 Apr 2011 03:03:06 +0000 (20:03 -0700)
include/items.php

index 501f2f94478717ecdd92d19aae01de43d06b0cac..9eaee457363f992fce4c90bffcb518112d954c55 100644 (file)
@@ -1584,14 +1584,14 @@ function item_getfeedtags($item) {
 }
 
 function item_getfeedattach($item) {
-       $ret = array();
+       $ret = '';
        $arr = explode(',',$item['attach']);
        if(count($arr)) {
                foreach($arr as $r) {
                        $matches = false;
-                       $cnt = preg_match('|\<a href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" >(.+?)</a>|',$item['attach'],$matches);
+                       $cnt = preg_match('|\<a href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" >(.+?)</a>|',$r,$matches);
                        if($cnt) {
-                               $ret .= '<link href="' . $matches[1] . '" type="' . $matches[3] . '" ';
+                               $ret .= '<link rel="enclosure" href="' . $matches[1] . '" type="' . $matches[3] . '" ';
                                if(intval($matches[2]))
                                        $ret .= 'size="' . intval($matches[2]) . '" ';
                                if($matches[4] !== ' ')