mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/11010] dealing with dimensions problem, removing extra code
PHPBB3-11010
This commit is contained in:
@@ -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':
|
||||
|
Reference in New Issue
Block a user