summaryrefslogtreecommitdiff
path: root/manifests/vhost/php
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vhost/php')
-rw-r--r--manifests/vhost/php/gallery2.pp2
-rw-r--r--manifests/vhost/php/standard.pp51
-rw-r--r--manifests/vhost/php/typo3.pp2
3 files changed, 26 insertions, 29 deletions
diff --git a/manifests/vhost/php/gallery2.pp b/manifests/vhost/php/gallery2.pp
index 097e311..2a5266c 100644
--- a/manifests/vhost/php/gallery2.pp
+++ b/manifests/vhost/php/gallery2.pp
@@ -139,7 +139,7 @@ define apache::vhost::php::gallery2(
$gallery_php_settings[open_basedir] = "${documentroot}:${php_settings[upload_tmp_dir]}:${php_settings['session.save_path']}:${gdatadir}"
}
- $real_php_settings = hash_merge($gallery_php_settings,$php_settings)
+ $real_php_settings = merge($gallery_php_settings,$php_settings)
# create vhost configuration file
::apache::vhost::php::webapp{$name:
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 063c8e6..63aed57 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -106,16 +106,16 @@ define apache::vhost::php::standard(
smarty => false,
pear => false,
}
- $real_php_options = hash_merge($std_php_options,$php_options)
+ $real_php_options = merge($std_php_options,$php_options)
- if $real_php_options[smarty] {
+ if has_key($real_php_options,'smarty') {
include php::extensions::smarty
$smarty_path = '/usr/share/php/Smarty/:'
} else {
$smarty_path = ''
}
- if $real_php_options[pear] {
+ if has_key($real_php_options,'pear') {
$pear_path = '/usr/share/pear/:'
} else {
$pear_path = ''
@@ -130,26 +130,25 @@ define apache::vhost::php::standard(
safe_mode => 'On',
}
- case $php_settings[safe_mode_exec_bin_dir] {
- '',undef: {
- $php_safe_mode_exec_bin_dir = $path ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/var/www/htdocs/${name}/bin",
- default => "/var/www/vhosts/${name}/bin"
- },
- default => "${path}/bin"
- }
+ if has_key($php_settings,'safe_mode_exec_dir') {
+ $php_safe_mode_exec_dir = $php_settings[safe_mode_exec_dir]
+ } else {
+ $php_safe_mode_exec_dir = $path ? {
+ 'absent' => $operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}/bin",
+ default => "/var/www/vhosts/${name}/bin"
+ },
+ default => "${path}/bin"
}
- default: { $php_safe_mode_exec_bin_dir = $php_settings[safe_mode_exec_bin_dir] }
}
- file{$php_safe_mode_exec_bin_dir:
+ file{$php_safe_mode_exec_dir:
recurse => true,
force => true,
purge => true,
}
- if $php_options[safe_mode_exec_bins] {
- $std_php_settings[safe_mode_exec_dir] = $php_safe_mode_exec_bin_dir
- File[$php_safe_mode_exec_bin_dir]{
+ if has_key($php_options,'safe_mode_exec_bins') {
+ $std_php_settings[safe_mode_exec_dir] = $php_safe_mode_exec_dir
+ File[$php_safe_mode_exec_dir]{
ensure => $ensure ? {
'present' => directory,
default => absent,
@@ -159,26 +158,24 @@ define apache::vhost::php::standard(
$php_safe_mode_exec_bins_subst = regsubst($php_options[safe_mode_exec_bins],"(.+)","${name}@\\1")
apache::vhost::php::safe_mode_bin{ $php_safe_mode_exec_bins_subst:
ensure => $ensure,
- path => $php_safe_mode_exec_bin_dir
+ path => $php_safe_mode_exec_dir
}
}else{
- File[$php_safe_mode_exec_bin_dir]{
+ File[$php_safe_mode_exec_dir]{
ensure => absent,
}
}
- case $php_settings[default_charset] {
- '',undef: {
- if $default_charset != 'absent' {
- $std_php_settings[default_charset] = $default_charset ? {
- 'On' => 'iso-8859-1',
- default => $default_charset
- }
+ if !has_key($php_settings,'default_charset') {
+ if $default_charset != 'absent' {
+ $std_php_settings[default_charset] = $default_charset ? {
+ 'On' => 'iso-8859-1',
+ default => $default_charset
}
}
}
- $real_php_settings = hash_merge($std_php_settings,$php_settings)
+ $real_php_settings = merge($std_php_settings,$php_settings)
::apache::vhost::phpdirs{"${name}":
ensure => $ensure,
diff --git a/manifests/vhost/php/typo3.pp b/manifests/vhost/php/typo3.pp
index b12b6c1..a5f931c 100644
--- a/manifests/vhost/php/typo3.pp
+++ b/manifests/vhost/php/typo3.pp
@@ -85,7 +85,7 @@ define apache::vhost::php::typo3(
# turn allow_url_fopen on for the extension manager fetch
allow_url_fopen => 'On'
}
- $real_php_settings = hash_merge($typo3_php_settings,$php_settings)
+ $real_php_settings = merge($typo3_php_settings,$php_settings)
# create vhost configuration file
::apache::vhost::php::webapp{$name: