Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision
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
provision
Commits
c113ad6e
Commit
c113ad6e
authored
May 25, 2017
by
git
Committed by
Herman van Rink
May 25, 2017
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2879243
by kfolsom: Suppressing Creation of a Site 'local.settings.php' File
parent
83eaae98
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Provision/Config/Drupal/Settings.php
+12
-9
12 additions, 9 deletions
Provision/Config/Drupal/Settings.php
provision.api.php
+1
-0
1 addition, 0 deletions
provision.api.php
with
13 additions
and
9 deletions
Provision/Config/Drupal/Settings.php
+
12
−
9
View file @
c113ad6e
...
...
@@ -59,17 +59,19 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
$backup_file
=
drush_get_option
(
'backup_file'
);
$this
->
backup_in_progress
=
!
empty
(
$backup_file
);
// Create a blank local.settings.php file if not exists.
// Create a blank local.settings.php file if not exists
and option calls for this
.
$local_settings
=
$this
->
site_path
.
'/local.settings.php'
;
$local_settings_blank
=
"<?php # local settings.php
\n
"
;
$local_description
=
'Drupal local.settings.php file'
;
if
(
!
provision_file
()
->
exists
(
$local_settings
)
->
status
())
{
if
(
!
provision_file
()
->
exists
(
$local_settings
)
->
status
()
&&
drush_get_option
(
'provision_create_local_settings_file'
,
TRUE
))
{
provision_file
()
->
file_put_contents
(
$local_settings
,
$local_settings_blank
)
->
succeed
(
'Generated blank '
.
$local_description
)
->
fail
(
'Could not generate '
.
$local_description
);
}
// Set permissions on local.settings.php.
// Set permissions on local.settings.php, if it exists.
if
(
provision_file
()
->
exists
(
$local_settings
)
->
status
())
{
provision_file
()
->
chgrp
(
$local_settings
,
$this
->
group
)
->
succeed
(
'Changed group ownership of <code>@path</code> to @gid'
)
->
fail
(
'Could not change group ownership of <code>@path</code> to @gid'
);
...
...
@@ -78,3 +80,4 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
->
fail
(
'Could not change permissions of <code>@path</code> to @perm'
);
}
}
}
This diff is collapsed.
Click to expand it.
provision.api.php
+
1
−
0
View file @
c113ad6e
...
...
@@ -23,6 +23,7 @@
* WARNING: After turning this on you need to re-verify all your sites, then then servers,
* and then cleanup the old configfiles (those without the .conf suffix).
*
* provision_create_local_settings_file - Create a site 'local.settings.php' file if one isn't found, default TRUE.
*/
/**
...
...
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