diff options
| author | Senky <jakubsenko@gmail.com> | 2013-04-13 11:29:53 +0200 |
|---|---|---|
| committer | Senky <jakubsenko@gmail.com> | 2013-05-20 18:42:06 +0200 |
| commit | 4c03c22e503a4317db93e7e61f676a396318b097 (patch) | |
| tree | 16ecbecd00c9a1f918c59e391f5caeab7cb85129 /phpBB/includes/functions_acp.php | |
| parent | 178f23d4d8e37724e5f27cfb9b19dd2ab867e888 (diff) | |
| download | forums-4c03c22e503a4317db93e7e61f676a396318b097.tar forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.gz forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.bz2 forums-4c03c22e503a4317db93e7e61f676a396318b097.tar.xz forums-4c03c22e503a4317db93e7e61f676a396318b097.zip | |
[ticket/11010] dealing with dimensions problem, removing extra code
PHPBB3-11010
Diffstat (limited to 'phpBB/includes/functions_acp.php')
| -rw-r--r-- | phpBB/includes/functions_acp.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index eb89dbebc8..247d181fb0 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -282,15 +282,18 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars) break; case 'dimension': - $min = $max = $maxlength = ''; + $min = $max = $maxlength = $size = ''; + $min = (int) $tpl_type[1]; + if ( isset($tpl_type[2]) ) { $max = (int) $tpl_type[2]; $maxlength = strlen( (string) $max ); + $size = strlen( (string) $max ); } - $tpl = '<input id="' . $key . '" type="number" maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number" maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />'; + $tpl = '<input id="' . $key . '" type="number" ' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number" ' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />'; break; case 'textarea': |
