From ac1ecefac512eb4df5bfca6f389966f472bbbbd7 Mon Sep 17 00:00:00 2001 From: Victor Boctor Date: Tue, 25 Feb 2003 10:11:32 +0000 Subject: [PATCH] M core/file_api.php - Changed file_get_display_name() to handle doc-001-xyz.zip format. M proj_doc_edit_page.php - Use file_get_display_name() to display the original filename rather than the file system file name. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2021 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- core/file_api.php | 6 +++--- doc/ChangeLog | 1 + proj_doc_edit_page.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/file_api.php b/core/file_api.php index 4d46437a81..9499a6a58c 100644 --- a/core/file_api.php +++ b/core/file_api.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: file_api.php,v 1.27 2003-02-23 04:26:19 vboctor Exp $ + # $Id: file_api.php,v 1.28 2003-02-25 10:11:31 vboctor Exp $ # -------------------------------------------------------- $t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR; @@ -21,8 +21,8 @@ # -------------------- # Gets the filename without the bug id prefix. function file_get_display_name( $p_filename ) { - $t_array = explode ('-', $p_filename, 2); - return $t_array[1]; + $t_array = explode ('-', $p_filename, 3); + return $t_array[count( $t_array ) - 1]; } # -------------------- # List the attachments belonging to the specified bug. This is used from within diff --git a/doc/ChangeLog b/doc/ChangeLog index 3de8fc8640..7038f40cd6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -13,6 +13,7 @@ Mantis ChangeLog * Fix: Added the removal of invalid history entries that were added due to escaping errors to the string escaping fixes. * Fix: Improve speed of actions that trigger email sends by reducing the number of queries by 200x (20,000%). Queries when sending emails are now linear to the number of users receiving the email instead of the number of users in the system. * Fix: error deleting bug files fixed + * Fix: display logical filename rather than file system filename for project documents in project document edit page. * Fix #2944: Project files are not deleted when project is deleted. * Fix #2939: Confusing file names for uploaded project documents. * Fix #2953: View all bugs page empty (temporary fix by disabling compression when running on an IIS server). diff --git a/proj_doc_edit_page.php b/proj_doc_edit_page.php index 7eaedb550e..4c1d18e3dd 100644 --- a/proj_doc_edit_page.php +++ b/proj_doc_edit_page.php @@ -67,7 +67,7 @@ - +