Podczas zmiany ustawien hide hack mam blad ze cos tam jest blad w linijkach 692 admin_functionoptions a umnieto sie znajduje takie cos(daje parelinijek wiecej)
Kod php:
function validate_setting_value(&$value, $datatype, $bool_as_int = true, $username_query = true)
{
global $vbulletin;
switch ($datatype)
{
case 'number':
$value += 0;
break;
case 'integer':
$value = intval($value);
break;
case 'posint':
$value = max(1, intval($value));
break;
case 'boolean':
$value = ($bool_as_int ? ($value ? 1 : 0) : ($value ? true : false));
break;
case 'bitfield':
if (is_array($value))
{
$bitfield = 0;
foreach ($value AS $bitval)
{
$bitfield += $bitval;
}
$value = $bitfield;
}
else
{
$value += 0;
}
break;
case 'username':
$value = trim($value);
if ($username_query)
{
if (empty($value))
{
$value = 0;
}
else if ($userinfo = $vbulletin->db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($value)) . "'"))
{
$value = $userinfo['userid'];
}
else
{
$value = false;
}
}
break;
default:
$value = trim($value);
}
return $value;
}