1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

- fixed language pack management a bit (supporting backslashes)

- fixed ftp_fsock, also fixing a reported bug in there


git-svn-id: file:///svn/phpbb/trunk@6139 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-07-02 21:42:54 +00:00
parent fdd82e4c12
commit 98fc394eb3
5 changed files with 123 additions and 87 deletions

View File

@@ -2072,26 +2072,41 @@ function extension_allowed($forum_id, $extension, &$extensions)
// Little helpers
/**
* Little helper for the build_hidden_fields function
*/
function _build_hidden_fields($key, $value, $specialchar)
{
$hidden_fields = '';
if (!is_array($value))
{
$key = ($specialchar) ? htmlspecialchars($key) : $key;
$value = ($specialchar) ? htmlspecialchars($value) : $value;
$hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
}
else
{
foreach ($value as $_key => $_value)
{
$hidden_fields .= _build_hidden_fields($key . '[' . $_key . ']', $_value, $specialchar);
}
}
return $hidden_fields;
}
/**
* Build simple hidden fields from array
*/
function build_hidden_fields($field_ary)
function build_hidden_fields($field_ary, $specialchar = false)
{
$s_hidden_fields = '';
foreach ($field_ary as $name => $vars)
{
if (is_array($vars))
{
foreach ($vars as $key => $value)
{
$s_hidden_fields .= '<input type="hidden" name="' . $name . '[' . $key . ']" value="' . $value . '" />';
}
}
else
{
$s_hidden_fields .= '<input type="hidden" name="' . $name . '" value="' . $vars . '" />';
}
$s_hidden_fields .= _build_hidden_fields($name, $vars, $specialchar);
}
return $s_hidden_fields;