Adding language settings to config.php so that people can control the language output...
[viewsvn.git] / global.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 require_once('./includes/init.php');
23
24 require_once('./includes/functions.php');
25 require_once('./includes/class_revision.php');
26
27 // ###################################################################
28 // define the path variables
29 $atpos = strpos($input->in['path'], '@');
30 $input->in['rev'] = $input->clean(substr($input->in['path'], $atpos + 1), TYPE_UINT);
31 if ($atpos !== false)
32 {
33 $input->in['path'] = substr($input->in['path'], 0, strpos($input->in['path'], '@'));
34 }
35
36 // ###################################################################
37 // setup the SVN library
38 require_once('./includes/class_libsvn.php');
39 BSRegister::Register('lib', $lib = new LibSVN($conf['paths']['svn']));
40
41 $fetchtemplates[] = 'header';
42 $fetchtemplates[] = 'footer';
43 $fetchtemplates[] = 'doctype';
44 $fetchtemplates[] = 'headinclude';
45
46 $show['reposchooser'] = false;
47
48 if ($repos->container AND !$hideChooser)
49 {
50 $show['reposchooser'] = true;
51 $fetchtemplates[] = 'select_option';
52 }
53
54 $template->cache((array)$fetchtemplates);
55
56 $options = '';
57 if ($show['reposchooser'])
58 {
59 $html = '';
60 $options = $repos->fetchList();
61 foreach ($options AS $option)
62 {
63 $value = $option;
64 $display = $option;
65 $selected = ($controller->repos == $option ? true : false);
66 eval('$html .= "' . $template->fetch('select_option') . '";');
67 }
68 $options = $html;
69 }
70
71 $year = date('Y');
72
73 eval('$header = "' . $template->fetch('header') . '";');
74 eval('$footer = "' . $template->fetch('footer') . '";');
75 eval('$doctype = "' . $template->fetch('doctype') . '";');
76 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
77
78 /*=====================================================================*\
79 || ###################################################################
80 || # $HeadURL$
81 || # $Id$
82 || ###################################################################
83 \*=====================================================================*/
84 ?>