summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c86469)
raw | patch | inline | side by side (parent: 7c86469)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Mar 2008 07:44:58 +0000 (07:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Mar 2008 07:44:58 +0000 (07:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10007 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 8201e1a40a7ed6da3bafb67fc0a1ca1b902b4230..f3df812bbb9cc95507609786aefc31c2dd6cfb71 100644 (file)
return($a_ret);
}
+
function genPkgs()
{
if($this->buffer === NULL || !count($this->buffer)){
$this->buffer = array();
$q = new gosaSupportDaemon();
- $ret = $q->FAI_get_packages($this->FAIdebianRelease);
- foreach($ret as $attr){
- $this->buffer[$attr['PACKAGE']] = array($attr['PACKAGE'],$attr['VERSION'],$attr['SECTION'],$attr['DESCRIPTION']);
+ $attrs = array("distribution", "package","version", "section", "description", "timestamp","template=''");
+ $ret = $q->FAI_get_packages($this->FAIdebianRelease,$attrs);
+ if($q->is_error()){
+ msg_dialog::display(_("Service infrastructure"),msgPool::siError($q->get_error()),ERROR_DIALOG);
+ }else{
+ foreach($ret as $attr){
+ $this->buffer[$attr['PACKAGE']] = array($attr['PACKAGE'],$attr['VERSION'],$attr['SECTION'],$attr['DESCRIPTION']);
+ }
}
}
return $this->buffer;
-
-# /* Generate a list off available packages for this mirror, section and release
-# */
-# /* Only read this file if it wasn't read before */
-# $this->buffer = NULL;
-# if($this->buffer === NULL){
-# $this->buffer=array();
-# $a_ret = array();
-# foreach($this->FAIdebianSection as $sec){
-# $strID= CONFIG_DIR."/fai/".$this->FAIdebianRelease."/".$sec;
-#
-# if(!is_file($strID)){
-# msg_dialog::display(_("Error"), sprintf(_("Package file '%s' does not exist!"), $strID), ERROR_DIALOG);
-# unset($this->buffer);
-# return(array());
-# }
-# $fp = fopen($strID,"r");
-#
-# /* Parse every line and create an array */
-# while(!feof($fp)){
-# $str= fgets($fp,512);
-# $stra= split("\|",$str);
-# if(count($stra)==4){
-# $a_ret[$stra[0]] = $stra;
-# break;
-# }
-# }
-# fclose($fp);
-# /* Save our Data, to avoid reading it again */
-# }
-# $this->buffer = $a_ret;
-# ksort($a_ret);
-# print_a($this->buffer);
-# return($a_ret);
-# }else{
-# print_a($this->buffer);
-# return $this->buffer;
-# }
}