aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-03 19:18:58 -0700
committerFriendika <info@friendika.com>2011-08-03 19:18:58 -0700
commitad1e827169d9f57c02746b51c5268bdbe2cd8ac9 (patch)
treea6770ab49f632a8a63f1738b05eec3de32c1ea8b /include/items.php
parentd0b7723bbcd4e9a4fd5c97370bd1c738fdcdab28 (diff)
downloadvolse-hubzilla-ad1e827169d9f57c02746b51c5268bdbe2cd8ac9.tar.gz
volse-hubzilla-ad1e827169d9f57c02746b51c5268bdbe2cd8ac9.tar.bz2
volse-hubzilla-ad1e827169d9f57c02746b51c5268bdbe2cd8ac9.zip
several fixes for attachments
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index 6d69c6cc9..8c6134f94 100644
--- a/include/items.php
+++ b/include/items.php
@@ -518,7 +518,7 @@ function get_atom_elements($feed,$item) {
if(! $type)
$type = 'application/octet-stream';
- $att_arr[] = '[attach]href="' . $link . '" size="' . $len . '" type="' . $type . '" title="' . $title . '"[/attach]';
+ $att_arr[] = '[attach]href="' . $link . '" length="' . $len . '" type="' . $type . '" title="' . $title . '"[/attach]';
}
$res['attach'] = implode(',', $att_arr);
}
@@ -1725,11 +1725,11 @@ function item_getfeedattach($item) {
if(count($arr)) {
foreach($arr as $r) {
$matches = false;
- $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
+ $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$ret .= '<link rel="enclosure" href="' . xmlify($matches[1]) . '" type="' . xmlify($matches[3]) . '" ';
if(intval($matches[2]))
- $ret .= 'size="' . intval($matches[2]) . '" ';
+ $ret .= 'length="' . intval($matches[2]) . '" ';
if($matches[4] !== ' ')
$ret .= 'title="' . xmlify(trim($matches[4])) . '" ';
$ret .= ' />' . "\r\n";