]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/install.php
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / lib / install.php
1 <?php
2
3 /*
4  * Copyright 2004 $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 /**
24  * Loaded when config/config.ini was not found.
25  * So we have no main loop and no request object yet.
26  */
27
28 function init_install()
29 {
30     // prevent from recursion
31     static $already = 0;
32     // setup default settings
33     if (!$already)
34         IniConfig(dirname(__FILE__) . "/../config/config-dist.ini");
35     $already = 1;
36 }
37
38 /**
39  * Display a screen of various settings:
40  * 1. convert from older index.php configuration [TODO]
41  * 2. database and admin_user setup based on configurator.php
42  * 3. dump the current settings to config/config.ini.
43  */
44 function run_install($part = '')
45 {
46     static $already = 0;
47     if ($part) {
48         if (empty($_GET)) $_GET =& $GLOBALS['HTTP_GET_VARS'];
49         $_GET['show'] = $part;
50     }
51     // setup default settings
52     if (!$already and !defined("_PHPWIKI_INSTALL_RUNNING")) {
53         define("_PHPWIKI_INSTALL_RUNNING", true);
54         include(dirname(__FILE__) . "/../configurator.php");
55     }
56     $already = 1;
57 }
58
59 init_install();
60
61 // Local Variables:
62 // mode: php
63 // tab-width: 8
64 // c-basic-offset: 4
65 // c-hanging-comment-ender-p: nil
66 // indent-tabs-mode: nil
67 // End: