allow upload file real umlaut conversion and remove workaround
This commit is contained in:
parent
8c732e94ab
commit
2b9a008208
include
@ -324,7 +324,7 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$tfile = serendipity_uploadSecure(basename($tfile));
|
||||
$tfile = serendipity_uploadSecure(serendipity_makeFilename(basename($tfile)));
|
||||
|
||||
if (serendipity_isActiveFile($tfile)) {
|
||||
$messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "</span>\n";
|
||||
|
@ -1944,7 +1944,6 @@ function serendipity_deletePath($dir) {
|
||||
|
||||
/**
|
||||
* Transform a filename into a valid upload path
|
||||
* ToDO: Rewrite to use converted Umlauts, eg -> ae! (use serendipity_makeFilename()?)
|
||||
*
|
||||
* @access public
|
||||
* @param string The input filename
|
||||
@ -1955,8 +1954,6 @@ function serendipity_deletePath($dir) {
|
||||
function serendipity_uploadSecure($var, $strip_paths = true, $append_slash = false) {
|
||||
|
||||
$var = str_replace(' ', '_', $var);
|
||||
#$var = serendipity_makeFilename($var); // shouldn't this do? We will need to include functions_permalinks.inc.php for this!
|
||||
if (function_exists('iconv') && strtolower(LANG_CHARSET) == 'utf-8') $var = iconv("utf-8", "ascii//TRANSLIT", $var);
|
||||
$var = preg_replace('@[^0-9a-z\._/-]@i', '', $var);
|
||||
if ($strip_paths) {
|
||||
$var = preg_replace('@(\.+[/\\\\]+)@', '/', $var);
|
||||
|
Loading…
x
Reference in New Issue
Block a user