SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001948SiT!incidentspublic2014-06-15 16:002014-06-15 16:00
Assigned To 
PlatformLinuxOSCentOSOS Version6.4
Product Version3.67 LTS 
Target VersionFixed in Version 
Summary0001948: incident_attachment, does not store the attachment correctly
Descriptionin 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
Steps To Reproducenot 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-06-15 16:00 repostor New Issue

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker