]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/install.php
Removed svn:executable
[SourceForge/phpwiki.git] / lib / install.php
1 <?php //-*-php-*-
2 rcs_id('$Id: install.php,v 1.4 2005-09-15 05:56:12 rurban Exp $');
3
4 /*
5  Copyright 2004 $ThePhpWikiProgrammingTeam
6
7  This file is part of PhpWiki.
8
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.
13
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.
18
19  You should have received a copy of the GNU General Public License
20  along with PhpWiki; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 /**
25  * Loaded when config/config.ini was not found.
26  * So we have no main loop and no request object yet.
27  */
28
29 function init_install() {
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     static $already = 0;
46     if ($part) {
47         if (empty($_GET)) $_GET =& $GLOBALS['HTTP_GET_VARS'];
48         $_GET['show'] = $part;
49     }
50     // setup default settings
51     if (!$already and !defined("_PHPWIKI_INSTALL_RUNNING")) {
52         define("_PHPWIKI_INSTALL_RUNNING", true);
53         include(dirname(__FILE__)."/../configurator.php");
54     }
55     $already = 1;
56 }
57
58 init_install();
59
60 /**
61  $Log: not supported by cvs2svn $
62  Revision 1.3  2005/02/28 20:24:23  rurban
63  _GET is different from HTPP_GET_VARS. use the correct one
64
65  Revision 1.2  2005/02/26 17:47:57  rurban
66  configurator: add (c), support show=_part1 initial expand, enable
67    ENABLE_FILE_OUTPUT, use part.id not name
68  install.php: fixed for multiple invocations (on various missing vars)
69  IniConfig: call install.php on more errors with expanded part.
70
71  Revision 1.1  2004/12/06 19:49:58  rurban
72  enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now.
73  renamed delete_page to purge_page.
74  enable action=edit&version=-1 to force creation of a new version.
75  added BABYCART_PATH config
76  fixed magiqc in adodb.inc.php
77  and some more docs
78
79
80  */
81
82 // For emacs users
83 // Local Variables:
84 // mode: php
85 // tab-width: 8
86 // c-basic-offset: 4
87 // c-hanging-comment-ender-p: nil
88 // indent-tabs-mode: nil
89 // End:
90 ?>