Adding language settings to config.php so that people can control the language output...
[viewsvn.git] / includes / init.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
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
40 ini_set('include_path', ini_get('include_path') . ':' . dirname(dirname(__FILE__)) . '/framework');
41
42 require_once('ISSO/Register.php');
43 require_once('ISSO/Functions.php');
44 require_once('ISSO/Xml.php');
45
46 BSRegister::SetDebug($debug);
47
48 BSRegister::Register('input', $input = BSRegister::LoadModule('Input'));
49
50 // ###################################################################
51 // handle template system
52
53 BSRegister::Register('template', $template = BSRegister::LoadModule('Template'));
54
55 $template->setTemplateDirectory('./templates/');
56 $template->setExtension('tpl');
57
58 // ###################################################################
59 // load options
60 BSRegister::Register('svnpath', $conf['paths']['svn']);
61
62 $language = $conf['lang'];
63
64 // ###################################################################
65 // imaginary reporter
66 require_once('./includes/imaginary.php');
67 $viewsvn->trigger =& new Imaginary();
68
69 // ###################################################################
70 // setup repository
71 require_once('./includes/repository.php');
72 BSRegister::Register('repos', $repos = new Repository($conf['repository']['path'], $conf['repository']['iscontainer'], $conf['repository']['include']));
73
74 // ###################################################################
75 // path manager
76 BSRegister::Register('webpath', $conf['paths']['web']);
77
78 /*=====================================================================*\
79 || ###################################################################
80 || # $HeadURL$
81 || # $Id$
82 || ###################################################################
83 \*=====================================================================*/
84 ?>