mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 10:23:28 +01:00
remove not necessary mime_(type|size|name)
This commit is contained in:
parent
8a5d64301c
commit
c7b52a8928
@ -85,9 +85,6 @@ class felamimail_hooks
|
||||
'menuaction' => 'felamimail.uifelamimail.importMessageFromVFS2DraftAndDisplay',
|
||||
'mime_popup' => '850xegw_getWindowOuterHeight()',
|
||||
'mime_url' => 'formData[file]',
|
||||
'mime_name' => 'formData[name]', // why are these required?
|
||||
'mime_type' => 'formData[type]',
|
||||
'mime_size' => 'formData[size]',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -617,7 +617,7 @@ class uifelamimail
|
||||
/**
|
||||
* importMessageFromVFS2DraftAndDisplay
|
||||
*
|
||||
* @param array $_formData Array with information of name, type, file and size; file is required,
|
||||
* @param array $formData Array with information of name, type, file and size; file is required,
|
||||
* name, type and size may be set here to meet the requirements
|
||||
* Example: $formData['name'] = 'a_email.eml';
|
||||
* $formData['type'] = 'message/rfc822';
|
||||
@ -634,14 +634,14 @@ class uifelamimail
|
||||
// name should be set to meet the requirements of checkFileBasics
|
||||
if (parse_url($formData['file'],PHP_URL_SCHEME) == 'vfs' && (!isset($formData['name']) || empty($formData['name'])))
|
||||
{
|
||||
$buff = explode('/',$_formData['file']);
|
||||
$buff = explode('/',$formData['file']);
|
||||
$suffix = '';
|
||||
if (is_array($buff)) $formData['name'] = array_pop($buff); // take the last part as name
|
||||
}
|
||||
// type should be set to meet the requirements of checkFileBasics
|
||||
if (parse_url($formData['file'],PHP_URL_SCHEME) == 'vfs' && (!isset($formData['type']) || empty($formData['type'])))
|
||||
{
|
||||
$buff = explode('.',$_formData['file']);
|
||||
$buff = explode('.',$formData['file']);
|
||||
$suffix = '';
|
||||
if (is_array($buff)) $suffix = array_pop($buff); // take the last extension to check with ext2mime
|
||||
if (!empty($suffix)) $formData['type'] = mime_magic::ext2mime($suffix);
|
||||
@ -659,7 +659,7 @@ class uifelamimail
|
||||
'menuaction' => 'felamimail.uidisplay.display',
|
||||
'uid' => $messageUid,
|
||||
'mailbox' => base64_encode($draftFolder),
|
||||
'deleteDraftOnClose' => 1,
|
||||
'deleteDraftOnClose' => 1,
|
||||
);
|
||||
}
|
||||
catch (egw_exception_wrong_userinput $e)
|
||||
|
@ -227,6 +227,7 @@ class egw_link extends solink
|
||||
'edit','edit_id','edit_popup',
|
||||
'list','list_popup',
|
||||
'name','icon','query',
|
||||
'mime',
|
||||
)));
|
||||
}
|
||||
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'!");
|
||||
}
|
||||
// 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'];
|
||||
unset($data['mime_popup']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user