From e8d0656454ab4cb86a8d48e522ef8840c6ba83b9 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 27 Feb 2008 10:52:43 +0000 Subject: [PATCH] Updated class cache generation to work with the target location git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9165 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/debian/rules | 5 +++-- gosa-core/update-gosa | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gosa-core/debian/rules b/gosa-core/debian/rules index d9683996d..db79e19f3 100755 --- a/gosa-core/debian/rules +++ b/gosa-core/debian/rules @@ -112,8 +112,9 @@ install-stamp: sed -i "s%require(\"smarty/Smarty.class.php\");%require(\"${SMARTY_LOCATION}/Smarty.class.php\");%g" debian/gosa/usr/share/gosa/include/php_setup.inc # Configure update location - sed -i 's%include/class_location.inc%/etc/gosa/classes%g' debian/gosa/usr/sbin/update-gosa - sed -i 's%$class_mapping= get_classes();%$class_mapping= get_classes("/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%^define.*__FILE__.*%define ("GOSA_HOME", "/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%GOSA_HOME.*include/class_location.inc%"/etc/gosa/classes%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%class_mapping= get_classes();%class_mapping= get_classes("/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa sed -i 's%class_location.inc%/etc/gosa/classes%g' debian/gosa/usr/share/gosa/include/functions.inc # Fix permissions diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index 186947d5a..a4f418e1f 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -48,7 +48,11 @@ function get_classes($folder= ".") static $result= array(); if ($base_dir == ""){ - $base_dir= getcwd(); + if ($folder == "."){ + $base_dir= getcwd(); + } else { + $base_dir= $folder; + } } $currdir=getcwd(); -- 2.30.2