From 5f13278d3011ac9bcdec8a91e48b828de20a53c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lder=20Duarte?= Date: Thu, 15 Oct 2015 16:13:32 +0100 Subject: [PATCH] New optional parameters to the database connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added optional parameters ´db_sid´ and ´jdbc_dir´. --- src/JasperPHP/JasperPHP.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/JasperPHP/JasperPHP.php b/src/JasperPHP/JasperPHP.php index 91d1ae9..1dcb945 100644 --- a/src/JasperPHP/JasperPHP.php +++ b/src/JasperPHP/JasperPHP.php @@ -121,6 +121,13 @@ public function process($input_file, $output_file = false, $format = array("pdf" if( isset($db_connection['jdbc_url']) && !empty($db_connection['jdbc_url']) ) $command .= " --db-url " . $db_connection['jdbc_url']; + + if ( isset($db_connection['jdbc_dir']) && !empty($db_connection['jdbc_dir']) ) + $command .= ' --jdbc-dir ' . $db_connection['jdbc_dir']; + + if ( isset($db_connection['db_sid']) && !empty($db_connection['db_sid']) ) + $command .= ' --db-sid ' . $db_connection['db_sid']; + } $this->redirect_output = $redirect_output;