Decouple configuration variables from settings.php

The conf_xxxx class paramters of drupal class refactored now
to conf variable that can hold the key-value pairs. So it
will allow the define additional parameters without any change
required in the drupal:: class.

The conf_xxx parameters kept only for compatibility reason, will be
removed in a future release.

Change-Id: I9e77d609bc6aaa3a5e10f065e79aa8a86cae151e
This commit is contained in:
Marton Kiss 2015-02-03 14:06:53 +01:00
parent fd00174e69
commit 0d8c23c4f7
2 changed files with 11 additions and 1 deletions

View File

@ -49,6 +49,7 @@
# - mysql_host: host of mysql server (default: localhost)
#
# Drupal configuration variables:
# - conf: contains the key-value pairs of settings.php
# - conf_cron_key: cron_key setting used for cron access
#
# Remarks:
@ -84,6 +85,7 @@ class drupal (
$site_ssl_chain_file = '',
$package_repository = undef,
$package_branch = undef,
$conf = undef,
$conf_cron_key = undef,
$conf_markdown_directory = undef,
$conf_ga_account = undef,

View File

@ -6,6 +6,7 @@
*
*/
<%# This part will be removed from next release together with conf_xxxx variables %>
<% if @conf_cron_key %>
$conf['cron_key'] = '<%= @conf_cron_key %>';
<% end %>
@ -17,4 +18,11 @@ $conf['googleanalytics_account'] = '<%= @conf_ga_account %>';
<% end %>
<% if @conf_openid_provider %>
$conf['groups_openid_provider'] = '<%= @conf_openid_provider %>';
<% end %>
<% end %>
<%# Build configuration from conf parameter %>
<% if @conf %>
<% @conf.each do |key, value| -%>
$conf['<%= key %>'] = '<%= value %>';
<% end -%>
<% end %>