Skip to content

Commit

Permalink
M core/file_api.php
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
vboctor committed Feb 25, 2003
1 parent 49371dc commit ac1ecef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/file_api.php
Expand Up @@ -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;
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion proj_doc_edit_page.php
Expand Up @@ -67,7 +67,7 @@
<?php echo lang_get( 'filename' ) ?>
</td>
<td>
<?php echo $v_filename ?>
<?php echo file_get_display_name( $v_filename ) ?>
</td>
</tr>
<tr>
Expand Down

0 comments on commit ac1ecef

Please sign in to comment.