From: hickert Date: Mon, 21 Apr 2008 12:13:57 +0000 (+0000) Subject: Fixed release detection for new package lists. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a2fd8ddcaebcfc973d97b73b473ceaaa260f683;p=gosa.git Fixed release detection for new package lists. -If no release was selected in the faiManagement dialog, newly create packagelist were initialized correctly. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10582 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index ce57d6de6..c79079334 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -177,14 +177,14 @@ class faiPackage extends plugin /* Assemble release name */ $release = $this->parent->parent->fai_release; - $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $release); + $tmp= preg_replace('/[,]*'.normalizePreg(get_ou('faiou')).'.*$/', '', $release); $tmp= preg_replace('/ou=/', '', $tmp); $rev= array_reverse(split(',', $tmp)); - $this->FAIdebianRelease= ""; + $this->FAIdebianRelease= "/"; foreach ($rev as $part){ $this->FAIdebianRelease.= "/$part"; } - $this->FAIdebianRelease= preg_replace('#^/#', '', $this->FAIdebianRelease); + $this->FAIdebianRelease= preg_replace('#^[/]*#', '', $this->FAIdebianRelease); /* Assemble sections */ $repos= $this->getServerInfos(); @@ -196,7 +196,7 @@ class faiPackage extends plugin /* Assign Repository settings*/ $this->is_account = true; } - + /****** * Add && Remove Packages