From: hickert Date: Thu, 6 Oct 2005 12:48:16 +0000 (+0000) Subject: Fixed mistake, thought release were section .... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86482a36b65cd3a753d50065864ae82fabe7589c;p=gosa.git Fixed mistake, thought release were section .... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1512 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index df89c0749..2e44d8c33 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -11,7 +11,7 @@ class faiPackage extends plugin var $ignore_account = TRUE; /* Attributes for this Object */ - var $attributes = array("cn","description","FAIpackage","FAIdebianSection","FAIdebianRelease","FAIdebianMirror"); + var $attributes = array("cn","description","FAIpackage","FAIdebianRelease","FAIdebianSection","FAIdebianMirror"); /* ObjectClasses for this Object*/ var $objectclasses = array("top","FAIclass","FAIpackageList","FAIrepository"); @@ -34,17 +34,17 @@ class faiPackage extends plugin var $dialog = NULL; // a dialog, e.g. new disk dialog var $SubObjects = array(); // All leafobjects of this object - var $FAIdebianSection = ""; // The selected section - var $FAIdebianRelease = ""; // selected release + var $FAIdebianRelease = ""; // The selected release + var $FAIdebianSection = ""; // selected section var $FAIdebianMirror = ""; // selected mirror var $servers = array(); // All available servers - var $sections = array(); // All possible sections - var $releases = array(); // All release types + var $releases = array(); // All possible releases + var $sections = array(); // All section types var $disableRepository = false; - var $mirrors = array(); // The combination of server/section/release + var $mirrors = array(); // The combination of server/release/section var $confDir = ""; var $usedPackages = array(); @@ -61,7 +61,7 @@ class faiPackage extends plugin $this->dn =$dn; } - if(isset($this->attrs['FAIdebianRelease'])){ + if(isset($this->attrs['FAIdebianSection'])){ $this->disableRepository=true; } @@ -92,13 +92,13 @@ class faiPackage extends plugin $availableServer = array(); foreach($this->mirrors as $mir){ - if(($mir['section'] == $this->FAIdebianSection)&&($mir['release']==$this->FAIdebianRelease)){ + if(($mir['release'] == $this->FAIdebianRelease)&&($mir['section']==$this->FAIdebianSection)){ $availableServer[$mir['mirror']]=$mir['mirror']; } } if(isset($_POST['Addpkg'])){ - $this->dialog = new faiPackageEntry($this->config, $this->dn,$this->confDir.$this->FAIdebianMirror."/".$this->FAIdebianSection."/".$this->FAIdebianRelease,$this->usedPackages); + $this->dialog = new faiPackageEntry($this->config, $this->dn,$this->confDir.$this->FAIdebianMirror."/".$this->FAIdebianRelease."/".$this->FAIdebianSection,$this->usedPackages); $this->is_dialog =true; } @@ -132,19 +132,19 @@ class faiPackage extends plugin if($this->disableRepository == true){ $smarty->assign("mirrorACL" ," disabled "); - $smarty->assign("sectionACL" ," disabled "); $smarty->assign("releaseACL" ," disabled "); + $smarty->assign("sectionACL" ," disabled "); }else{ $smarty->assign("mirrorACL" ,""); - $smarty->assign("sectionACL" ,""); $smarty->assign("releaseACL" ,""); + $smarty->assign("sectionACL" ,""); } $smarty->assign("mirrors" ,$availableServer); $smarty->assign("mirror" ,$this->FAIdebianMirror); - $smarty->assign("sections",$this->sections); - $smarty->assign("section" ,$this->FAIdebianSection); $smarty->assign("releases",$this->releases); $smarty->assign("release" ,$this->FAIdebianRelease); + $smarty->assign("sections",$this->sections); + $smarty->assign("section" ,$this->FAIdebianSection); $smarty->assign("usedPackages",$this->printUsedPackages()); $display.= $smarty->fetch(get_template_path('faiPackage.tpl', TRUE)); return($display); @@ -167,33 +167,33 @@ class faiPackage extends plugin $mirrorDir = $confDir.$mirror."/"; $fe = opendir($mirrorDir); - while($section = readdir($fe)){ - if((is_dir($mirrorDir.$section))&&(($section != "." )&&($section!=".."))){ + while($release = readdir($fe)){ + if((is_dir($mirrorDir.$release))&&(($release != "." )&&($release!=".."))){ - $sectionDir = $mirrorDir.$section."/"; + $releaseDir = $mirrorDir.$release."/"; - $ff = opendir($sectionDir); - while($release = readdir($ff)){ - if((is_file($sectionDir.$release))&&(($release != "." )&&($release!="..")&&(!preg_match("/.*\.in$/",$release)))){ + $ff = opendir($releaseDir); + while($section = readdir($ff)){ + if((is_file($releaseDir.$section))&&(($section != "." )&&($section!="..")&&(!preg_match("/.*\.in$/",$section)))){ $this->servers[$mirror]=$mirror; - $this->sections[$section]=$section; $this->releases[$release]=$release; + $this->sections[$section]=$section; if(empty($this->FAIdebianMirror)){ $this->FAIdebianMirror= $mirror; } - if(empty($this->FAIdebianSection)){ - $this->FAIdebianSection = $section; - } if(empty($this->FAIdebianRelease)){ $this->FAIdebianRelease = $release; + } + if(empty($this->FAIdebianSection)){ + $this->FAIdebianSection = $section; } $arr=array(); $arr['mirror'] = $mirror; - $arr['section']= $section; - $arr['release']= $release; + $arr['release']= $release; + $arr['section']= $section; $this->mirrors[] = $arr ; } @@ -243,7 +243,7 @@ class faiPackage extends plugin $message[]=_("Please select a least one Package."); } - if((empty($this->FAIdebianSection))||(empty($this->FAIdebianRelease))||(empty($this->FAIdebianMirror))){ + if((empty($this->FAIdebianRelease))||(empty($this->FAIdebianSection))||(empty($this->FAIdebianMirror))){ $message[]=_("Please choose a valid combination for your repository setup."); } diff --git a/plugins/admin/fai/class_faiPackageEntry.inc b/plugins/admin/fai/class_faiPackageEntry.inc index 006462389..2693af1a7 100644 --- a/plugins/admin/fai/class_faiPackageEntry.inc +++ b/plugins/admin/fai/class_faiPackageEntry.inc @@ -63,12 +63,18 @@ class faiPackageEntry extends plugin } - $CHKS = " @@ -51,7 +51,7 @@ - +
"; + $CHKS = ""; + $i = 0; foreach($this->categories as $cat => $selected){ + if($i == 3){ + $CHKS .=""; + $i = 0; + } + $i ++ ; if($selected){ - $CHKS .=" ".$cat." "; + $CHKS .=""; }else{ - $CHKS .=" ".$cat." "; + $CHKS .=""; } } $CHKS .= "
 ".$cat."  ".$cat." 
"; diff --git a/plugins/admin/fai/faiPackage.tpl b/plugins/admin/fai/faiPackage.tpl index 66f38f0ad..6ad8acb45 100644 --- a/plugins/admin/fai/faiPackage.tpl +++ b/plugins/admin/fai/faiPackage.tpl @@ -38,7 +38,7 @@ - +