Project

General

Profile

Download (1.99 KB) Statistics
| Branch: | Tag: | Revision:
1 65e2c06c Erik
<?php
2 09221bc3 Renato Botelho
/*
3 ac24dc24 Renato Botelho
 * config.gui.inc
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6 b8f91b7c Luiz Souza
 * Copyright (c) 2004-2018 Rubicon Communications, LLC (Netgate)
7 ac24dc24 Renato Botelho
 * All rights reserved.
8
 *
9
 * originally part of m0n0wall (http://m0n0.ch/wall)
10 c5d81585 Renato Botelho
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11 ac24dc24 Renato Botelho
 * All rights reserved.
12
 *
13 b12ea3fb Renato Botelho
 * Licensed under the Apache License, Version 2.0 (the "License");
14
 * you may not use this file except in compliance with the License.
15
 * You may obtain a copy of the License at
16 ac24dc24 Renato Botelho
 *
17 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
18 ac24dc24 Renato Botelho
 *
19 b12ea3fb Renato Botelho
 * Unless required by applicable law or agreed to in writing, software
20
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 * See the License for the specific language governing permissions and
23
 * limitations under the License.
24 ac24dc24 Renato Botelho
 */
25 65e2c06c Erik
26 06f61915 Ermal Lu?i
require_once("globals.inc");
27
28 65e2c06c Erik
/* do not load this file twice. */
29 1e0b1727 Phil Davis
if ($config_parsed == true) {
30 65e2c06c Erik
	return;
31 1e0b1727 Phil Davis
} else {
32 1883455a Ermal
	$config_parsed = true;
33 1e0b1727 Phil Davis
}
34 65e2c06c Erik
35
/* include globals from notices.inc /utility/XML parser files */
36
require_once('config.lib.inc');
37
require_once("notices.inc");
38
require_once("util.inc");
39 470fddb1 Renato Botelho
require_once("Net/IPv6.php");
40 1e0b1727 Phil Davis
if (file_exists("/cf/conf/use_xmlreader")) {
41 093bcebc Scott Ullrich
	require_once("xmlreader.inc");
42 1e0b1727 Phil Davis
} else {
43 093bcebc Scott Ullrich
	require_once("xmlparse.inc");
44 1e0b1727 Phil Davis
}
45 65e2c06c Erik
require_once("crypt.inc");
46
47
/* if /debugging exists, lets set $debugging
48
   so we can output more information */
49 1e0b1727 Phil Davis
if (file_exists("/debugging")) {
50 65e2c06c Erik
	$debugging = true;
51
	$g['debug'] = true;
52
}
53
54
$config = parse_config();
55
56 1ad2dc5b Ermal LUÇI
/* set timezone */
57 ecaca752 Renato Botelho
if (isset($config['system']['timezone']) &&
58
    !empty($config['system']['timezone'])) {
59
	$timezone = $config['system']['timezone'];
60
} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
61
	$timezone = $g['default_timezone'];
62
} else {
63 1e0b1727 Phil Davis
	$timezone = "Etc/UTC";
64
}
65 1ad2dc5b Ermal LUÇI
date_default_timezone_set("$timezone");
66
67 1e0b1727 Phil Davis
if ($config_parsed == true) {
68 65e2c06c Erik
	/* process packager manager custom rules */
69 1e0b1727 Phil Davis
	if (is_dir("/usr/local/pkg/parse_config")) {
70 65e2c06c Erik
		run_plugins("/usr/local/pkg/parse_config/");
71
	}
72
}
73
74 9b1ff028 Seth Mos
?>