Commit 223154d5 authored by Jon Pugh's avatar Jon Pugh

Issue #3016995: Make file directories first class context properties

parent 7beeef7d
......@@ -138,8 +138,8 @@ if (isset($_SERVER['db_name'])) {
global $conf;
$conf['install_profile'] = '<?php print $this->profile ?>';
$conf['file_directory_path'] = 'sites/<?php print $this->uri ?>/files';
$conf['file_directory_temp'] = 'sites/<?php print $this->uri ?>/private/temp';
$conf['file_directory_path'] = '<?php print $this->file_public_path ?>';
$conf['file_directory_temp'] = '<?php print $this->file_temporary_path ?>;
$conf['clean_url'] = 1;
$conf['aegir_api'] = <?php print $this->api_version ? $this->api_version : 0 ?>;
$conf['allow_authorize_operations'] = FALSE;
......
......@@ -138,9 +138,9 @@ if (isset($_SERVER['db_name'])) {
global $conf;
$conf['install_profile'] = '<?php print $this->profile ?>';
$conf['file_public_path'] = 'sites/<?php print $this->uri ?>/files';
$conf['file_private_path'] = 'sites/<?php print $this->uri ?>/private/files';
$conf['file_temporary_path'] = 'sites/<?php print $this->uri ?>/private/temp';
$conf['file_public_path'] = '<?php print $this->file_public_path ?>';
$conf['file_private_path'] = '<?php print $this->file_private_path ?>';
$conf['file_temporary_path'] = '<?php print $this->file_temporary_path ?>';
$drupal_hash_salt = '';
$conf['clean_url'] = 1;
$conf['aegir_api'] = <?php print $this->api_version ? $this->api_version : 0 ?>;
......
......@@ -134,9 +134,9 @@ if (isset($_SERVER['db_name'])) {
umask(0002);
$settings['install_profile'] = '<?php print $this->profile ?>';
$settings['file_public_path'] = 'sites/<?php print $this->uri ?>/files';
$settings['file_private_path'] = 'sites/<?php print $this->uri ?>/private/files';
$config['system.file']['path']['temporary'] = 'sites/<?php print $this->uri ?>/private/temp';
$settings['file_public_path'] = '<?php print $this->file_public_path ?>';
$settings['file_private_path'] = '<?php print $this->file_private_path ?>';
$config['system.file']['path']['temporary'] = '<?php print $this->file_temporary_path ?>';
$config_directories[CONFIG_SYNC_DIRECTORY] = 'sites/<?php print $this->uri ?>/private/config/sync';
$settings['hash_salt'] = '<?php print $drupal_hash_salt_var ?>';
$settings['aegir_api'] = <?php print $this->api_version ? $this->api_version : 0 ?>;
......
......@@ -12,6 +12,9 @@ class Provision_Context_site extends Provision_Context {
'platform' => 'site: the platform the site is run on',
'db_server' => 'site: the db server the site is run on',
'uri' => 'site: example.com URI, no http:// or trailing /',
'file_public_path' => 'site: path to public files folder. Defaults to sites/example.com/files',
'file_private_path' => 'site: path to private files folder. Defaults to sites/example.com/private/files',
'file_temporary_path' => 'site: path to temporary files folder. Defaults to sites/example.com/private/temp',
'language' => 'site: site language; default en',
'aliases' => 'site: comma-separated URIs',
'redirection' => 'site: boolean for whether --aliases should redirect; default false',
......@@ -42,6 +45,9 @@ class Provision_Context_site extends Provision_Context {
// this can potentially be handled by a Drupal sub class
$this->setProperty('profile', 'standard');
$this->setProperty('install_method', 'profile');
$this->setProperty('file_public_path', 'sites/' . $this->uri . '/files');
$this->setProperty('file_private_path', 'sites/' . $this->uri . '/private/files');
$this->setProperty('file_temporary_path', 'sites/' . $this->uri . '/private/temp');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment