Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
f6d56f96
Commit
f6d56f96
authored
Jun 14, 2010
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#551658
by Stevel: improve directory testing.
parent
6c934509
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/file.inc
+7
-3
7 additions, 3 deletions
includes/file.inc
modules/system/system.install
+11
-1
11 additions, 1 deletion
modules/system/system.install
with
18 additions
and
4 deletions
includes/file.inc
+
7
−
3
View file @
f6d56f96
...
...
@@ -1982,7 +1982,11 @@ function file_directory_temp() {
$path_delimiter
=
'/'
;
}
// PHP may be able to find an alternative tmp directory.
// This function exists in PHP 5 >= 5.2.1, but Drupal
// requires PHP 5 >= 5.2.0, so we check for it.
if
(
function_exists
(
'sys_get_temp_dir'
))
{
$directories
[]
=
sys_get_temp_dir
();
}
foreach
(
$directories
as
$directory
)
{
if
(
is_dir
(
$directory
)
&&
is_writable
(
$directory
))
{
...
...
@@ -1991,7 +1995,7 @@ function file_directory_temp() {
}
}
// if a directory has been found, use it, otherwise default to 'files/tmp' or 'files\\tmp'
;
// if a directory has been found, use it, otherwise default to 'files/tmp' or 'files\\tmp'
.
if
(
empty
(
$temporary_directory
))
{
$temporary_directory
=
file_directory_path
()
.
$path_delimiter
.
'tmp'
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/system/system.install
+
11
−
1
View file @
f6d56f96
...
...
@@ -269,8 +269,18 @@ function system_requirements($phase) {
// By default no private files directory is configured. For private files
// to be secure the admin needs to provide a path outside the webroot.
variable_get
(
'file_private_path'
,
FALSE
),
variable_get
(
'file_temporary_path'
,
sys_get_temp_dir
()),
);
// Do not check for the temporary files directory at install time
// unless it has been set in settings.php. In this case the user has
// no alternative but to fix the directory if it is not writable.
if
(
$phase
==
'install'
)
{
$directories
[]
=
variable_get
(
'file_temporary_path'
,
FALSE
);
}
else
{
$directories
[]
=
variable_get
(
'file_temporary_path'
,
file_directory_temp
());
}
$requirements
[
'file system'
]
=
array
(
'title'
=>
$t
(
'File system'
),
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment