thekid          Mon Nov 10 11:50:28 2008 UTC

  Modified files:              
    /php-src/ext/sybase_ct/tests        test.inc 
  Log:
  - MFB: Changed source to read host, user and password from environment
  # E.g. nmake test TESTS=ext/sybase_ct PHP_SYBASE_HOST=db PHP_SYBASE_USER=sa 
PHP_SYBASE_PASS=***
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test.inc?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/sybase_ct/tests/test.inc
diff -u php-src/ext/sybase_ct/tests/test.inc:1.7 
php-src/ext/sybase_ct/tests/test.inc:1.8
--- php-src/ext/sybase_ct/tests/test.inc:1.7    Fri Aug 10 13:28:11 2007
+++ php-src/ext/sybase_ct/tests/test.inc        Mon Nov 10 11:50:28 2008
@@ -1,13 +1,13 @@
 <?php
 /* This file is part of PHP test framework for ext/sybase_ct
  *
- * $Id: test.inc,v 1.7 2007/08/10 13:28:11 jani Exp $ 
+ * $Id: test.inc,v 1.8 2008/11/10 11:50:28 thekid Exp $ 
  */
 
   // Change if needed
-  define('HOST',     '****');
-  define('USER',     '****');
-  define('PASSWORD', '****');
+  define('HOST',     getenv('PHP_SYBASE_HOST'));
+  define('USER',     getenv('PHP_SYBASE_USER'));
+  define('PASSWORD', getenv('PHP_SYBASE_PASS'));
   define('TEMPDB',   'tempdb');
 
   // {{{ bool sybase_msg_handler(int msgnumber, int severity, int state, int 
line, string text)
@@ -49,11 +49,11 @@
     var_dump(sybase_set_message_handler($handler));
   }
   
-  // {{{ resource sybase_connect_ex(string charset= NULL, string appname= NULL)
+  // {{{ resource sybase_connect_ex(string charset= NULL, string appname= 
NULL, bool new= FALSE)
   //     Connect to the sybase server using the defines HOST, USER and PASSWORD
-  function sybase_connect_ex($charset= NULL, $appname= NULL) {
+  function sybase_connect_ex($charset= NULL, $appname= NULL, $new= FALSE) {
     sybase_min_server_severity(11);       // Suppress "changed database 
context"
-    if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset ? $charset : 
'iso_1', $appname))) {
+    if (!($db= sybase_connect(HOST, USER, PASSWORD, $charset ? $charset : 
'iso_1', $appname, $new))) {
       die('Connect to '.USER.'@'.HOST.' failed (using password: '.(PASSWORD ? 
'yes' : 'no').')');
     }
     return $db;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to