diff options
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/interfaces.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 4 | ||||
-rw-r--r-- | src/usr/local/www/services_dnsmasq.php | 41 | ||||
-rw-r--r-- | src/usr/local/www/shortcuts.inc | 6 | ||||
-rw-r--r-- | src/usr/local/www/widgets/widgets/installed_packages.widget.php | 30 |
5 files changed, 38 insertions, 45 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index a0aa609..11b6132 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -3186,7 +3186,7 @@ events.push(function(){ break; } case "staticv4": { - $('.dhcpadvanced, .none, dhcp').hide(); + $('.dhcpadvanced, .none, .dhcp').hide(); $('.pppoe, .pptp, .ppp').hide(); break; } diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index ba4dc2e..08a6f7f 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -389,8 +389,8 @@ if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"): $start_polling = true; } ?> - <input type="hidden" name="id" value="<?=$_POST['id']?>" /> - <input type="hidden" name="mode" value="<?=$_POST['mode']?>" /> + <input type="hidden" name="id" value="<?=htmlspecialchars($_POST['id'])?>" /> + <input type="hidden" name="mode" value="<?=htmlspecialchars($_POST['mode'])?>" /> <input type="hidden" name="completed" value="true" /> <div id="countdown" style="text-align: center;"></div> diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php index 9c11d4a..56c4294 100644 --- a/src/usr/local/www/services_dnsmasq.php +++ b/src/usr/local/www/services_dnsmasq.php @@ -102,16 +102,21 @@ $a_hosts = &$config['dnsmasq']['hosts']; $a_domainOverrides = &$config['dnsmasq']['domainoverrides']; if ($_POST) { - if($_POST['apply']) { - // Reload filter (we might need to sync to CARP hosts) - $retval = filter_configure(); - /* Update resolv.conf in case the interface bindings exclude localhost. */ - system_resolvconf_generate(); - /* Start or restart dhcpleases when it's necessary */ - system_dhcpleases_configure(); - if ($retval == 0) { - clear_subsystem_dirty('hosts'); - } + if ($_POST['apply']) { + $retval = 0; + $retval = services_dnsmasq_configure(); + $savemsg = get_std_save_message($retval); + + // Reload filter (we might need to sync to CARP hosts) + filter_configure(); + /* Update resolv.conf in case the interface bindings exclude localhost. */ + system_resolvconf_generate(); + /* Start or restart dhcpleases when it's necessary */ + system_dhcpleases_configure(); + + if ($retval == 0) { + clear_subsystem_dirty('hosts'); + } } else { $pconfig = $_POST; unset($input_errors); @@ -161,21 +166,7 @@ if ($_POST) { if (!$input_errors) { write_config(); - - $retval = 0; - $retval = services_dnsmasq_configure(); - $savemsg = get_std_save_message($retval); - - // Reload filter (we might need to sync to CARP hosts) - filter_configure(); - /* Update resolv.conf in case the interface bindings exclude localhost. */ - system_resolvconf_generate(); - /* Start or restart dhcpleases when it's necessary */ - system_dhcpleases_configure(); - - if ($retval == 0) { - clear_subsystem_dirty('hosts'); - } + mark_subsystem_dirty('hosts'); } } } diff --git a/src/usr/local/www/shortcuts.inc b/src/usr/local/www/shortcuts.inc index b2d021c..350733d 100644 --- a/src/usr/local/www/shortcuts.inc +++ b/src/usr/local/www/shortcuts.inc @@ -124,7 +124,7 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service = break; } if (!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}")) { - return "{$space}<a href=\"{$link}\" title=\"" . gettext("Main page for this section") . "\"><i class=\"fa fa-plus-circle\"></i></a>"; + return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related settings") . "\"><i class=\"fa fa-sliders\"></i></a>"; } } @@ -152,7 +152,7 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service break; } if (!empty($link)) { - return "{$space}<a href=\"{$link}\" title=\"" . gettext("Status of items on this page") . "\"><i class=\"fa fa-cog\"></i></a>"; + return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related status") . "\"><i class=\"fa fa-cog\"></i></a>"; } } @@ -160,7 +160,7 @@ function get_shortcut_log_link($shortcut_section, $addspace = true) { global $g, $shortcuts; $space = ($addspace) ? " " : "" ; if (!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) { - return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Log entries for items on this page") . "\"><i class=\"fa fa-list-alt\"></i></a>"; + return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Related log entries") . "\"><i class=\"fa fa-list-alt\"></i></a>"; } } diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php index 17e9439..5f7e29a 100644 --- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php +++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php @@ -66,12 +66,20 @@ require_once("functions.inc"); require_once("/usr/local/www/widgets/include/installed_packages.inc"); require_once("pkg-utils.inc"); -$package_list = get_pkg_info(); -$installed_packages = array_filter($package_list, function($v) { - return (isset($v['installed']) || isset($v['broken'])); -}); - if($_REQUEST && $_REQUEST['ajax']) { + $package_list = get_pkg_info(); + $installed_packages = array_filter($package_list, function($v) { + return (isset($v['installed']) || isset($v['broken'])); + }); + + if (empty($installed_packages)) { + print("<div class=\"alert alert-warning\" role=\"alert\">\n"); + print(" <strong>No packages installed.</strong>\n"); + print(" You can install packages <a href=\"pkg_mgr.php\" class=\"alert-link\">here</a>.\n"); + print("</div>\n"); + exit; + } + print("<thead>\n"); print( "<tr>\n"); print( "<th>" . gettext("Name") . "</th>\n"); @@ -163,19 +171,13 @@ if($_REQUEST && $_REQUEST['ajax']) { exit; } +?> -if (empty($installed_packages)): ?> -<div class="alert alert-warning" role="alert"> - <strong>No packages installed.</strong> - You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>. -</div> -<?php else: ?> <div class="table-responsive"> <table id="pkgtbl" class="table table-striped table-hover table-condensed"> - <tr><td><?=gettext("Retrieving package data")?></td></tr> + <tr><td><?=gettext("Retrieving package data")?> <i class="fa fa-cog fa-spin"</i></td></tr> </table> </div> -<?php endif; ?> <div style="text-align: center;"> <?=gettext("Packages may be added/managed here: ")?> <a href="pkg_mgr_installed.php">System ->Packages</a> @@ -206,4 +208,4 @@ if (empty($installed_packages)): ?> get_pkg_stats(); }); //]]> -</script>
\ No newline at end of file +</script> |