Changeset 702 for trunk/forum/includes/acp/acp_attachments.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/includes/acp/acp_attachments.php
r400 r702 3 3 * 4 4 * @package acp 5 * @version $Id : acp_attachments.php 9041 2008-11-02 11:19:12Z acydburn$5 * @version $Id$ 6 6 * @copyright (c) 2005 phpBB Group 7 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 125 125 'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 126 126 'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 127 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),127 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 128 128 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), 129 129 'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'), 130 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),131 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),130 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 131 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 132 132 ) 133 133 ); … … 685 685 } 686 686 687 $size_format = ($ext_group_row['max_filesize'] >= 1048576) ? 'mb' : (($ext_group_row['max_filesize'] >= 1024) ? 'kb' : 'b'); 688 $ext_group_row['max_filesize'] = get_formatted_filesize($ext_group_row['max_filesize'], false); 687 $max_filesize = get_formatted_filesize($ext_group_row['max_filesize'], false, array('mb', 'kb', 'b')); 688 $size_format = $max_filesize['si_identifier']; 689 $ext_group_row['max_filesize'] = $max_filesize['value']; 689 690 690 691 $img_path = $config['upload_icons_path']; … … 695 696 $imglist = filelist($phpbb_root_path . $img_path); 696 697 697 if ( sizeof($imglist))698 if (!empty($imglist[''])) 698 699 { 699 700 $imglist = array_values($imglist); … … 1004 1005 if ($files_added) 1005 1006 { 1006 set_config ('upload_dir_size', $config['upload_dir_size'] +$space_taken, true);1007 set_config ('num_files', $config['num_files'] +$files_added, true);1007 set_config_count('upload_dir_size', $space_taken, true); 1008 set_config_count('num_files', $files_added, true); 1008 1009 } 1009 1010 } … … 1027 1028 'FILESIZE' => get_formatted_filesize($row['filesize']), 1028 1029 'FILETIME' => $user->format_date($row['filetime']), 1029 'REAL_FILENAME' => basename($row['real_filename']),1030 'PHYSICAL_FILENAME' => basename($row['physical_filename']),1030 'REAL_FILENAME' => utf8_basename($row['real_filename']), 1031 'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']), 1031 1032 'ATTACH_ID' => $row['attach_id'], 1032 1033 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '', … … 1430 1431 { 1431 1432 // Determine size var and adjust the value accordingly 1432 $size_var = ($value >= 1048576) ? 'mb' : (($value >= 1024) ? 'kb' : 'b'); 1433 $value = get_formatted_filesize($value, false); 1433 $filesize = get_formatted_filesize($value, false, array('mb', 'kb', 'b')); 1434 $size_var = $filesize['si_identifier']; 1435 $value = $filesize['value']; 1434 1436 1435 1437 return '<input type="text" id="' . $key . '" size="8" maxlength="15" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
Note:
See TracChangeset
for help on using the changeset viewer.