From 9c7601818bb1be36027e8dcbc5bb23d588085f60 Mon Sep 17 00:00:00 2001 From: wainstead Date: Wed, 31 Jan 2001 02:18:26 +0000 Subject: [PATCH] Fixed a bug in the loading of dbmlib.php; if the $whichdatabase was set to 'dbm' a logic error always set it to 'dba', which had unpredictable results with PHP3. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@378 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/config.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/config.php b/lib/config.php index df252276f..327525abc 100644 --- a/lib/config.php +++ b/lib/config.php @@ -10,7 +10,7 @@ if (!function_exists('rcs_id')) { function rcs_id($id) { echo "\n"; }; } - rcs_id('$Id: config.php,v 1.22 2001-01-21 11:00:00 ahollosi Exp $'); + rcs_id('$Id: config.php,v 1.23 2001-01-31 02:18:26 wainstead Exp $'); // end essential internal stuff @@ -43,8 +43,7 @@ ///////////////////////////////////////////////////////////////////// $WhichDatabase = 'default'; // use one of "dbm", "dba", "mysql", - // "pgsql", "msql", or "file" - + // "pgsql", "msql", or "file" // DBM and DBA settings (default) if ($WhichDatabase == 'dbm' or $WhichDatabase == 'dba' or @@ -61,14 +60,16 @@ define("MAX_DBM_ATTEMPTS", 20); // for PHP3 use dbmlib, else use dbalib for PHP4 - if (($WhichDatabase == 'default') and (floor(phpversion())) == 3) { - $WhichDatabase = 'dbm'; - } else { - $WhichDatabase = 'dba'; + if ($WhichDatabase == 'default') { + if ( floor(phpversion()) == 3) { + $WhichDatabase = 'dbm'; + } else { + $WhichDatabase = 'dba'; + } } if ($WhichDatabase == 'dbm') { - include "lib/dbmlib.php"; + include "lib/dbmlib.php"; } else { include "lib/dbalib.php"; } -- 2.45.0