5 * Copyright 1999, 2005 $ThePhpWikiProgrammingTeam
7 * This file is part of PhpWiki.
9 * PhpWiki is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * PhpWiki is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 require_once( 'lib/WikiDB.php' );
25 require_once( 'lib/WikiDB/backend/flatfile.php' );
28 * Wrapper class for the flatfile backend.
29 * flatfile has readable (mimified) page_data files, the rest is the
30 * same as in the file backend (serialized arrays).
32 class WikiDB_flatfile extends WikiDB
35 * Constructor requires the DB parameters.
37 function WikiDB_flatfile( $dbparams )
39 $backend = new WikiDB_backend_flatfile( $dbparams );
40 $backend->_wikidb =& $this;
41 $this->WikiDB($backend, $dbparams);
43 if (empty($dbparams['directory'])
44 || 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