[sork] getdriverconfig() error
Eric Rostetter
eric.rostetter at physics.utexas.edu
Thu Feb 20 13:49:55 PST 2003
Quoting Patrick Boutilier <boutilpj at ednet.ns.ca>:
> Passwd 2.2 and Horde 2.2.1
>
> When trying to change a MySql password I get the following errors. Any
> ideas?
Known problem, fixed in CVS, patch attached.
> Fatal error: Call to undefined function: getdriverconfig() in
> /usr/local/apache2/htdocs-scolaire/horde/passwd/lib/Driver/sql.php on
> line 41
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Why get even? Get odd!
-------------- next part --------------
Index: lib/Driver/sql.php
===================================================================
RCS file: /usr/repository/passwd/lib/Driver/sql.php,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -r1.2.2.4 -r1.2.2.5
--- lib/Driver/sql.php 29 Jan 2003 20:25:06 -0000 1.2.2.4
+++ lib/Driver/sql.php 15 Feb 2003 20:16:30 -0000 1.2.2.5
@@ -3,14 +3,14 @@
* The sql class attempts to change a user's password stored in an sql
* databse and implements the Passwd_Driver API.
*
- * $Horde: passwd/lib/Driver/sql.php,v 1.2.2.4 2003/01/29 20:25:06 ericr Exp $
+ * $Horde: passwd/lib/Driver/sql.php,v 1.2.2.5 2003/02/15 20:16:30 ericr Exp $
*
* @author Mike Cochrane <mike at graftonhall.co.nz>
* @author Ilya Krel <mail at krel.org>
* @author Tjeerd van der Zee <admin at xar.nl>
* @author Mattias Webjörn Eriksson <mattias at webjorn.org>
* @author Eric Jon Rostetter <eric.rostetter at physics.utexas.edu>
- * @version $Revision: 1.2.2.4 $
+ * @version $Revision: 1.2.2.5 $
* @package passwd
*/
class Passwd_Driver_sql extends Passwd_Driver {
@@ -37,8 +37,16 @@
return PEAR::raiseError(_("Required 'phptype' not specified in SQL configuration."));
}
- /* Use defaults from Horde */
- $defaults = Horde::getDriverConfig('', 'sql');
+ /* Get sql defaults from Horde if available. In future, use:
+ * $defaults = Horde::getDriverConfig('', 'sql');
+ */
+
+ if (array_key_exists('sql', $conf)) {
+ $defaults = array_merge($conf['sql'], $this->_params);
+ } else {
+ $defaults = array();
+ }
+
$this->_params['hostspec'] = array_key_exists('hostspec', $params) ? $params['hostspec'] : $defaults['hostspec'];
$this->_params['protocol'] = array_key_exists('protocol', $params) ? $params['protocol'] : $defaults['protocol'];
$this->_params['username'] = array_key_exists('username', $params) ? $params['username'] : $defaults['username'];
More information about the sork
mailing list