MantisBT: master 5022052e

Author Committer Branch Timestamp Parent
vboctor master 2003-02-25 09:02 master ac1ecefa
Affected Issues  0002992: Unable to attach files to bugs
Changeset

Fix 0002992: Unable to attach files to bugs
This bug also applied to attaching documents to projects. The bug only occurs on Windows server. The reason
is that Windows uses \ where unix uses /. Since \ needs escaping and / don't, the problem only occured under
Windows.

I did a bit of cleanup as well. However, more work can be done in this area, and more factoring of common
code between attaching files to bugs, and documents to projects can happen.

M core/file_api.php

  • (file_list_attachments): Order by date_added, rather than no ordering.
  • (file_add):
    • use non-escaped filename in constructing the new filename.
    • removed some unnecessary escaping, like escaping of temp filename which is never saved to the db.
    • some of the fields were not escaped before being saved to the db.

M bug_file_add.php

  • Added operational successful message before the proceed link.

M proj_doc_add.php

  • Used gpc_get_file() instead of directly accessing $HTTP_POST_FILES.
  • If document prefix is empty, do not add the dash following it.
  • Added support for FTP storage.
  • Escaping of variables.

M proj_doc_edit_page.php

  • Added the file type icon to the edit form.
  • Hyperlinked the icon / filename to the file.

M proj_doc_page.php

  • Use normal date format rather than complete date format.
  • Use manage_project_threshold to give access to editing documents (rather than MANAGER). This can have
    separate config option in the future.
  • Minor changes in the layout.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2022 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9

mod - proj_doc_add.php Diff File
mod - doc/ChangeLog Diff File
mod - bug_file_add.php Diff File
mod - core/file_api.php Diff File
mod - proj_doc_edit_page.php Diff File
mod - proj_doc_page.php Diff File