diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-21 09:49:53 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-21 09:49:53 -0500 |
commit | 3ab222d1c748f26378152606a27accc8de9a45e0 (patch) | |
tree | 3674775daf950a12a04bfbb494812b07316c5105 /phpBB/includes/acp/acp_attachments.php | |
parent | fd4043526d9008de30ee82b4ea38efaef01796d0 (diff) | |
parent | 721bc03b2b992f4df14afcbe64bb2f0cb7d73cf5 (diff) | |
download | forums-3ab222d1c748f26378152606a27accc8de9a45e0.tar forums-3ab222d1c748f26378152606a27accc8de9a45e0.tar.gz forums-3ab222d1c748f26378152606a27accc8de9a45e0.tar.bz2 forums-3ab222d1c748f26378152606a27accc8de9a45e0.tar.xz forums-3ab222d1c748f26378152606a27accc8de9a45e0.zip |
Merge remote-tracking branch 'remotes/Senky/ticket/11010' into develop
# By Senky (19) and others
# Via Senky
* remotes/Senky/ticket/11010: (32 commits)
[ticket/11010] properly tabifying 'max_autologin_time'
[ticket/11010] resolving latest comments
[ticket/11010] Fixes for number input in acp
[ticket/11010] Fix input type for urls
[ticket/11010] Fix email inputs
[ticket/11010] updating tests
[ticket/11010] dealing with dimensions problem, removing extra code
[ticket/11010] Change input type to search for search forms
[ticket/11010] Add all HTML5 input types to ACP
[ticket/11010] Add HTML5 input types to installer
[ticket/11010] validation to match type
[ticket/11010] displaying min and max only if they are set
[ticket/11010] fixing tests
[ticket/11010] replacing maxlenght with max
[ticket/11010] applying some of EXreaction notes
[ticket/11010] Try to keep min < max.
[ticket/11010] Mock user in order for the test to run standalone.
[ticket/11010] Progress toward fixing the test suite.
[ticket/11010] adding type="url" to 'site_home_url'
[ticket/11010] fixing inputs types in memberlist_search.html
...
Diffstat (limited to 'phpBB/includes/acp/acp_attachments.php')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 9d6c2d5de1..d0e8ff3882 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -117,8 +117,8 @@ class acp_attachments 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), - 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false), - 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false), + 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => false), + 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => false), 'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true), 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), @@ -128,11 +128,11 @@ class acp_attachments 'legend2' => $l_legend_cat_images, 'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), - 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), + 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), '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>'), - 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), - 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), ) ); @@ -1203,8 +1203,8 @@ class acp_attachments // Just get the files $sql = 'SELECT a.*, u.username, u.user_colour, t.topic_title - FROM ' . ATTACHMENTS_TABLE . ' a - LEFT JOIN ' . USERS_TABLE . ' u ON (u.user_id = a.poster_id) + FROM ' . ATTACHMENTS_TABLE . ' a + LEFT JOIN ' . USERS_TABLE . ' u ON (u.user_id = a.poster_id) LEFT JOIN ' . TOPICS_TABLE . " t ON (a.topic_id = t.topic_id) WHERE a.is_orphan = 0 $limit_filetime @@ -1670,7 +1670,8 @@ class acp_attachments $size_var = $filesize['si_identifier']; $value = $filesize['value']; - return '<input type="text" id="' . $key . '" size="8" maxlength="15" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>'; + // size="8" and maxlength="15" attributes as a fallback for browsers that do not support type="number" yet. + return '<input type="number" id="' . $key . '" size="8" maxlength="15" min="0" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>'; } /** |