From 21534c28d81cb64bfbcd08dbe455abb58ad07454 Mon Sep 17 00:00:00 2001 From: abijah Date: Wed, 8 Jul 2009 21:49:00 +0000 Subject: [PATCH] More work to make the db scripts general git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@266 97e9348a-65ac-dc4b-aefc-98561f571b83 --- app_controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app_controller.php b/app_controller.php index 0db3285..bdf14ea 100644 --- a/app_controller.php +++ b/app_controller.php @@ -64,9 +64,13 @@ class AppController extends Controller { Configure::write('debug', '0'); $script = $_SERVER['DOCUMENT_ROOT'] . '/pmgr/build.cmd'; echo "

" . date('r') . "\n"; - echo "

Script: $script" . "\n"; + //echo "

Script: $script" . "\n"; + $db = & $this->Account->getDataSource(); + $script .= ' "' . $db->config['database'] . '"'; + $script .= ' "' . $db->config['login'] . '"'; + $script .= ' "' . $db->config['password'] . '"'; $handle = popen($script . ' 2>&1', 'r'); - echo "

Handle: $handle; " . gettype($handle) . "\n"; + //echo "

Handle: $handle; " . gettype($handle) . "\n"; echo "

\n";
     while (($read = fread($handle, 2096))) {
       echo $read;