Commit f699554a authored by gdd's avatar gdd

Trying to actually create the directory

parent bef078cf
...@@ -970,11 +970,18 @@ function install_settings_form_submit($form, &$form_state) { ...@@ -970,11 +970,18 @@ function install_settings_form_submit($form, &$form_state) {
); );
// This duplicates drupal_get_token() because that function relies on a // This duplicates drupal_get_token() because that function relies on a
// global hash salt which hasn't been set yet. // global hash salt which hasn't been set yet.
$settings['drupal_config_directory'] = array( $settings['drupal_config_directory_name'] = array(
'value' => 'config_' . drupal_hmac_base64($value, session_id() . drupal_get_private_key() . $settings['drupal_hash_salt']['value']), 'value' => 'config_' . drupal_hmac_base64($value, session_id() . drupal_get_private_key() . $settings['drupal_hash_salt']['value']),
'required' => TRUE, 'required' => TRUE,
); );
drupal_rewrite_settings($settings); drupal_rewrite_settings($settings);
// Actually create the config directory named above.
if (!file_prepare_directory(conf_path() . '/files/' . $settings['drupal_config_directory_name'], FILE_CREATE_DIRECTORY)) {
// How best to handle errors here?
// Will also want to create a default .htaccess for this dir to block
// reading of json, xml, yaml, ini, others?
};
// Indicate that the settings file has been verified, and check the database // Indicate that the settings file has been verified, and check the database
// for the last completed task, now that we have a valid connection. This // for the last completed task, now that we have a valid connection. This
// last step is important since we want to trigger an error if the new // last step is important since we want to trigger an error if the new
......
...@@ -215,16 +215,17 @@ ...@@ -215,16 +215,17 @@
* Location of the site configuration files. * Location of the site configuration files.
* *
* By default, Drupal configuration files are stored in a randomly named * By default, Drupal configuration files are stored in a randomly named
* directory under the default public files path etc. * directory under the default public files path. On install the
* named directory is created in the default files directory. For enhanced
* security, you may set this variable to a location outside your docroot.
* *
* For enhanced security, you may set this variable to a location * @todo flesh this out, provide more details, etc.
* outside your docroot.
* *
* Example: * Example:
* $drupal_config_directory = '/some/directory/outside/webroot'; * $drupal_config_directory_name = '/some/directory/outside/webroot';
* *
*/ */
$drupal_config_directory = ''; $drupal_config_directory_name = '';
/** /**
* Base URL (optional). * Base URL (optional).
......
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