Ignore:
Timestamp:
Mar 31, 2010, 6:32:40 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Aktualizace fóra.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/includes/acp/acp_attachments.php

    r400 r702  
    33*
    44* @package acp
    5 * @version $Id: acp_attachments.php 9041 2008-11-02 11:19:12Z acydburn $
     5* @version $Id$
    66* @copyright (c) 2005 phpBB Group
    77* @license http://opensource.org/licenses/gpl-license.php GNU Public License
     
    125125                                                'img_display_inlined'           => array('lang' => 'DISPLAY_INLINED',           'validate' => 'bool',   'type' => 'radio:yes_no', 'explain' => true),
    126126                                                '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']),
    128128                                                'img_min_thumb_filesize'        => array('lang' => 'MIN_THUMB_FILESIZE',        'validate' => 'int',    'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
    129129                                                'img_imagick'                           => array('lang' => 'IMAGICK_PATH',                      'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;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']),
    132132                                        )
    133133                                );
     
    685685                                                }
    686686
    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'];
    689690
    690691                                                $img_path = $config['upload_icons_path'];
     
    695696                                                $imglist = filelist($phpbb_root_path . $img_path);
    696697
    697                                                 if (sizeof($imglist))
     698                                                if (!empty($imglist['']))
    698699                                                {
    699700                                                        $imglist = array_values($imglist);
     
    10041005                                                if ($files_added)
    10051006                                                {
    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);
    10081009                                                }
    10091010                                        }
     
    10271028                                                'FILESIZE'                      => get_formatted_filesize($row['filesize']),
    10281029                                                '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']),
    10311032                                                'ATTACH_ID'                     => $row['attach_id'],
    10321033                                                'POST_IDS'                      => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
     
    14301431        {
    14311432                // 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'];
    14341436
    14351437                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.