summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a56a73e)
raw | patch | inline | side by side (parent: a56a73e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 12:52:45 +0000 (12:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 12:52:45 +0000 (12:52 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10746 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiPackage.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index e2d801ac80fc4f9fac9d4540b2226b45a0d6b0e2..a5744f527fc86d7c2beea1b2cd5abf9ff6f9c729 100644 (file)
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);
$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;
}
/* Adapt used name if we're marked for removal */
$removal = "<img src='images/empty.png' alt=' ' class='center'>";
- if (preg_match('/^-/', $name)){
+ if (preg_match('/\-$/', $name)){
$removal = "<img src='images/negate.png' alt='"._("Package marked for removal")."'
title='"._("Package marked for removal")."' class='center'>";
}