diff --git a/core/includes/file.inc b/core/includes/file.inc index babf465..32c2820 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -1236,7 +1236,7 @@ function file_create_filename($basename, $directory) { * @see hook_file_predelete() * @see hook_file_delete() */ -function file_delete(stdClass $file, $force = FALSE) { +function file_delete(stdClass $file) { if (!file_valid_uri($file->uri)) { if (($realpath = drupal_realpath($file->uri)) !== FALSE) { watchdog('file', 'File %file (%realpath) could not be deleted because it is not a valid URI. This may be caused by improper use of file_delete() or a missing stream wrapper.', array('%file' => $file->uri, '%realpath' => $realpath)); @@ -1248,12 +1248,6 @@ function file_delete(stdClass $file, $force = FALSE) { return FALSE; } - // If any module still has a usage entry in the file_usage table, the file - // will not be deleted, but file_delete() will return a populated array - // that tests as TRUE. - if (!$force && ($references = file_usage_list($file))) { - return $references; - } // Let other modules clean up any references to the file prior to deletion. module_invoke_all('file_predelete', $file);