4 * Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam
6 * This file is part of PhpWiki.
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.
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.
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.
23 require_once 'lib/WikiDB.php';
24 require_once 'lib/WikiDB/backend/file.php';
27 * Wrapper class for the file backend.
29 * Authors: Gerrit Riessen, gerrit.riessen@open-source-consultants.de
30 * Jochen Kalmbach <Jochen@Kalmbachnet.de>
32 class WikiDB_file extends WikiDB
35 * Constructor requires the DB parameters.
37 function WikiDB_file($dbparams)
39 $backend = new WikiDB_backend_file($dbparams);
40 $this->WikiDB($backend, $dbparams);
42 if (empty($dbparams['directory'])
43 || preg_match('@^/tmp\b@', $dbparams['directory'])
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);
54 // c-hanging-comment-ender-p: nil
55 // indent-tabs-mode: nil