From: cajus Date: Wed, 12 Oct 2005 13:46:40 +0000 (+0000) Subject: Added mirror url support X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=53ed0cb907c80b47dcc5a8c3f54c6f60ab8cd651;p=gosa.git Added mirror url support git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1564 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 89d0976a4..b346ed444 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -37,6 +37,7 @@ class faiPackage extends plugin var $FAIdebianRelease = ""; // The selected release var $FAIdebianSection = ""; // selected section var $FAIdebianMirror = ""; // selected mirror + var $mirror = ""; // selected mirror var $servers = array(); // All available servers var $releases = array(); // All possible releases @@ -86,6 +87,9 @@ class faiPackage extends plugin } $this->confDir = CONFIG_DIR."/fai/"; $this->FAIpackage = array(); + + /* Extract mirror location */ + $this->mirror= preg_replace("!^[^/]+//([^/]+).*$!", '$1', $this->FAIdebianMirror); } function execute() @@ -96,6 +100,11 @@ class faiPackage extends plugin $this->genMirror(); + /* Check if we exist already - no need to ask for revisions, etc. then */ + if ($this->dn != "new"){ + $this->newDialogShown= true; + } + if((!$this->is_account)&&(!$this->newDialogShown)){ if($this->dialog==NULL){ @@ -355,7 +364,7 @@ class faiPackage extends plugin $this->buffer=array(); $a_ret = array(); foreach($this->FAIdebianSection as $sec){ - $strID= "/etc/gosa/fai/".$this->FAIdebianMirror."/".$this->FAIdebianRelease."/".$sec; + $strID= "/etc/gosa/fai/".$this->mirror."/".$this->FAIdebianRelease."/".$sec; if(!is_file($strID)){ print_red(sprintf(_("Package file don't exists '%s'."),$strID));