]>
src.bluestatic.org Git - viewsvn.git/blob - includes/init.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
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.
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
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 \*=====================================================================*/
22 error_reporting(E_ALL
);
23 //error_reporting(E_ALL & ~E_NOTICE);
25 define('ISSO_MT_START', microtime());
27 // ###################################################################
29 if (!file_exists('./includes/config.php'))
31 echo 'includes/config.php needs to be present!';
35 require_once('./includes/config.php');
37 // ###################################################################
39 define('ISSO_ESCAPE_STRINGS', 1);
40 define('ISSO_CHECK_POST_REFERER', 1);
42 require_once($conf['paths']['isso'] . 'kernel.php');
43 $viewsvn = new Shared_Object_Framework();
44 $viewsvn->set('application', 'ViewSVN');
45 $viewsvn->set('apppath', getcwd());
46 $viewsvn->set('appversion', '[#]version[#]');
47 $viewsvn->set('debug', $debug);
48 $viewsvn->set('sourcepath', $conf['paths']['isso']);
50 $viewsvn->load('functions', 'funct', true);
52 $viewsvn->load('db_mysql', 'db', true);
53 define('ISSO_DB_LAYER', 'db_mysql');
54 $db->connect($conf['db']['server'], $conf['db']['user'], $conf['db']['pass'], $conf['db']['name'], 0);
56 $viewsvn->load('xml', 'xml', true);
58 // ###################################################################
59 // localization stystem
60 $viewsvn->load('localize', 'lang', true);
62 // ###################################################################
63 // handle template system
64 $viewsvn->load('template_fs', 'template', true);
65 $template->set('templatedir', './templates/' . $conf['paths']['templateset']);
66 $template->set('extension', 'tpl');
68 // ###################################################################
70 require_once('./includes/imaginary.php');
71 $viewsvn->trigger
=& new Imaginary();
73 // ###################################################################
74 // load shell subsystem
75 require_once('./includes/shellcmd.php');
76 $viewsvn->shell
=& new Shell();
78 // ###################################################################
80 require_once('./includes/repository.php');
81 $viewsvn->repos
=& new Repository($conf['repository']['path'], $conf['repository']['iscontainer']);
83 // ###################################################################
85 require_once('./includes/svnlib.php');
86 $viewsvn->svn
=& new SVNLib($conf['paths']['svn']);
88 // ###################################################################
90 require_once('./includes/paths.php');
91 $viewsvn->path
= $conf['paths']['web'];
92 $viewsvn->paths
=& new Paths($conf['other']['pathtype']);
94 /*=====================================================================*\
95 || ###################################################################
98 || ###################################################################
99 \*=====================================================================*/