mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:01:48 +02:00
[ticket/16426] Ensure 0 is not added as an option
PHPBB3-16426
This commit is contained in:
@@ -1478,14 +1478,15 @@ if (!$s_forums)
|
|||||||
/**
|
/**
|
||||||
* Build options for a select list for the number of characters returned.
|
* 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.
|
* @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>';
|
$s_characters = '<option value="0">' . $user->lang('ALL_AVAILABLE') . '</option>';
|
||||||
$i_characters = array_merge([25, 50], range(100, 1000, 100));
|
$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'];
|
$i_characters[] = (int) $config['default_search_return_chars'];
|
||||||
sort($i_characters);
|
sort($i_characters);
|
||||||
|
Reference in New Issue
Block a user