diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 2 | ||||
-rw-r--r-- | includes/file.inc | 7 | ||||
-rw-r--r-- | includes/stream_wrappers.inc | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 5aff8f11c..b1ed5ada2 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -19,7 +19,7 @@ define('DRUPAL_CORE_COMPATIBILITY', '7.x'); /** * Minimum supported version of PHP. */ -define('DRUPAL_MINIMUM_PHP', '5.2.0'); +define('DRUPAL_MINIMUM_PHP', '5.2.1'); /** * Minimum recommended value of PHP memory_limit. diff --git a/includes/file.inc b/includes/file.inc index 96da7ad4e..da47b3590 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -409,7 +409,9 @@ function file_prepare_directory(&$directory, $options = FILE_MODIFY_PERMISSIONS) */ function file_ensure_htaccess() { file_create_htaccess('public://', FALSE); - file_create_htaccess('private://', TRUE); + if (variable_get('file_private_path', FALSE)) { + file_create_htaccess('private://', TRUE); + } file_create_htaccess('temporary://', TRUE); } @@ -1586,8 +1588,7 @@ function file_download() { $scheme = array_shift($args); $target = implode('/', $args); $uri = $scheme . '://' . $target; - - if (file_exists($uri)) { + if (file_stream_wrapper_valid_scheme($scheme) && file_exists($uri)) { // Let other modules provide headers and controls access to the file. $headers = module_invoke_all('file_download', $uri); if (in_array(-1, $headers)) { diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index 288c3979d..87acc5440 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -657,7 +657,7 @@ class DrupalPrivateStreamWrapper extends DrupalLocalStreamWrapper { * Implements abstract public function getDirectoryPath() */ public function getDirectoryPath() { - return variable_get('file_private_path', conf_path() . '/private/files'); + return variable_get('file_private_path', ''); } /** @@ -684,7 +684,7 @@ class DrupalTemporaryStreamWrapper extends DrupalLocalStreamWrapper { * Implements abstract public function getDirectoryPath() */ public function getDirectoryPath() { - return variable_get('file_temporary_path', conf_path() . '/private/temp'); + return variable_get('file_temporary_path', sys_get_temp_dir()); } /** |