Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Upstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASC IRIS Web Services
Drupal Upstream
Commits
4e24f602
Commit
4e24f602
authored
6 years ago
by
bcweaver
Browse files
Options
Downloads
Patches
Plain Diff
Create config sync folder if it doesn't exist
parent
8030161a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/sites/default/settings.php
+23
-15
23 additions, 15 deletions
web/sites/default/settings.php
with
23 additions
and
15 deletions
web/sites/default/settings.php
+
23
−
15
View file @
4e24f602
...
...
@@ -19,25 +19,33 @@
/**
* Place the config directory outside of the Drupal root.
*/
if
(
!
empty
(
$_ENV
[
'FILEMOUNT'
]))
{
error_log
(
"Config sync dir: _ENV[FILEMOUNT] exists, using it."
);
$config_directories
=
array
(
CONFIG_SYNC_DIRECTORY
=>
DRUPAL_ROOT
.
'/'
.
$_ENV
[
'FILEMOUNT'
]
.
'/private/config'
,
);
if
(
is_dir
(
$_ENV
[
'HOME'
]
.
'/files/private/config'
))
{
// error_log("Config sync dir: _ENV[HOME]/files/private/config exists, using this.");
$config_sync_dir
=
$_ENV
[
'HOME'
]
.
'/files/private/config'
;
}
else
if
(
is_dir
(
$_ENV
[
'HOME'
]
.
'/files/private/config'
))
{
error_log
(
"Config sync dir: _ENV[HOME]/files/private/config exists, using this."
);
$config_directories
=
array
(
CONFIG_SYNC_DIRECTORY
=>
$_ENV
[
'HOME'
]
.
'/files/private/config'
,
);
else
if
(
!
empty
(
$_ENV
[
'FILEMOUNT'
]))
{
// error_log("Config sync dir: _ENV[FILEMOUNT] exists, using it.");
$config_sync_dir
=
DRUPAL_ROOT
.
'/'
.
$_ENV
[
'FILEMOUNT'
]
.
'/private/config'
;
}
else
{
error_log
(
"Config sync dir: fell through to default."
);
$config_directories
=
array
(
CONFIG_SYNC_DIRECTORY
=>
DRUPAL_ROOT
.
'/sites/default/files/private/config'
,
);
// error_log("Config sync dir: fell through to default.");
$config_sync_dir
=
DRUPAL_ROOT
.
'/sites/default/files/private/config'
;
}
error_log
(
"Config sync dir: "
.
$config_directories
[
CONFIG_SYNC_DIRECTORY
]);
// error_log("Config sync dir: $config_sync_dir");
if
(
!
is_dir
(
$config_sync_dir
))
{
error_log
(
"Config sync dir '
$config_sync_dir
' doesn't exist, attempting to create it."
);
if
(
mkdir
(
$config_sync_dir
,
0700
,
true
))
{
error_log
(
"
$config_sync_dir
created"
);
}
else
{
error_log
(
"Failed to create
$config_sync_dir
"
);
}
}
$config_directories
=
array
(
CONFIG_SYNC_DIRECTORY
=>
$config_sync_dir
,
);
/**
* If there is a local settings file, then include it
*/
...
...
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