The only code lines that are executed with attachments enabled (and no file uploaded) are:
Code:
if ($plugin=uddeIMcheckPlugin('attachment')) {
if ($config->enableattachment) {
include_once($plugin);
if (!uddeIMcheckVersionPlugin('attachment'))
$config->enableattachment = 0;
}
} else {
$config->enableattachment = 0;
}
if( $config->enableattachment && uddeIMisAttachmentAllowed($my_gid, $config)) {
$noerror = uddeIMhandleAttachments($uploadfile_temppathname, $uploadfile_original, $uploadfile_id, $uploadfile_size, $uploadfile_error, $config);
if (!$noerror) { // something goes wrong
...error handling...
}
}
function uddeIMhandleAttachments(&$uploadfile_temppathname, &$uploadfile_original, &$uploadfile_id, &$uploadfile_size, &$uploadfile_error, $config) {
$noerror = true;
$uploadfile_temppathname = Array();
$uploadfile_original = Array();
$uploadfile_id = Array();
$uploadfile_size = Array();
$uploadfile_error = Array();
if ($config->enableattachment) {
$i = 0;
$tmp_files = uddeIMmosGetParam ($_FILES, 'uddeimfile', array("tmp_name" => array()));
while (list($key, $value) = each( $tmp_files["tmp_name"] )) {
$tmp_name = $tmp_files["tmp_name"][$key];
$name = $tmp_files["name"][$key];
$size = $tmp_files["size"][$key];
$i++;
... if there was a file uploaded...
}
}
return $noerror;
}
There is no reason why uddeIM should waste 20 seconds of CPU time. It must be something different.