remove not necessary mime_(type|size|name)

This commit is contained in:
Ralf Becker 2012-03-20 16:01:00 +00:00
parent a5116155d2
commit 200cad46a8

View File

@ -227,6 +227,7 @@ class egw_link extends solink
'edit','edit_id','edit_popup', 'edit','edit_id','edit_popup',
'list','list_popup', 'list','list_popup',
'name','icon','query', 'name','icon','query',
'mime',
))); )));
} }
return json_encode($to_json); return json_encode($to_json);
@ -951,19 +952,6 @@ class egw_link extends solink
{ {
throw egw_exception_assertion_failed("Missing 'mime_id' or 'mime_url' for mime-type '$type'!"); throw egw_exception_assertion_failed("Missing 'mime_id' or 'mime_url' for mime-type '$type'!");
} }
// some optional values fmail needs ...
foreach(array(
'mime_type' => $type,
'mime_size' => null, // filesize(egw_vfs::PREFIX.$path),
'mime_name' => basename($path),
) as $name => $value)
{
if (isset($data[$name]))
{
$data[$data[$name]] = $name == 'mime_size' ? filesize(egw_vfs::PREFIX.$path) : $value;
unset($data[$name]);
}
}
$popup = $data['mime_popup']; $popup = $data['mime_popup'];
unset($data['mime_popup']); unset($data['mime_popup']);
} }