]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/file.php
include [all] Include and file path should be devided with single space. File path...
[SourceForge/phpwiki.git] / lib / WikiDB / file.php
1 <?php
2
3
4
5 /**
6  * Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam
7  *
8  * This file is part of PhpWiki.
9  *
10  * PhpWiki is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * PhpWiki is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 require_once 'lib/WikiDB.php';
26 require_once 'lib/WikiDB/backend/file.php';
27
28 /**
29  * Wrapper class for the file backend.
30  *
31  * Authors: Gerrit Riessen, gerrit.riessen@open-source-consultants.de
32  *          Jochen Kalmbach <Jochen@Kalmbachnet.de>
33  */
34 class WikiDB_file extends WikiDB
35 {
36     /**
37      * Constructor requires the DB parameters.
38      */
39     function WikiDB_file( $dbparams )
40     {
41         $backend = new WikiDB_backend_file( $dbparams );
42         $this->WikiDB($backend, $dbparams);
43
44         if (empty($dbparams['directory'])
45             || preg_match('@^/tmp\b@', $dbparams['directory']))
46             trigger_error(sprintf(_("The %s files are in the %s directory. Please read the INSTALL file and move the database to a permanent location or risk losing all the pages!"),
47                                   "Page", "/tmp"), E_USER_WARNING);
48     }
49 }
50
51 // Local Variables:
52 // mode: php
53 // tab-width: 8
54 // c-basic-offset: 4
55 // c-hanging-comment-ender-p: nil
56 // indent-tabs-mode: nil
57 // End:
58