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