From e3cc7d9cb4d3de668940be960fc97370d47e699d Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 24 Nov 2005 14:29:24 +0000 Subject: [PATCH] Fixed debconf loading git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2049 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_debconfTemplate.inc | 2 +- plugins/admin/fai/class_faiPackage.inc | 2 +- .../admin/fai/class_faiPackageConfiguration.inc | 14 ++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/class_debconfTemplate.inc b/include/class_debconfTemplate.inc index 001f56273..76ee78176 100644 --- a/include/class_debconfTemplate.inc +++ b/include/class_debconfTemplate.inc @@ -5,7 +5,7 @@ class debconf var $package= ""; var $language= ""; var $has_template= FALSE; - var $template_directory= "/var/lib/dpkg/info"; + var $template_directory= ""; var $template= array(); diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 6eb8a52c5..53d6b3d87 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -237,7 +237,7 @@ class faiPackage extends plugin /* Configuration dialog open*/ if((isset($_POST['Conpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){ - $path = "/etc/gosa/fai/".preg_replace("#^[^/]+//([^/]+).*$#","\\1",$this->FAIdebianMirror)."/".$this->FAIdebianRelease."/".$sec; + $path = "/etc/gosa/fai/".preg_replace("#^[^/]+//([^/]+).*$#","\\1",$this->FAIdebianMirror)."/".$this->FAIdebianRelease."/debconf.d"; $pkg_config = array(); if(isset($this->ConfiguredPackages[$_POST['usedPackages']])){ $pkg_config = $this->ConfiguredPackages[$_POST['usedPackages']]; diff --git a/plugins/admin/fai/class_faiPackageConfiguration.inc b/plugins/admin/fai/class_faiPackageConfiguration.inc index b28155693..55077c67b 100644 --- a/plugins/admin/fai/class_faiPackageConfiguration.inc +++ b/plugins/admin/fai/class_faiPackageConfiguration.inc @@ -12,8 +12,6 @@ class faiPackageConfiguration extends plugin var $attributes = array(); var $objectclasses = array(); - var $path; - var $Debconf_handle = NULL; var $pkg_config ; var $obj; @@ -22,8 +20,10 @@ class faiPackageConfiguration extends plugin { plugin::plugin ($config, $dn); $this->obj = $obj; - $this->Debconf_handle = new debconf($this->obj, "de"); - $this->Debconf_handle->set_template_directory($this->path); + $this->Debconf_handle = new debconf(); + $this->Debconf_handle->set_template_directory($path); + $this->Debconf_handle->set_package($this->obj); + $this->Debconf_handle->set_language(preg_replace('/_.*$/', '', get_browser_language())); $this->pkg_config = $pkg_config; foreach($this->pkg_config as $var){ @@ -41,7 +41,7 @@ class faiPackageConfiguration extends plugin $display = ""; $smarty->assign("headline", sprintf(_("Debconf information for package '%s'"), $this->obj)); - $this->Debconf_handle -> PostCheck(); + $this->Debconf_handle->PostCheck(); $smarty->assign("Config",$this->Debconf_handle->get_dialog()); @@ -63,9 +63,7 @@ class faiPackageConfiguration extends plugin function save() { - $this->Debconf_handle->set_template_directory($this->path); - - $this->Debconf_handle -> PostCheck(); + $this->Debconf_handle->PostCheck(); $pkgs = $this->Debconf_handle->template; $tmp = array(); -- 2.30.2