Skip to content

Commit

Permalink
Remove hardcoded file size unit 'k'
Browse files Browse the repository at this point in the history
Fixes #16970

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
badfiles authored and dregad committed Feb 14, 2014
1 parent a6cb846 commit e1d4aa5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions bug_file_upload_inc.php
Expand Up @@ -70,8 +70,7 @@
<tr class="row-1">
<td class="category" width="15%">
<?php echo lang_get( $t_file_upload_max_num == 1 ? 'select_file' : 'select_files' ) ?><br />
<?php //FIXME: hard coded "k" in here. ?>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) . lang_get( 'word_separator' ) . lang_get( 'file_kb' ) ?></span>
</td>
<td width="85%">
<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
Expand Down
2 changes: 1 addition & 1 deletion bug_report_page.php
Expand Up @@ -598,7 +598,7 @@
<tr>
<th class="category">
<label for="file"><?php echo lang_get( $t_file_upload_max_num == 1 ? 'upload_file' : 'upload_files' ) ?></label><br />
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) . lang_get( 'word_separator' ) . lang_get( 'file_kb' ) ?></span>
</th>
<td>
<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
Expand Down
1 change: 1 addition & 0 deletions lang/strings_english.txt
Expand Up @@ -491,6 +491,7 @@ $s_upload_file_button = 'Upload File';
$s_upload_files_button = 'Upload Files';
$s_max_file_size = 'Maximum size';
$s_max_file_size_label = 'Maximum size:';
$s_file_kb = 'KiB';

# bug_reopen.php
$s_bug_reopened_msg = 'Issue has been reopened...';
Expand Down
3 changes: 1 addition & 2 deletions proj_doc_add_page.php
Expand Up @@ -87,8 +87,7 @@
<tr class="row-1">
<td class="category">
<span class="required">*</span><?php echo lang_get( 'select_file' ); ?><br />
<?php // FIXME: hard coded "k" in here. ?>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) . lang_get( 'word_separator' ) . lang_get( 'file_kb' ) ?></span>
</td>
<td>
<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
Expand Down
3 changes: 1 addition & 2 deletions proj_doc_edit_page.php
Expand Up @@ -125,8 +125,7 @@
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'select_file' ); ?><br />
<?php // FIXME: hard coded "k" in here. ?>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) ?>k</span>
<span class="small"><?php echo lang_get( 'max_file_size_label' ) . lang_get( 'word_separator' ) . number_format( $t_max_file_size/1000 ) . lang_get( 'word_separator' ) . lang_get( 'file_kb' ) ?></span>
</td>
<td>
<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
Expand Down

0 comments on commit e1d4aa5

Please sign in to comment.