Project

General

Profile

Download (2.08 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * config.gui.inc
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2013 BSD Perimeter
7
 * Copyright (c) 2013-2016 Electric Sheep Fencing
8
 * Copyright (c) 2014-2021 Rubicon Communications, LLC (Netgate)
9
 * All rights reserved.
10
 *
11
 * originally part of m0n0wall (http://m0n0.ch/wall)
12
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
13
 * All rights reserved.
14
 *
15
 * Licensed under the Apache License, Version 2.0 (the "License");
16
 * you may not use this file except in compliance with the License.
17
 * You may obtain a copy of the License at
18
 *
19
 * http://www.apache.org/licenses/LICENSE-2.0
20
 *
21
 * Unless required by applicable law or agreed to in writing, software
22
 * distributed under the License is distributed on an "AS IS" BASIS,
23
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
 * See the License for the specific language governing permissions and
25
 * limitations under the License.
26
 */
27

    
28
require_once("globals.inc");
29

    
30
/* do not load this file twice. */
31
if ($config_parsed == true) {
32
	return;
33
} else {
34
	$config_parsed = true;
35
}
36

    
37
/* include globals from notices.inc /utility/XML parser files */
38
require_once('config.lib.inc');
39
require_once("notices.inc");
40
require_once("util.inc");
41
require_once("Net/IPv6.php");
42
if (file_exists("/cf/conf/use_xmlreader")) {
43
	require_once("xmlreader.inc");
44
} else {
45
	require_once("xmlparse.inc");
46
}
47
require_once("crypt.inc");
48

    
49
/* if /debugging exists, lets set $debugging
50
   so we can output more information */
51
if (file_exists("/debugging")) {
52
	$debugging = true;
53
	$g['debug'] = true;
54
}
55

    
56
$config = parse_config();
57

    
58
/* set timezone */
59
if (isset($config['system']['timezone']) &&
60
    !empty($config['system']['timezone'])) {
61
	$timezone = $config['system']['timezone'];
62
} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
63
	$timezone = $g['default_timezone'];
64
} else {
65
	$timezone = "Etc/UTC";
66
}
67
date_default_timezone_set("$timezone");
68

    
69
if ($config_parsed == true) {
70
	/* process packager manager custom rules */
71
	if (is_dir("/usr/local/pkg/parse_config")) {
72
		run_plugins("/usr/local/pkg/parse_config/");
73
	}
74
}
75

    
76
?>
(9-9/61)