|
cvs: pear /Log/Log sql.php: msg#00602php.cvs.pear
jon Thu Sep 26 18:59:47 2002 EDT Modified files: /pear/Log/Log sql.php Log: Allow an existing database connection to be passed into the SQL driver via the $conf array. Suggested by: Geir Eivind Mork <mork@xxxxxx> Index: pear/Log/Log/sql.php diff -u pear/Log/Log/sql.php:1.9 pear/Log/Log/sql.php:1.10 --- pear/Log/Log/sql.php:1.9 Sun Sep 22 18:55:35 2002 +++ pear/Log/Log/sql.php Thu Sep 26 18:59:47 2002 @@ -1,5 +1,5 @@ <?php -// $Id: sql.php,v 1.9 2002/09/22 22:55:35 jon Exp $ +// $Id: sql.php,v 1.10 2002/09/26 22:59:47 jon Exp $ // $Horde: horde/lib/Log/sql.php,v 1.12 2000/08/16 20:27:34 chuck Exp $ require_once 'DB.php'; @@ -20,7 +20,7 @@ * ); * * @author Jon Parise <jon@xxxxxxx> - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ * @since Horde 1.3 * @package Log */ @@ -59,7 +59,14 @@ $this->_table = $name; $this->_ident = $ident; $this->_maxLevel = $maxLevel; - $this->_dsn = $conf['dsn']; + + /* If an existing database connection was provided, use it. */ + if (isset($conf['db'])) { + $this->_db = &$conf['db']; + $this->_opened = true; + } else { + $this->_dsn = $conf['dsn']; + } } /** -- PEAR CVS Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pear /HTML_QuickForm QuickForm.php: 00602, Jason Rust |
|---|---|
| Next by Date: | cvs: pear /Log Log.php: 00602, Jon Parise |
| Previous by Thread: | cvs: pear /Log/Log sql.phpi: 00602, Jon Parise |
| Next by Thread: | cvs: pear /PECL/satellite config.m4: 00602, Jani Taskinen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |