Path types no more!
[viewsvn.git] / includes / init.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 error_reporting(E_ALL & ~E_NOTICE);
23 //error_reporting(E_ALL);
24
25 define('ISSO_MT_START', microtime());
26
27 // ###################################################################
28 // configuration file
29 if (!file_exists('./includes/config.php'))
30 {
31 echo 'includes/config.php needs to be present!';
32 exit;
33 }
34
35 require_once('./includes/config.php');
36
37 // ###################################################################
38 // init isso
39 define('ISSO_ESCAPE_STRINGS', 1);
40 define('ISSO_CHECK_POST_REFERER', 1);
41
42 require_once($conf['paths']['isso'] . 'kernel.php');
43 $viewsvn = new ISSO();
44 $viewsvn->set('application', 'ViewSVN');
45 $viewsvn->set('apppath', getcwd());
46 $viewsvn->set('appversion', '[#]version[#]');
47 $viewsvn->set('debug', $debug);
48
49 $viewsvn->load('functions', 'funct', true);
50
51 define('ISSO_DB_LAYER', 'db_mysql');
52 $viewsvn->load('db_mysql', 'db', true);
53 $db->connect($conf['db']['server'], $conf['db']['user'], $conf['db']['pass'], $conf['db']['name'], 0);
54
55 $viewsvn->load('xml', 'xml', true);
56
57 // ###################################################################
58 // localization stystem
59 $viewsvn->load('localize', 'lang', true);
60
61 // ###################################################################
62 // handle template system
63 $viewsvn->load('template_fs', 'template', true);
64 $template->set('templatedir', './templates/' . $conf['paths']['templateset']);
65 $template->set('extension', 'tpl');
66
67 // ###################################################################
68 // load options
69 $viewsvn->svnpath = $conf['paths']['svn'];
70
71 require_once('./includes/svncommon.php');
72
73 // ###################################################################
74 // imaginary reporter
75 require_once('./includes/imaginary.php');
76 $viewsvn->trigger =& new Imaginary();
77
78 // ###################################################################
79 // setup repository
80 require_once('./includes/repository.php');
81 $viewsvn->repos =& new Repository($conf['repository']['path'], $conf['repository']['iscontainer']);
82
83 // ###################################################################
84 // path manager
85 require_once('./includes/paths.php');
86
87 /*=====================================================================*\
88 || ###################################################################
89 || # $HeadURL$
90 || # $Id$
91 || ###################################################################
92 \*=====================================================================*/
93 ?>