]> src.bluestatic.org Git - bugdar.git/blob - global.php
We were hitting an infinite loop with isso_pre_parse_hook
[bugdar.git] / global.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar
5 || # Copyright ©2002-2007 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 2 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 define('HTML_CHECKED', ' checked="checked"');
25
26 // ###################################################################
27 // initialize template system
28 require_once ISSO . '/Template.php';
29 BSTemplate::$preParseHook = 'isso_pre_parse_hook';
30 BSTemplate::$dbCacheTable = TABLE_PREFIX . 'template';
31 BSTemplate::$langcall = 'T';
32 BSTemplate::$templatePath = 'templates/%s.tpl';
33
34 // ###################################################################
35 // global template variables
36 $datetime = $datef->format('l, F j, Y g:i A');
37 $year = $datef->format('Y');
38 $version = bugdar::$options['trackerversion'];
39
40 $show = array(
41 'admin' => can_perform('canadminpanel'),
42 'newreport' => can_perform('cansubmitbugs'),
43 'search' => can_perform('cansearch')
44 );
45
46 if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
47 {
48 // ###################################################################
49 // cache templates
50 $globaltemplates = array(
51 'doctype',
52 'header',
53 'headinclude',
54 'footer',
55 'selectoption',
56 'selectoptgroup',
57 'std_error',
58 'std_redirect',
59 'std_message',
60 'bugfield_input_text',
61 'bugfield_input_checkbox',
62 'bugfield_select_single_option',
63 'bugfield_select_single',
64 'username_display',
65 'help_link'
66 );
67
68 $start = microtime();
69
70 BSTemplate::cache(array_merge($globaltemplates, (array)$fetchtemplates));
71
72 BSApp::debug('time for tpl cache: ' . BSFunctions::fetch_microtime_diff($start));
73 }
74
75 // ###################################################################
76 // create error reporter
77 require_once('./includes/class_message_reporter.php');
78 $message = new MessageReporter();
79 $bugsys->message = $message;
80
81 /*=====================================================================*\
82 || ###################################################################
83 || # $HeadURL$
84 || # $Id$
85 || ###################################################################
86 \*=====================================================================*/
87 ?>