mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 18:38:53 +00:00
[ticket/16426] Ensure 0 is not added as an option
PHPBB3-16426
This commit is contained in:
parent
9a72f39ff3
commit
d9e07b3b29
1 changed files with 3 additions and 2 deletions
|
@ -1478,14 +1478,15 @@ if (!$s_forums)
|
|||
/**
|
||||
* Build options for a select list for the number of characters returned.
|
||||
*
|
||||
* If the admin defined amount is not available, we add that option.
|
||||
* If the admin defined amount is not within the predefined range,
|
||||
* and the admin did not set it to unlimited (0), we add that option aswell.
|
||||
*
|
||||
* @deprecated 3.3.1-RC1 Templates should use an numeric input, in favor of a select.
|
||||
*/
|
||||
$s_characters = '<option value="0">' . $user->lang('ALL_AVAILABLE') . '</option>';
|
||||
$i_characters = array_merge([25, 50], range(100, 1000, 100));
|
||||
|
||||
if (!in_array((int) $config['default_search_return_chars'], $i_characters))
|
||||
if ($config['default_search_return_chars'] && !in_array((int) $config['default_search_return_chars'], $i_characters))
|
||||
{
|
||||
$i_characters[] = (int) $config['default_search_return_chars'];
|
||||
sort($i_characters);
|
||||
|
|
Loading…
Add table
Reference in a new issue