summaryrefslogtreecommitdiffstats
path: root/usr/local/www/fbegin.inc
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-05-17 16:49:24 -0400
committerDarren Embry <dse@webonastick.com>2012-05-17 16:49:24 -0400
commit976d0213c11c54ddd88b8923047c59b86445ffd8 (patch)
treed516d453c002e0d5c90fc0857c491e6a4d2575cc /usr/local/www/fbegin.inc
parentdcb94db5d8d4b3af790bcf0c90af6c79b34f7dec (diff)
downloadpfsense-976d0213c11c54ddd88b8923047c59b86445ffd8.zip
pfsense-976d0213c11c54ddd88b8923047c59b86445ffd8.tar.gz
fix cosmetic bug when developer was turned on.
highlight the hidden menu item differently.
Diffstat (limited to 'usr/local/www/fbegin.inc')
-rwxr-xr-xusr/local/www/fbegin.inc26
1 files changed, 19 insertions, 7 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 31bc627..e700a86 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -74,11 +74,23 @@ function return_ext_menu($section) {
return $extarray;
}
-function output_menu($arrayitem, $target="") {
- foreach($arrayitem as $item) {
- if($target)
- $targetinfo = "target='{$target}'";
- echo '<li><a ' . $targetinfo. ' href="' . $item[1] . '" class="navlnk">' . $item[0] . '</a></li>' . "\n";
+function output_menu($arrayitem, $target = null) {
+ foreach ($arrayitem as $item) {
+ $attr = sprintf("href=\"%s\"", htmlentities($item[1]));
+ if ($target) {
+ $attr .= sprintf(" target=\"%s\"", htmlentities($target));
+ }
+ $class = "navlnk";
+ if ($item['class']) {
+ $class .= " {$item['class']}";
+ }
+ $attr .= sprintf(" class=\"%s\"", htmlentities($class));
+ if ($item['style']) {
+ $attr .= sprintf(" style=\"%s\"", htmlentities($item['style']));
+ }
+ echo "<li>\n";
+ printf("<a %s>%s</a>\n", $attr, $item[0]);
+ echo "</li>\n";
}
}
@@ -217,8 +229,8 @@ if($g['platform'] == "nanobsd")
$diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php");
if (isset($config['system']['developer'])) {
- echo "<li><hr width=\"80%\"/></li>";
- $diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php");
+ $diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php", "style" => "font-weight: bold; color: yellow;");
+
}
$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")),0);
OpenPOWER on IntegriCloud