From ad1e827169d9f57c02746b51c5268bdbe2cd8ac9 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 3 Aug 2011 19:18:58 -0700 Subject: several fixes for attachments --- mod/item.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index b71c35041..fd5d405ff 100644 --- a/mod/item.php +++ b/mod/item.php @@ -304,6 +304,10 @@ function item_post(&$a) { if(count($r)) { $r = q("UPDATE `attach` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1", + dbesc($str_contact_allow), + dbesc($str_group_allow), + dbesc($str_contact_deny), + dbesc($str_group_deny), intval($profile_uid), intval($attach) ); @@ -436,7 +440,7 @@ function item_post(&$a) { if(count($r)) { if(strlen($attachments)) $attachments .= ','; - $attachments .= '[attach]href="' . $a->get_baseurl() . '/attach/' . $r[0]['id'] . '" size="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : ' ') . '"[/attach]'; + $attachments .= '[attach]href="' . $a->get_baseurl() . '/attach/' . $r[0]['id'] . '" length="' . $r[0]['filesize'] . '" type="' . $r[0]['filetype'] . '" title="' . (($r[0]['filename']) ? $r[0]['filename'] : '') . '"[/attach]'; } $body = str_replace($match[1],'',$body); } -- cgit v1.2.3