1 |
ac24dc24
|
Renato Botelho
|
/*
|
2 |
|
|
* resetwebgui
|
3 |
|
|
*
|
4 |
|
|
* part of pfSense (https://www.pfsense.org)
|
5 |
38809d47
|
Renato Botelho do Couto
|
* Copyright (c) 2016 Electric Sheep Fencing
|
6 |
8f2f85c3
|
Luiz Otavio O Souza
|
* Copyright (c) 2016-2022 Rubicon Communications, LLC (Netgate)
|
7 |
ac24dc24
|
Renato Botelho
|
* All rights reserved.
|
8 |
|
|
*
|
9 |
b12ea3fb
|
Renato Botelho
|
* 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 |
ac24dc24
|
Renato Botelho
|
*
|
13 |
b12ea3fb
|
Renato Botelho
|
* http://www.apache.org/licenses/LICENSE-2.0
|
14 |
ac24dc24
|
Renato Botelho
|
*
|
15 |
b12ea3fb
|
Renato Botelho
|
* 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 |
ac24dc24
|
Renato Botelho
|
*/
|
21 |
|
|
|
22 |
9202151e
|
Phil Davis
|
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 |
ac24dc24
|
Renato Botelho
|
echo "done.\n";
|