Skip to content

Commit

Permalink
fix static exists() function again, renamed to db_exists() for consis…
Browse files Browse the repository at this point in the history
…tency with the respective driver function name

git-svn-id: http://svn.php.net/repository/pear/packages/DBA/trunk@97000 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Brent Cook committed Sep 26, 2002
1 parent 09ca93b commit 9864e86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 4 additions & 6 deletions DBA.php
Expand Up @@ -30,7 +30,7 @@
* dbm engine for installations where dba support is not included in PHP.
*
* @author Brent Cook <busterb@mail.utexas.edu>
* @version 0.9.3
* @version 0.9.4
* @access public
* @package DBA
*/
Expand Down Expand Up @@ -76,14 +76,12 @@ function raiseError($message) {
* @param string @driver driver to test for
* @return boolean true if the database exists
*/
function exists($name, $driver = 'file')
function db_exists($name, $driver = 'file')
{
if (!function_exists('dba_open') || ($driver=='file')) {
require_once 'DBA/Driver/File.php';
return DBA_Driver_File::exists($name);
return (file_exists($name.'.dat') && file_exists($name.'.idx'));
} elseif (($driver == 'db3') || ($driver == 'gdbm')){
require_once 'DBA/Driver/Builtin.php';
return DBA_Driver_Builtin::exists($name);
return file_exists($name);
} else {
return PEAR::raiseError('Unknown DBA driver, '.$driver);
}
Expand Down
6 changes: 2 additions & 4 deletions package.xml
Expand Up @@ -20,15 +20,13 @@ DBA is a wrapper for the php DBA functions. It includes a file-based emulator an

<release>
<license>LGPL</license>
<version>0.9.3</version>
<version>0.9.4</version>
<date>2002-09-26</date>
<state>beta</state>
<notes>
This release updates the driver constructors so that they call their base class's constructors. This makes PEAR's virtual destructor system function properly.

NOTE: The file driver appears to work incorrectly with the latest PHP CVS. I am
currently investigating the issue. For now, either use CVS from a few weeks
ago, or PHP up to 4.2.3.
NOTE: The file driver appears to work incorrectly with the latest PHP CVS. I am currently investigating the issue. For now, either use CVS from a few weeks ago, or PHP up to 4.2.3.

Many of the functions that were included with the earlier developer releases, such as the table manager and SQL parser, have been split into separate packages to be released soon.
</notes>
Expand Down

0 comments on commit 9864e86

Please sign in to comment.