]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/dba.php
Jeff's hacks II.
[SourceForge/phpwiki.git] / lib / WikiDB / dba.php
1 <?php rcs_id('$Id: dba.php,v 1.1 2001-09-18 19:16:23 dairiki Exp $');
2
3 require_once('lib/WikiDB.php');
4 require_once('lib/WikiDB/backend/dba.php');
5 /**
6  *
7  */
8 class WikiDB_dba extends WikiDB
9 {
10     function WikiDB_dba ($dbparams) {
11         $backend = new WikiDB_backend_dba($dbparams);
12         $this->WikiDB($backend, $dbparams);
13
14         if (empty($dbparams['directory'])
15             || preg_match('@^/tmp\b@', $dbparams['directory'])) {
16             $this->_warnings
17                 = " DBA files are in the /tmp directory. "
18                 . "Please read the INSTALL file and move "
19                 . "the DB file to a permanent location or risk losing "
20                 . "all the pages!";
21         }
22         else
23             $this->_warnings = false;
24     }
25     
26     function genericWarnings () {
27         return $this->_warnings;
28     }
29 };
30
31 // (c-file-style: "gnu")
32 // Local Variables:
33 // mode: php
34 // tab-width: 8
35 // c-basic-offset: 4
36 // c-hanging-comment-ender-p: nil
37 // indent-tabs-mode: nil
38 // End:   
39 ?>