mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 07:35:29 +02:00
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8428 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
156bf27418
commit
58173191ed
@ -390,13 +390,16 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$validator = explode(':', $config_definition['validate']);
|
$validator = explode(':', $config_definition['validate']);
|
||||||
|
|
||||||
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
|
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
|
||||||
switch ($validator[$type])
|
switch ($validator[$type])
|
||||||
{
|
{
|
||||||
case 'string':
|
case 'string':
|
||||||
$length = strlen($cfg_array[$config_name]);
|
$length = strlen($cfg_array[$config_name]);
|
||||||
|
|
||||||
// the column is a VARCHAR
|
// the column is a VARCHAR
|
||||||
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
|
$validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
|
||||||
|
|
||||||
if (isset($validator[$min]) && $length < $validator[$min])
|
if (isset($validator[$min]) && $length < $validator[$min])
|
||||||
{
|
{
|
||||||
$error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
|
$error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
|
||||||
@ -576,7 +579,6 @@ function validate_range($value_ary, &$error)
|
|||||||
{
|
{
|
||||||
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
|
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'int':
|
case 'int':
|
||||||
@ -593,7 +595,6 @@ function validate_range($value_ary, &$error)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -133,6 +133,7 @@
|
|||||||
<li>[Fix] Check topics_per_page value in acp_forums (Bug #15539)</li>
|
<li>[Fix] Check topics_per_page value in acp_forums (Bug #15539)</li>
|
||||||
<li>[Fix] Custom profile fields with date type should be timezone independend (Bug #15003)</li>
|
<li>[Fix] Custom profile fields with date type should be timezone independend (Bug #15003)</li>
|
||||||
<li>[Fix] Fixing some XHTML errors/warnings within the ACP (Bug #22875)</li>
|
<li>[Fix] Fixing some XHTML errors/warnings within the ACP (Bug #22875)</li>
|
||||||
|
<li>[Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1089,7 +1089,7 @@ class parse_message extends bbcode_firstpass
|
|||||||
if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars'])
|
if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars'])
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $msg_len, $config['max_' . $mode . '_chars']);
|
$this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $msg_len, $config['max_' . $mode . '_chars']);
|
||||||
return $this->warn_msg;
|
return (!$update_this_message) ? $return_message : $this->warn_msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1097,7 +1097,7 @@ class parse_message extends bbcode_firstpass
|
|||||||
if ($mode !== 'sig' && utf8_clean_string($this->message) === '')
|
if ($mode !== 'sig' && utf8_clean_string($this->message) === '')
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = $user->lang['TOO_FEW_CHARS'];
|
$this->warn_msg[] = $user->lang['TOO_FEW_CHARS'];
|
||||||
return $this->warn_msg;
|
return (!$update_this_message) ? $return_message : $this->warn_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare BBcode (just prepares some tags for better parsing)
|
// Prepare BBcode (just prepares some tags for better parsing)
|
||||||
@ -1146,7 +1146,7 @@ class parse_message extends bbcode_firstpass
|
|||||||
if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
|
if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
|
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
|
||||||
return $this->warn_msg;
|
return (!$update_this_message) ? $return_message : $this->warn_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$update_this_message)
|
if (!$update_this_message)
|
||||||
@ -1603,7 +1603,6 @@ class parse_message extends bbcode_firstpass
|
|||||||
$this->message = $poll['poll_option_text'];
|
$this->message = $poll['poll_option_text'];
|
||||||
$bbcode_bitfield = $this->bbcode_bitfield;
|
$bbcode_bitfield = $this->bbcode_bitfield;
|
||||||
|
|
||||||
|
|
||||||
$poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false);
|
$poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false);
|
||||||
|
|
||||||
$bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
|
$bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user