From a6241f27938f2c09470d43c9a151a334f9923222 Mon Sep 17 00:00:00 2001 From: timdufrane Date: Tue, 13 Aug 2013 21:35:10 -0400 Subject: Fix Incorrect Directory Replacement On some installs, the directory ends up being /usr/pbi/dansguardian-xxx/... This results in include lines not being written correctly and broken config files. DANSGUARDIAN_DIR should be present on every system. --- config/dansguardian/dansguardian.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/dansguardian') diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index 39282409..d4cd94bd 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -331,7 +331,7 @@ function sync_package_dansguardian($via_rpc="no",$install_process=false) { #includes preg_replace patterns $match[0]="/(.)$/"; - $match[1]="/\/usr.local/"; + $match[1]="/\/usr.local|".str_replace("/","\\/",DANSGUARDIAN_DIR)."/"; $match[2]="/,/"; $replace[0]="$1>\n"; $replace[1]="\n.Include<".DANSGUARDIAN_DIR; @@ -1416,4 +1416,4 @@ function dansguardian_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type, } } -?> \ No newline at end of file +?> -- cgit v1.2.3