Code

Removed FPDF define
[gosa.git] / gosa-core / include / exporter / class_cvsExporter.inc
index 110014f8baeb689d4ea2c576c3f43ca235605c5f..5c7b07657cea62f4959b93fb6e07d22cea50ef7f 100644 (file)
@@ -4,7 +4,7 @@ class csvExporter
 {
   var $result;
 
-  function csvExporter($header, $entries, $columns= array()) {
+  function csvExporter($headline, $header, $entries, $columns= array()) {
     // If no preset, render all columns
     if (!count($columns)) {
       foreach ($header as $index => $dummy) {
@@ -16,7 +16,7 @@ class csvExporter
     $this->result= "#";
     foreach ($columns as $index) {
       if (isset($header[$index])){
-        $this->result.= $header[$index].";";
+        $this->result.= trim($header[$index]).";";
       } else {
         $this->result.= ";";
       }
@@ -27,7 +27,7 @@ class csvExporter
     foreach ($entries as $row) {
       foreach ($columns as $index) {
         if (isset($row["_sort$index"])){
-          $this->result.= $row["_sort$index"].";";
+          $this->result.= trim($row["_sort$index"]).";";
         } else {
           $this->result.= ";";
         }
@@ -45,7 +45,7 @@ class csvExporter
 
   static function getInfo()
   {
-    return array("exportCVS" => array( "label" => _("CSV"), "image" => "plugins/lists/exportCSV.png", "class"=> "csvExporter", "mime" => "text/x-csv", "filename" => "export.csv" ));
+    return array("exportCVS" => array( "label" => _("CSV"), "image" => "images/lists/csv.png", "class"=> "csvExporter", "mime" => "text/x-csv", "filename" => "export.csv" ));
   }
 
 }