[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7757] API: allowing saveing the jasper result as a f
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7757] API: allowing saveing the jasper result as a file |
Date: |
Thu, 29 Sep 2011 19:05:58 +0000 |
Revision: 7757
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7757
Author: sigurdne
Date: 2011-09-29 19:05:58 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
API: allowing saveing the jasper result as a file
Modified Paths:
--------------
trunk/phpgwapi/inc/class.jasper_wrapper.inc.php
Modified: trunk/phpgwapi/inc/class.jasper_wrapper.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.jasper_wrapper.inc.php 2011-09-29 19:04:21 UTC
(rev 7756)
+++ trunk/phpgwapi/inc/class.jasper_wrapper.inc.php 2011-09-29 19:05:58 UTC
(rev 7757)
@@ -99,7 +99,7 @@
* unique
*/
- public function execute($parameters = '', $output_type,
$report_source)
+ public function execute($parameters = '', $output_type,
$report_source, $return_content = false)
{
if( !$parameters )
{
@@ -255,14 +255,26 @@
$mime=
'application/octet-stream';
$filename
="{$report_name}.dat";
}
-
- $browser = CreateObject('phpgwapi.browser');
-
$browser->content_header($filename,$mime,strlen($output));
- echo $output;
}
if(isset($error) && $error)
{
throw new Exception($error);
}
+ if($return_content)
+ {
+ return array
+ (
+ 'content' => $output,
+ 'mime' => $mime,
+ 'filename' => $filename
+ );
+ }
+ else
+ {
+ $browser = CreateObject('phpgwapi.browser');
+
$browser->content_header($filename,$mime,strlen($output));
+ echo $output;
+ return false;
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7757] API: allowing saveing the jasper result as a file,
Sigurd Nes <=