From: cajus Date: Tue, 25 Aug 2009 11:51:16 +0000 (+0000) Subject: Added exporters X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6481fa989d197e4c75ec321d79b9d770f17aa303;p=gosa.git Added exporters git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14126 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 89f383f66..9d9835b2b 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -49,7 +49,6 @@ class listing { var $snapshotHandler= null; var $exporter= array(); var $exportColumns= array(); - var $showExporter= false; function listing($filename) @@ -84,7 +83,9 @@ class listing { foreach($class_mapping as $class => $dummy) { if (preg_match('/Exporter$/', $class)) { $info= call_user_func(array($class, "getInfo")); - $this->exporter= array_merge($this->exporter, $info); + if ($info != null) { + $this->exporter= array_merge($this->exporter, $info); + } } } } @@ -386,12 +387,6 @@ class listing { $result.= ""; - // Open export window? - if ($this->showExporter) { - $result.= ""; - $this->showExporter= false; - } - $smarty= get_smarty(); $smarty->assign("FILTER", $this->filter->render()); $smarty->assign("SIZELIMIT", print_sizelimit_warning()); @@ -448,16 +443,14 @@ class listing { } // Filter POST with "act" attributes -> posted from action menu - if (isset($_POST['act']) && $_POST['act'] != '') { + if (isset($_POST['exec_act']) && $_POST['act'] != '') { if (preg_match('/^export.*$/', $_POST['act']) && isset($this->exporter[$_POST['act']])) { $exporter= $this->exporter[$_POST['act']]; - $instance= new $exporter['class']($this->plainHeader, $this->entries, $this->exportColumns); + $userinfo= ", "._("created by")." ".$ui->cn." - ".strftime('%A, %d. %B %Y, %H:%M:%S'); + $instance= new $exporter['class']($this->headline.$userinfo, $this->plainHeader, $this->entries, $this->exportColumns); $type= call_user_func(array($exporter['class'], "getInfo")); $type= $type[$_POST['act']]; - session::set('binarytype', $type['mime']); - session::set('binaryfile', $type['filename']); - session::set('binary', $instance->query()); - $this->showExporter= true; + send_binary_content($instance->query(), $type['filename'], $type= $type['mime']); } } @@ -976,7 +969,7 @@ class listing { // Load shortcut $actions= &$this->xmlData['actionmenu']['action']; - $result= "". + $result= "
". "