From 13c4d42352c14d41759c14863a03f4fd84430d87 Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 25 Mar 2004 22:33:38 +0000 Subject: [PATCH] fixed problem with two different dsn and auth_dsn database backends (e.g. mysql + pgsql) git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@3212 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/WikiUserNew.php | 11 +++++++++-- lib/XmlRpcServer.php | 3 ++- lib/config.php | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/WikiUserNew.php b/lib/WikiUserNew.php index fadca32a9..bc2ba5e46 100644 --- a/lib/WikiUserNew.php +++ b/lib/WikiUserNew.php @@ -1,5 +1,5 @@ _auth_dbi)) { if ($DBParams['dbtype'] != 'SQL' and $DBParams['dbtype'] != 'ADODB') return false; + if (empty($DBAuthParams)) + return false; if (empty($DBAuthParams['auth_dsn'])) { $dbh = $request->getDbh(); // use phpwiki database } elseif ($DBAuthParams['auth_dsn'] == $DBParams['dsn']) { $dbh = $request->getDbh(); // same phpwiki database } else { // use another external database handle. needs PHP >= 4.1 - $dbh = WikiDB::open($DBAuthParams); + $local_params = array_merge($DBParams,$DBAuthParams); + $local_params['dsn'] = $local_params['auth_dsn']; + $dbh = WikiDB::open($local_params); } $this->_auth_dbi =& $dbh->_backend->_dbh; } @@ -2589,6 +2593,9 @@ extends UserPreferences // $Log: not supported by cvs2svn $ +// Revision 1.38 2004/03/25 17:37:36 rurban +// helper to patch to and from php5 (workaround for stricter parser, no macros in php) +// // Revision 1.37 2004/03/25 17:00:31 rurban // more code to convert old-style pref array to new hash // diff --git a/lib/XmlRpcServer.php b/lib/XmlRpcServer.php index 86df446cb..dc91e1083 100644 --- a/lib/XmlRpcServer.php +++ b/lib/XmlRpcServer.php @@ -1,5 +1,5 @@ * * LICENCE @@ -47,6 +47,7 @@ */ // ToDo: +// Make use of the xmlrpc extension if found. Resolve namespace conflicts // Remove all warnings from xmlrpc.inc // Return list of external links in listLinks diff --git a/lib/config.php b/lib/config.php index b90d7421e..eb69cc9a7 100644 --- a/lib/config.php +++ b/lib/config.php @@ -1,5 +1,5 @@