Project

General

Profile

Download (1.49 KB) Statistics
| Branch: | Tag: | Revision:
1
/*
2
 * resetwebgui
3
 *
4
 * part of pfSense (https://www.pfsense.org)
5
 * Copyright (c) 2016 Electric Sheep Fencing
6
 * Copyright (c) 2016-2022 Rubicon Communications, LLC (Netgate)
7
 * All rights reserved.
8
 *
9
 * Licensed under the Apache License, Version 2.0 (the "License");
10
 * you may not use this file except in compliance with the License.
11
 * You may obtain a copy of the License at
12
 *
13
 * http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing, software
16
 * distributed under the License is distributed on an "AS IS" BASIS,
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
 * See the License for the specific language governing permissions and
19
 * limitations under the License.
20
 */
21

    
22
global $config;
23

    
24
$config = parse_config(true);
25
$default_theme = "pfSense.css";
26
$default_columns = 2;
27
$default_widgets = "system_information:col1:show,interfaces:col2:show";
28

    
29
echo "Resetting webGUI:\n";
30
echo "  Theme to " . $default_theme . "\n";
31
echo "  Dashboard columns to " . $default_columns . "\n";
32
echo "  Top navigation to scroll\n";
33
echo "  Widgets to System Information and Interfaces\n";
34
echo "...";
35

    
36
$config['system']['webgui']['webguicss'] = $default_theme;
37
$config['system']['webgui']['dashboardcolumns'] = $default_columns;
38

    
39
if (isset($config['system']['webgui']['webguifixedmenu'])) {
40
	unset($config['system']['webgui']['webguifixedmenu']);
41
}
42

    
43
$config['widgets']['sequence'] = $default_widgets;
44

    
45
write_config("pfSsh.php reset webGUI");
46

    
47
echo "done.\n";
(21-21/27)