From 1039ba4bdf562783f19ac3ed551011f5cfe7200a Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 12 Sep 2015 22:09:19 +0200 Subject: havp - fix template paths --- config/havp/havp.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'config/havp') diff --git a/config/havp/havp.inc b/config/havp/havp.inc index 38412f31..30b06d03 100644 --- a/config/havp/havp.inc +++ b/config/havp/havp.inc @@ -87,9 +87,13 @@ define('HVDEF_PID_FILE', '/var/run/havp.pid'); $pf_version=substr(trim(file_get_contents("/etc/version")), 0, 3); if ($pf_version == "2.1" || $pf_version == "2.2") { - define("HVDEF_WORK_DIR", "/usr/pbi/havp-" . php_uname("m") . "/local/etc"); + define("HVDEF_WORK_DIR", "/usr/pbi/havp-" . php_uname("m") . "/local/etc"); + define('HVDEF_TEMPLATES', "/usr/pbi/havp-" . php_uname("m") . "/local/share/examples/havp/templates"); + define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex'); } else { - define("HVDEF_WORK_DIR", "/usr/local/etc/havp"); + define("HVDEF_WORK_DIR", "/usr/local/etc/havp"); + define('HVDEF_TEMPLATES', '/usr/local/share/examples/havp/templates'); + define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex'); } define('HVDEF_LOG_DIR', '/var/log/havp'); @@ -97,8 +101,6 @@ define('HVDEF_TEMP_DIR', '/var/tmp'); define('HVDEF_HAVPTEMP_DIR', HVDEF_TEMP_DIR . '/havp'); define('HVDEF_RAMTEMP_DIR', HVDEF_TEMP_DIR . '/havpRAM'); define('HVDEF_SCANTEMPFILE', '/havp-XXXXXX'); -define('HVDEF_TEMPLATES', '/usr/local/share/examples/havp/templates'); -define('HVDEF_TEMPLATES_EX', HVDEF_TEMPLATES . '_ex'); define('HVDEF_FILTER_RULES', '/tmp/rules.havp'); define('HVDEF_HAVP_CONFIG', HVDEF_WORK_DIR . '/havp.config'); define('HVDEF_HAVP_XMLCONF', HVDEF_WORK_DIR . '/havp_conf.xml'); @@ -628,7 +630,7 @@ function havp_convert_pfxml_xml() { $havp_config[F_PROXYBINDIFACE] = 'localhost'; /* Language template files path */ $lng = $havp_config[F_LANGUAGE] ? $havp_config[F_LANGUAGE] : "en"; - $havp_config[F_TEMPLATEPATH] = (file_exists(HVDEF_TEMPLATES_EX . "/$lng") ? HVDEF_TEMPLATES_EX : HVDEF_TEMPLATES ); + $havp_config[F_TEMPLATEPATH] = (file_exists(HVDEF_TEMPLATES . "/$lng") ? HVDEF_TEMPLATES : HVDEF_TEMPLATES_EX ); $havp_config[F_TEMPLATEPATH] .= "/$lng"; /* AV settings */ $pf_avset_conf = $config['installedpackages'][HVFORM_AVSET]['config'][0]; -- cgit v1.2.3