From: hickert Date: Mon, 10 Oct 2005 08:54:18 +0000 (+0000) Subject: Invalid repository settings fixed. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d567e5cb2b796efa1589794fb204ee6818c67c4c;p=gosa.git Invalid repository settings fixed. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1542 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 918dab1d8..36ce7933c 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -117,10 +117,6 @@ class faiPackage extends plugin return($display); } } - $disableRelease = false; - $disableMirror = false; - $disableOptions = false; - $disableSection = false; /* Assign variables */ foreach($this->attributes as $attrs){ @@ -129,6 +125,11 @@ class faiPackage extends plugin $this->genMirror(); + if((isset($_POST['FAIdebianMirrorS']))&&(!empty($_POST['FAIdebianMirrorS']))){ + $this->FAIdebianMirror = $_POST['FAIdebianMirrorS']; + } + + /* check servers matching release and section settings */ $availableServer = array(); foreach($this->mirrors as $mir){ @@ -144,9 +145,8 @@ class faiPackage extends plugin } } } - if($this->list==NULL){ - $this->list=$this->genPkgs(); - } + + $this->list=$this->genPkgs(); if(isset($_POST['Addpkg'])){ $this->dialog = new faiPackageEntry($this->config, $this->dn,$this->list,$this->usedPackages); @@ -200,6 +200,12 @@ class faiPackage extends plugin $strsec .= $sec." "; } + + $smarty->assign("OptionsACL",""); + if(empty($this->FAIdebianMirror)){ + $smarty->assign("OptionsACL"," disabled "); + } + $smarty->assign("mirrors" ,$availableServer); $smarty->assign("mirror" ,$this->FAIdebianMirror); $smarty->assign("releases",$this->releases); @@ -332,6 +338,8 @@ class faiPackage extends plugin if(!is_file($strID)){ print_red(sprintf(_("Package file don't exists '%s'."),$strID)); + $this->FAIdebianMirror=""; + unset($this->buffer); return(array()); } $fp = fopen($strID,"r"); @@ -351,7 +359,7 @@ class faiPackage extends plugin ksort($a_ret); return($a_ret); }else{ - return $this->buffer[$strID]; + return $this->buffer; } } diff --git a/plugins/admin/fai/class_faiPackageNew.inc b/plugins/admin/fai/class_faiPackageNew.inc index 45ca89db0..bc45bf43b 100644 --- a/plugins/admin/fai/class_faiPackageNew.inc +++ b/plugins/admin/fai/class_faiPackageNew.inc @@ -83,12 +83,19 @@ class faiPackageNew extends plugin /* check servers matching release and section settings */ $availableServer = array(); foreach($this->mirrors as $mir){ + + /* Check if release and section match */ if($mir['release'] == $this->FAIdebianRelease){ $pass = true; + foreach($this->FAIdebianSection as $sec){ + + /* If a mirror match, attach */ if($sec != $mir['section']){ $pass = false; } + + /* Save all matching */ if($pass){ $availableServer[$mir['mirror']]=$mir['mirror']; } diff --git a/plugins/admin/fai/faiPackage.tpl b/plugins/admin/fai/faiPackage.tpl index 0521f5997..6db4f7e69 100644 --- a/plugins/admin/fai/faiPackage.tpl +++ b/plugins/admin/fai/faiPackage.tpl @@ -70,9 +70,9 @@ {html_options options=$usedPackages}
- - - + +