Skip to content

Commit

Permalink
Issue #58: apply Pantheon settings so they can be used by settings_get
Browse files Browse the repository at this point in the history
  • Loading branch information
herbdool committed Mar 28, 2022
1 parent eb0cdbd commit 5d33f16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,5 +473,9 @@
* directly from Pantheon to Backdrop.
*/
if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
$_SERVER['BACKDROP_SETTINGS'] = $_SERVER['PRESSFLOW_SETTINGS'];
$pressflow_settings = json_decode($_SERVER['PRESSFLOW_SETTINGS'], TRUE);
// Apply the Pantheon settings to the Backdrop settings global.
// Note: it will not override any settings set previously.
$pressflow_settings['settings'] = $settings + $pressflow_settings['conf'];
$_SERVER['BACKDROP_SETTINGS'] = json_encode($pressflow_settings);
}

0 comments on commit 5d33f16

Please sign in to comment.