Feature 272 - Applying the function replace_dangerous_char() for file names of downloaded files. Cosmetic changes in the main API.

skala
Ivan Tcholakov 15 years ago
parent 6928690ac0
commit 78bacd5602
  1. 4
      main/inc/lib/document.lib.php
  2. 626
      main/inc/lib/main_api.lib.php

@ -295,11 +295,11 @@ class DocumentManager {
* @param string $name
* @return false if file doesn't exist, true if stream succeeded
*/
public static function file_send_for_download ($full_file_name, $forced = false, $name = '') {
public static function file_send_for_download($full_file_name, $forced = false, $name = '') {
if (!is_file($full_file_name)) {
return false;
}
$filename = ($name == '') ? basename($full_file_name) : $name;
$filename = ($name == '') ? basename($full_file_name) : replace_dangerous_char($name);
$len = filesize($full_file_name);
if ($forced) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save