SiT! Bugs - SiT!
View Issue Details
0001948SiT!incidentspublic2014-06-15 16:002014-06-15 16:00
3.67 LTS 
0001948: incident_attachment, does not store the attachment correctly
in version 3.65, it worked fine.
But after I applied 3.67, I can no longer upload attachment.

In order to get this working again; I have to manually copy the older version of the file.
So I have a workaround for it...

Here are the changes between 3.65 and 3.67.

[root@tomcat sit]# diff incident_attachments.php ../sit-3.63/incident_attachments.php
< // Copyright (C) 2010-2012 The Support Incident Tracker Project
> // Copyright (C) 2010-2011 The Support Incident Tracker Project
< $sql .= "VALUES ('public', '" . clean_dbstring(clean_fspath($_FILES['attachment']['name'])) . ", '{$_FILES['attachment']['size']}', '{$sit[2]}', 'user', NOW())";
> $sql .= "VALUES ('public', '{$_FILES['attachment']['name']}', '{$_FILES['attachment']['size']}', '{$sit[2]}', 'user', NOW())";
< "-" . clean_fspath($_FILES['attachment']['name']);
> "-".$_FILES['attachment']['name'];
< trigger_error('Failed creating incident attachment directory.', E_USER_WARNING);
> trigger_error('Failed creating incident attachment directory: '.$incident_attachment_fspath, E_USER_WARNING);
< $mv = @move_uploaded_file($_FILES['attachment']['tmp_name'], $newfilename);
< if (!$mv) trigger_error('!Error: Problem moving attachment from temp directory', E_USER_WARNING);
> $mv = move_uploaded_file($_FILES['attachment']['tmp_name'], $newfilename);
> if (!$mv) trigger_error('!Error: Problem moving attachment from temp directory to: '.$newfilename, E_USER_WARNING);
[root@tomcat sit]# mv incident_attachments.php incident_attachments.php.367
[root@tomcat sit]# cp -p ../sit-3.63/incident_attachments.php .

Regards Tomas
not sure how your environment differs from my, but I did this:
1. create an incident
2. I selected "files" on the incident
3. I selected "browse" button
4. I selected a file -> OK
5. I selected "attach file"

The file gets attached; but no name of the file.
Only size; date, etc.
No tags attached.
Issue History
2014-06-15 16:00repostorNew Issue

There are no notes attached to this issue.