diff options
author | mh <mh@immerda.ch> | 2011-10-08 19:22:40 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-10-08 19:22:40 +0200 |
commit | 2fa748dcc92e34b13bd4b6f7e452ef89b29490c4 (patch) | |
tree | f3827bd2c8cc3206b4f2a5a8a09b4951940d6cc4 /templates/vhosts/partials/php_settings.erb | |
parent | 24c047d1cfc54c003eef7445e177e28f373c1da4 (diff) |
introduce a new template style, less duplicated things, more handy options
Diffstat (limited to 'templates/vhosts/partials/php_settings.erb')
-rw-r--r-- | templates/vhosts/partials/php_settings.erb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/vhosts/partials/php_settings.erb b/templates/vhosts/partials/php_settings.erb index be4662a..8d4fec4 100644 --- a/templates/vhosts/partials/php_settings.erb +++ b/templates/vhosts/partials/php_settings.erb @@ -1,7 +1,17 @@ -<% php_settings.each do |key,value| -%> -<% if ['on','off' ].include?(value.downcase) -%> - php_admin_flag <%= key %> <%= value %> +<% php_settings.each do |key,value| + dvalue = value.to_s.downcase + munged_value = if dvalue == 'true' + 'on' + elsif dvalue == 'false' + 'off' + elsif ['on','off'].include?(dvalue) + dvalue + else + value + end + if ['on','off' ].include?(munged_value) -%> + php_admin_flag <%= key %> <%= munged_value %> <% else -%> - php_admin_value <%= key %> <%= value %> + php_admin_value <%= key %> <%= munged_value %> <% end -%> <% end -%>
\ No newline at end of file |