Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #34 set temporary path #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,20 @@
* Override the database information to pass the correct Database credentials
* directly from Pantheon to Backdrop.
*/
if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
$_SERVER['BACKDROP_SETTINGS'] = $_SERVER['PRESSFLOW_SETTINGS'];
if (isset($_ENV['PANTHEON_ENVIRONMENT'])) {
if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
$pressflow_settings = json_decode($_SERVER['PRESSFLOW_SETTINGS'], TRUE);
$pressflow_settings['settings'] = $pressflow_settings['conf'];
$_SERVER['PRESSFLOW_SETTINGS'] = json_encode($pressflow_settings);
$_SERVER['BACKDROP_SETTINGS'] = $_SERVER['PRESSFLOW_SETTINGS'];

// Define appropriate location for tmp directory.
$config['system.core']['file_temporary_path'] = $pressflow_settings['settings']['file_temporary_path'];

// Define appropriate location for public file directory.
$config['system.core']['file_public_path'] = $pressflow_settings['settings']['file_public_path'];

// Define appropriate location for private files directory. (Optional)
// $config['system.core']['file_private_path'] = $pressflow_settings['settings']['file_private_path'];
}
}