From 4e26529290626c32d4186f09a05d1f0a6a1f0764 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 30 Mar 2010 14:08:06 +0000 Subject: [PATCH] Made packages w3c conform git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17400 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiPackage.inc | 35 ++++++++++--------- .../fai/packageSelect/selectPackage-list.xml | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index d32f26a64..22aa7889f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -325,7 +325,7 @@ class faiPackage extends plugin ******/ if(!preg_match('/freeze/i', $this->FAIstate) && preg_match("/^removal_package_/",$name)){ - $id = @base64_decode(preg_replace("/^removal_package_(.*)_[xy]*$/","\\1",$name)); + $id = @postDecode(preg_replace("/^removal_package_(.*)$/","\\1",$name)); if(isset($this->usedPackages[$id])){ $pkg = $this->usedPackages[$id]; if (preg_match('/\-$/', $pkg)){ @@ -342,7 +342,7 @@ class faiPackage extends plugin * Delete Pkgs ******/ if(!preg_match('/freeze/i', $this->FAIstate) && preg_match("/^remove_package_/",$name)){ - $id = @base64_decode(preg_replace("/^remove_package_(.*)_[xy]*$/","\\1",$name)); + $id = @postDecode(preg_replace("/^remove_package_(.*)$/","\\1",$name)); if(isset($this->usedPackages[$id])){ unset($this->usedPackages[$id]); } @@ -353,7 +353,7 @@ class faiPackage extends plugin * Configure Pkgs ******/ if(!preg_match('/freeze/i', $this->FAIstate) && preg_match("/^configure_package_/",$name)){ - $pkg = @base64_decode(preg_replace("/^configure_package_(.*)_[xy]*$/","\\1",$name)); + $pkg = @postDecode(preg_replace("/^configure_package_(.*)$/","\\1",$name)); if(isset($this->usedPackages[$pkg])){ @@ -412,17 +412,15 @@ class faiPackage extends plugin $actions = ""; /* Append message if package is configured */ - $configured = " "; + $configured = image('images/empty.png'); if(isset($this->ConfiguredPackages[$usedName])){ - $configured = ""._("Configured").""; + $configured = image('plugins/fai/images/package_configure.png','',_("Configured")); } /* Adapt used name if we're marked for removal */ - $removal = " "; + $removal = image('images/empty.png'); if (preg_match('/\-$/', $name)){ - $removal = ""._("Package marked for removal").""; + $removal = image('plugins/fai/images/removal_mark.png','',_("Package marked for removal")); } /* Get Version */ @@ -434,28 +432,31 @@ class faiPackage extends plugin /* Get description */ $description = " "; if(isset($this->list[$usedName]['DESCRIPTION'])){ - $description = base64_decode($this->list[$usedName]['DESCRIPTION']); + $description = postDecode($this->list[$usedName]['DESCRIPTION']); } if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){ - $actions = ""; + $actions.= image('plugins/fai/images/removal_mark.png', + 'removal_package_'.postEncode($usedName), + _("Mark package for removal")); } if(isset($this->list[$usedName]['TEMPLATE']) && !preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIdebconfInfo")){ - $actions.= " "; + $actions.= image('plugins/fai/images/package_configure.png', + 'configure_package_'.postEncode($usedName), + _("Configure this package")); } if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){ - $actions.= " "; + $actions.= image('images/lists/trash.png', + 'remove_package_'.postEncode($usedName), + _("Remove this package")); } $field1 = array("string" => $configured." ".$removal,"attach" => "style='width:40px;'"); $field2 = array("string" => $usedName ,"attach" => "style='width:200px;'"); $field3 = array("string" => $version); - $field4 = array("string" => $description); + $field4 = array("string" => htmlentities($description)); $field5 = array("string" => $actions ,"attach" => "style='width:60px; border-right:0px;'"); $divlist->AddEntry(array($field1,$field2,$field3,$field4,$field5)); } diff --git a/gosa-plugins/fai/admin/fai/packageSelect/selectPackage-list.xml b/gosa-plugins/fai/admin/fai/packageSelect/selectPackage-list.xml index d1b73bdcf..ff6e029ec 100644 --- a/gosa-plugins/fai/admin/fai/packageSelect/selectPackage-list.xml +++ b/gosa-plugins/fai/admin/fai/packageSelect/selectPackage-list.xml @@ -13,7 +13,7 @@ FAKE_OC__FaiPackage - faiPackage + fai faiPackage plugins/fai/images/fai_packages.png -- 2.30.2