Project

General

Profile

Download (1.99 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-2018 Rubicon Communications, LLC (Netgate)
7
 * All rights reserved.
8
 *
9
 * originally part of m0n0wall (http://m0n0.ch/wall)
10
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
 * All rights reserved.
12
 *
13
 * 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
 *
17
 * http://www.apache.org/licenses/LICENSE-2.0
18
 *
19
 * 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
 */
25

    
26
require_once("globals.inc");
27

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

    
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
require_once("Net/IPv6.php");
40
if (file_exists("/cf/conf/use_xmlreader")) {
41
	require_once("xmlreader.inc");
42
} else {
43
	require_once("xmlparse.inc");
44
}
45
require_once("crypt.inc");
46

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

    
54
$config = parse_config();
55

    
56
/* set timezone */
57
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
	$timezone = "Etc/UTC";
64
}
65
date_default_timezone_set("$timezone");
66

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

    
74
?>
(9-9/60)