summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-03-05 19:51:09 +0100
committerRenato Botelho <renato@netgate.com>2017-03-07 08:16:50 -0300
commit06321cfb090eb8175e1feffc5e85acbb43b68b75 (patch)
treee5d63f9dda12e6e4bdec1fa3181fe303947d555d /src/usr/local
parentaa4d720501721eb49aa7e2526eeeee86cc31dfbd (diff)
downloadpfsense-06321cfb090eb8175e1feffc5e85acbb43b68b75.zip
pfsense-06321cfb090eb8175e1feffc5e85acbb43b68b75.tar.gz
Remove useless add_base_packages_menu_items() function
Not really sure what was the idea 7+ years ago, but the code just doesn't make sense now. (cherry picked from commit 94503103d8ce4e34de79f221f4fdd24f07dccb93)
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/diag_backup.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index 88e44a8..1c76277 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -149,38 +149,6 @@ function restore_rrddata() {
}
}
-function add_base_packages_menu_items() {
- global $g, $config;
- $base_packages = explode(",", $g['base_packages']);
- $modified_config = false;
- foreach ($base_packages as $bp) {
- $basepkg_path = "/usr/local/pkg/{$bp}";
- $tmpinfo = pathinfo($basepkg_path, PATHINFO_EXTENSION);
- if ($tmpinfo['extension'] == "xml" && file_exists($basepkg_path)) {
- $pkg_config = parse_xml_config_pkg($basepkg_path, "packagegui");
- if ($pkg_config['menu'] != "") {
- if (is_array($pkg_config['menu'])) {
- foreach ($pkg_config['menu'] as $menu) {
- if (is_array($config['installedpackages']['menu'])) {
- foreach ($config['installedpackages']['menu'] as $amenu) {
- if ($amenu['name'] == $menu['name']) {
- continue;
- }
- }
- }
- $config['installedpackages']['menu'][] = $menu;
- $modified_config = true;
- }
- }
- }
- }
- }
- if ($modified_config) {
- write_config(gettext("Restored base_package menus after configuration restore."));
- $config = parse_config(true);
- }
-}
-
function remove_bad_chars($string) {
return preg_replace('/[^a-z_0-9]/i', '', $string);
}
@@ -341,7 +309,6 @@ if ($_POST) {
unset($config['rrddata']);
unlink_if_exists("{$g['tmp_path']}/config.cache");
write_config();
- add_base_packages_menu_items();
convert_config();
conf_mount_ro();
}
@@ -379,7 +346,6 @@ if ($_POST) {
unset($config['rrddata']);
unlink_if_exists("{$g['tmp_path']}/config.cache");
write_config();
- add_base_packages_menu_items();
convert_config();
conf_mount_ro();
}
@@ -441,7 +407,6 @@ if ($_POST) {
}
$config['diag']['ipv6nat'] = true;
write_config();
- add_base_packages_menu_items();
convert_config();
conf_mount_ro();
$savemsg = gettext("The m0n0wall configuration has been restored and upgraded to pfSense.");
OpenPOWER on IntegriCloud