|
|
|
|
@ -377,7 +377,7 @@ function downloadMP3_google($filepath, $dir) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$documentPath = $filepath.'/'.$audio_filename; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
|
|
//prev for a fine unicode, borrowed from main api TODO:clean |
|
|
|
|
// Safe replacements for some non-letter characters (whitout blank spaces) |
|
|
|
|
@ -391,7 +391,8 @@ function downloadMP3_google($filepath, $dir) |
|
|
|
|
// Transliteration to ASCII letters, they are not dangerous for filesystems. |
|
|
|
|
$filename = api_transliterate($filename, 'x', $encoding); |
|
|
|
|
// Replacing remaining dangerous non-letter characters. |
|
|
|
|
$clean_text = str_replace($search, $replace, $filename); |
|
|
|
|
$clean_text = str_replace($search, $replace, $filename);*/ |
|
|
|
|
$clean_text = api_replace_dangerous_char($clean_text); |
|
|
|
|
|
|
|
|
|
//adding the file |
|
|
|
|
//add new file to disk |
|
|
|
|
@ -454,7 +455,7 @@ function downloadMP3_pediaphon($filepath, $dir){ |
|
|
|
|
|
|
|
|
|
$documentPath = $filepath.'/'.$audio_filename; |
|
|
|
|
|
|
|
|
|
//prev for a fine unicode, borrowed from main api TODO:clean |
|
|
|
|
/*//prev for a fine unicode, borrowed from main api TODO:clean |
|
|
|
|
// Safe replacements for some non-letter characters (whitout blank spaces) |
|
|
|
|
$search = array("\0", "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%'); |
|
|
|
|
$replace = array('', '_', '_', '_', '_', '-', '-', '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-'); |
|
|
|
|
@ -466,7 +467,8 @@ function downloadMP3_pediaphon($filepath, $dir){ |
|
|
|
|
// Transliteration to ASCII letters, they are not dangerous for filesystems. |
|
|
|
|
$filename = api_transliterate($filename, 'x', $encoding); |
|
|
|
|
// Replacing remaining dangerous non-letter characters. |
|
|
|
|
$clean_text = str_replace($search, $replace, $filename); |
|
|
|
|
$clean_text = str_replace($search, $replace, $filename);*/ |
|
|
|
|
$clean_text = api_replace_dangerous_char($clean_text); |
|
|
|
|
|
|
|
|
|
//adding the file |
|
|
|
|
|
|
|
|
|
|