several fixes for attachments

This commit is contained in:
Friendika 2011-08-03 19:18:58 -07:00
parent d0b7723bbc
commit ad1e827169
6 changed files with 24 additions and 14 deletions

View file

@ -746,7 +746,7 @@ function prepare_body($item,$attach = false) {
foreach($arr as $r) {
$matches = false;
$icon = '';
$cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
$cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches);
if($cnt) {
$icontype = strtolower(substr($matches[3],0,strpos($matches[3],'/')));
switch($icontype) {