mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
Fehlerbehandlung bei Dokumentenexport hinzugefügt
This commit is contained in:
@@ -291,6 +291,9 @@ class dokument_export
|
||||
|
||||
if($download)
|
||||
{
|
||||
if(headers_sent())
|
||||
exit('Header wurden bereits gesendet -> Abbruch');
|
||||
|
||||
switch($this->outputformat)
|
||||
{
|
||||
case 'pdf':
|
||||
@@ -310,6 +313,8 @@ class dokument_export
|
||||
header('Content-Disposition: attachment; filename="'.$this->filename.'.odt"');
|
||||
header('Content-Length: '.$fsize);
|
||||
break;
|
||||
default:
|
||||
exit('Outputformat is not defined');
|
||||
}
|
||||
|
||||
while (!feof($handle))
|
||||
@@ -389,5 +394,11 @@ class dokument_export
|
||||
}
|
||||
return $_xml_data->asXML();
|
||||
}
|
||||
|
||||
public function getXML()
|
||||
{
|
||||
$this->xml_data->formatOutput=true;
|
||||
return $this->xml_data->saveXML();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user