From 3a16265397527f50410b658afe63148d84488aa2 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 30 Apr 2008 12:52:45 +0000 Subject: [PATCH] Updated faiPackage -Append the removal flag at the end of the package name, not infront. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10746 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiPackage.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index e2d801ac8..a5744f527 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -76,7 +76,7 @@ class faiPackage extends plugin if(isset($this->attrs['FAIpackage'])){ unset($this->attrs['FAIpackage']['count']); foreach($this->attrs['FAIpackage'] as $pkg){ - $name = preg_replace("/^\-/","",$pkg); + $name = preg_replace("/\-$/","",$pkg); $this->usedPackages[$name] = $pkg; } ksort($this->usedPackages); @@ -221,10 +221,10 @@ class faiPackage extends plugin $id = @base64_decode(preg_replace("/^removal_package_(.*)_[xy]*$/","\\1",$name)); if(isset($this->usedPackages[$id])){ $pkg = $this->usedPackages[$id]; - if (preg_match('/^-/', $pkg)){ - $pkg= preg_replace('/^-/', '', $pkg); + if (preg_match('/\-$/', $pkg)){ + $pkg= preg_replace('/\-$/', '', $pkg); } else { - $pkg= preg_replace('/^/', '-', $pkg); + $pkg= preg_replace('/$/', '-', $pkg); } $this->usedPackages[$id] = $pkg; } @@ -335,7 +335,7 @@ class faiPackage extends plugin /* Adapt used name if we're marked for removal */ $removal = " "; - if (preg_match('/^-/', $name)){ + if (preg_match('/\-$/', $name)){ $removal = ""._("Package marked for removal").""; } -- 2.30.2