From: hickert Date: Thu, 6 Oct 2005 11:08:54 +0000 (+0000) Subject: Added repository functions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1b8787716dcd87bbe12ada45f7be59b997d9c996;p=gosa.git Added repository functions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1506 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 1688637e1..7be3e011b 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -11,10 +11,10 @@ class faiPackage extends plugin var $ignore_account = TRUE; /* Attributes for this Object */ - var $attributes = array("cn","description","FAIpackage","section","mirror","release"); + var $attributes = array("cn","description","FAIpackage","FAIdebianSection","FAIdebianRelease","FAIdebianMirror"); /* ObjectClasses for this Object*/ - var $objectclasses = array("top","FAIclass","FAIpackageList"); + var $objectclasses = array("top","FAIclass","FAIpackageList","FAIrepository"); /* Class name of the Ldap ObjectClass for the Sub Object */ var $subClass = ""; @@ -34,9 +34,9 @@ class faiPackage extends plugin var $dialog = NULL; // a dialog, e.g. new disk dialog var $SubObjects = array(); // All leafobjects of this object - var $section = ""; // The selected section - var $release = ""; // selected release - var $mirror = ""; // selected mirror + var $FAIdebianSection = ""; // The selected section + var $FAIdebianRelease = ""; // selected release + var $FAIdebianMirror = ""; // selected mirror var $servers = array(); // All available servers var $sections = array(); // All possible sections @@ -61,10 +61,10 @@ class faiPackage extends plugin unset($this->attrs['FAIpackage']['count']); foreach($this->attrs['FAIpackage'] as $pkg){ - $this->usedPackages[] = $pkg; + $this->usedPackages[$pkg] = $pkg; } $this->confDir = CONFIG_DIR."/fai/"; - $this->FAIpackage = "test"; + $this->FAIpackage = array(); } function execute() @@ -82,7 +82,7 @@ class faiPackage extends plugin $availableServer = array(); foreach($this->mirrors as $mir){ - if(($mir['section'] == $this->section)&&($mir['release']==$this->release)){ + if(($mir['section'] == $this->FAIdebianSection)&&($mir['release']==$this->FAIdebianRelease)){ $availableServer[$mir['mirror']]=$mir['mirror']; } } @@ -117,11 +117,11 @@ class faiPackage extends plugin $smarty->assign("mirrors" ,$availableServer); - $smarty->assign("mirror" ,$this->mirror); + $smarty->assign("mirror" ,$this->FAIdebianMirror); $smarty->assign("sections",$this->sections); - $smarty->assign("section" ,$this->section); + $smarty->assign("section" ,$this->FAIdebianSection); $smarty->assign("releases",$this->releases); - $smarty->assign("release" ,$this->release); + $smarty->assign("release" ,$this->FAIdebianRelease); $smarty->assign("usedPackages",$this->printUsedPackages()); $display.= $smarty->fetch(get_template_path('faiPackage.tpl', TRUE)); return($display); @@ -244,10 +244,6 @@ class faiPackage extends plugin $this->attrs['FAIpackage'][] = $pkg; } - unset($this->attrs['section']); - unset($this->attrs['mirror']); - unset($this->attrs['release']); - $ldap->cat($this->dn); if($ldap->count()!=0){ /* Write FAIscript to ldap*/ diff --git a/plugins/admin/fai/faiPackage.tpl b/plugins/admin/fai/faiPackage.tpl index 885690152..cb6482034 100644 --- a/plugins/admin/fai/faiPackage.tpl +++ b/plugins/admin/fai/faiPackage.tpl @@ -35,7 +35,7 @@ - {html_options options=$sections selected=$section} @@ -48,7 +48,7 @@ - {html_options options=$releases selected=$release} @@ -61,7 +61,7 @@ - {html_options options=$mirrors selected=$mirror}