Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
provision
Commits
e3c4a3d4
Commit
e3c4a3d4
authored
Sep 30, 2019
by
Jon Pugh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '7.x-3.x' of git.drupal.org:project/provision into 2960237-sync-alter
parents
6bed7757
a902fff3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
61 deletions
+29
-61
Provision/Config/Drupal/Services.php
Provision/Config/Drupal/Services.php
+0
-34
Provision/Config/Drupal/aegir.services.tpl.php
Provision/Config/Drupal/aegir.services.tpl.php
+0
-9
Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
+0
-1
platform/install.provision.inc
platform/install.provision.inc
+18
-11
platform/provision_drupal.drush.inc
platform/provision_drupal.drush.inc
+2
-6
platform/verify.provision.inc
platform/verify.provision.inc
+9
-0
No files found.
Provision/Config/Drupal/Services.php
deleted
100644 → 0
View file @
6bed7757
<?php
/**
* @file
* Provides the Provision_Config_Drupal_Services class.
*/
class
Provision_Config_Drupal_Services
extends
Provision_Config
{
public
$template
=
'aegir.services.tpl.php'
;
public
$description
=
'Drupal aegir.services.yml file'
;
protected
$mode
=
0440
;
function
filename
()
{
return
$this
->
site_path
.
'/aegir.services.yml'
;
}
function
process
()
{
$this
->
version
=
provision_version
();
$this
->
cookie_domain
=
$this
->
getCookieDomain
();
$this
->
group
=
$this
->
platform
->
server
->
web_group
;
}
/**
* Extract our cookie domain from the URI.
*/
protected
function
getCookieDomain
()
{
$uri
=
explode
(
'.'
,
$this
->
uri
);
# Leave base domain; only strip out subdomains.
if
(
count
(
$uri
)
>
2
)
{
$uri
[
0
]
=
''
;
}
return
implode
(
'.'
,
$uri
);
}
}
Provision/Config/Drupal/aegir.services.tpl.php
deleted
100644 → 0
View file @
6bed7757
---
# This file was automatically generated by Aegir
<?php
print
$this
->
version
;
?>
# on
<?php
print
date
(
'r'
);
?>
.
parameters:
session.storage.options:
cookie_domain: '
<?php
print
$this
->
cookie_domain
;
?>
'
Provision/Config/Drupal/provision_drupal_settings_8.tpl.php
View file @
e3c4a3d4
...
...
@@ -160,7 +160,6 @@ if (isset($_SERVER['db_name'])) {
/**
* Load services definition file.
*/
$settings['container_yamls'][] = __DIR__ . '/aegir.services.yml';
$settings['container_yamls'][] = __DIR__ . '/services.yml';
/**
...
...
platform/install.provision.inc
View file @
e3c4a3d4
...
...
@@ -25,6 +25,10 @@ function drush_provision_drupal_provision_install_validate() {
drush_log
(
dt
(
'Forcing reinstall...'
),
'ok'
);
// Drop the database if we can figure out what it is.
// If last install failed, the database and the site folder is deleted.
if
(
file_exists
(
d
()
->
site_path
.
'/drushrc.php'
))
{
// Load the current database name from drushrc.php.
// I cannot find another way to find the current db_name!
require_once
(
d
()
->
site_path
.
'/drushrc.php'
);
...
...
@@ -36,6 +40,7 @@ function drush_provision_drupal_provision_install_validate() {
'@database'
=>
$old_db_name
,
)),
'ok'
);
}
}
// Destroy site_path.
if
(
file_exists
(
d
()
->
site_path
))
{
...
...
@@ -46,7 +51,9 @@ function drush_provision_drupal_provision_install_validate() {
// Check again if site does not exist after the forced reinstall.
if
(
_provision_drupal_site_exists
())
{
return
drush_set_error
(
'PROVISION_SITE_INSTALLED'
);
return
drush_set_error
(
'PROVISION_SITE_INSTALLED'
,
dt
(
'The file !file still exists. Provision was unable to delete it.'
,
array
(
'!file'
=>
d
()
->
site_path
.
'/settings.php'
,
)));
}
}
}
...
...
platform/provision_drupal.drush.inc
View file @
e3c4a3d4
...
...
@@ -170,12 +170,8 @@ function provision_drupal_fetch_site($alias = NULL) {
* Generate a settings file for the site.
*/
function
_provision_drupal_create_settings_file
()
{
$name
=
d
()
->
name
;
$context
=
drush_get_context
(
'site'
);
$settings
=
new
Provision_Config_Drupal_Settings
(
$name
,
$context
);
$settings
->
write
();
$services
=
new
Provision_Config_Drupal_Services
(
$name
,
$context
);
$services
->
write
();
$config
=
new
Provision_Config_Drupal_Settings
(
d
()
->
name
,
drush_get_context
(
'site'
));
$config
->
write
();
}
/**
...
...
platform/verify.provision.inc
View file @
e3c4a3d4
...
...
@@ -178,5 +178,14 @@ function drush_provision_drupal_post_provision_verify() {
_provision_client_create_symlink
();
drush_include_engine
(
'drupal'
,
'cron_key'
);
# Cleanup useless `aegir.services.yml` files.
# See: https://www.drupal.org/project/provision/issues/3066538
$path
=
d
()
->
site_path
.
'/aegir.services.yml'
;
if
(
provision_file
()
->
exists
(
$path
)
->
status
())
{
provision_file
()
->
unlink
(
$path
)
->
succeed
(
'Cleaned up unused Aegir services.yml file.'
)
->
fail
(
'Failed to clean up unused Aegir services.yml file.'
,
'PROVISION_DELETE_AEGIR_SERVICES_YML_FAILED'
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment