6 Copyright 1999, 2005 $ThePhpWikiProgrammingTeam
8 This file is part of PhpWiki.
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.
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.
20 You should have received a copy of the GNU General Public License
21 along with PhpWiki; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 require_once( 'lib/WikiDB.php' );
27 require_once( 'lib/WikiDB/backend/flatfile.php' );
30 * Wrapper class for the flatfile backend.
31 * flatfile has readable (mimified) page_data files, the rest is the
32 * same as in the file backend (serialized arrays).
34 class WikiDB_flatfile extends WikiDB
37 * Constructor requires the DB parameters.
39 function WikiDB_flatfile( $dbparams )
41 $backend = new WikiDB_backend_flatfile( $dbparams );
42 $backend->_wikidb =& $this;
43 $this->WikiDB($backend, $dbparams);
45 if (empty($dbparams['directory'])
46 || preg_match('@^/tmp\b@', $dbparams['directory']))
47 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!"),
48 "Page", "/tmp"), E_USER_WARNING);
56 // c-hanging-comment-ender-p: nil
57 // indent-tabs-mode: nil