From: hickert Date: Wed, 19 Oct 2005 05:49:48 +0000 (+0000) Subject: faiPackage - repository selection fixed. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ecc17ee85a50e952c18ecb1f5ef253700c847de2;p=gosa.git faiPackage - repository selection fixed. this->mirror was used instead of this->FAIdebianMirror git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1608 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index b346ed444..dd942cf0b 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -118,6 +118,7 @@ class faiPackage extends plugin } /* Assign posible changes, for mirror combinations */ + $this->dialog->save_object(); $this->dialog->releases = $this->releases; $this->dialog->servers = $this->servers; $this->dialog->sections = $this->sections; @@ -131,7 +132,7 @@ class faiPackage extends plugin unset($this->dialog); $this->dialog = false; $this->is_dialog=false; - $this->newDialogShown = true; + // $this->newDialogShown = true; } /* Draw dialog */ @@ -145,12 +146,12 @@ class faiPackage extends plugin foreach($this->attributes as $attrs){ $smarty->assign($attrs,$this->$attrs); } - + /* Set mirror if changed */ 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){ @@ -166,7 +167,7 @@ class faiPackage extends plugin } } } - + /* Generate package list */ $this->list=$this->genPkgs(); @@ -364,7 +365,7 @@ class faiPackage extends plugin $this->buffer=array(); $a_ret = array(); foreach($this->FAIdebianSection as $sec){ - $strID= "/etc/gosa/fai/".$this->mirror."/".$this->FAIdebianRelease."/".$sec; + $strID= "/etc/gosa/fai/".$this->FAIdebianMirror."/".$this->FAIdebianRelease."/".$sec; if(!is_file($strID)){ print_red(sprintf(_("Package file don't exists '%s'."),$strID)); diff --git a/plugins/admin/fai/class_faiPackageNew.inc b/plugins/admin/fai/class_faiPackageNew.inc index 3505c39f8..350019a5d 100644 --- a/plugins/admin/fai/class_faiPackageNew.inc +++ b/plugins/admin/fai/class_faiPackageNew.inc @@ -51,13 +51,6 @@ class faiPackageNew extends plugin /* Post handling for Section, Release and Mirror Setup */ if(isset($_POST['SetRepository'])){ - if((isset($_POST['FAIdebianReleaseS']))&&(!empty($_POST['FAIdebianReleaseS']))){ - $this->FAIdebianRelease = $_POST['FAIdebianReleaseS']; - } - if((isset($_POST['FAIdebianMirrorS']))&&(!empty($_POST['FAIdebianMirrorS']))){ - $this->FAIdebianMirror = $_POST['FAIdebianMirrorS']; - } - foreach($this->sections as $sec => $val){ if(isset($_POST[$sec])){ $this->sections[$sec]=true; @@ -184,6 +177,13 @@ class faiPackageNew extends plugin /* Save data to object */ function save_object() { + /* Post handling for Section, Release and Mirror Setup */ + if((isset($_POST['FAIdebianReleaseS']))&&(!empty($_POST['FAIdebianReleaseS']))){ + $this->FAIdebianRelease = $_POST['FAIdebianReleaseS']; + } + if((isset($_POST['FAIdebianMirrorS']))&&(!empty($_POST['FAIdebianMirrorS']))){ + $this->FAIdebianMirror = $_POST['FAIdebianMirrorS']; + } } /* Check supplied data */ diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index afcc5201b..8d1649e3f 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -252,11 +252,6 @@ class faiPartitionTable extends plugin { $message= array(); - - if((empty($this->cn))||(preg_match("/[^a-z0-9]/i",$this->cn))){ - $message[]=_("Please enter a valid name."); - } - return ($message); }