summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-23 20:42:48 +0545
committerGitHub <noreply@github.com>2017-01-23 20:42:48 +0545
commit93abbfaa5815ceaceb93f64612541d86cc15adaf (patch)
tree8456685f14c6b1b541e0a4386c3b926d39253ff3 /src/usr/local
parentb07adc116c47a2f6a27ae69c84fe0e36a5a27fbd (diff)
parentd24f8149e5567be22d5085f468cb3f1ec21819eb (diff)
downloadpfsense-93abbfaa5815ceaceb93f64612541d86cc15adaf.zip
pfsense-93abbfaa5815ceaceb93f64612541d86cc15adaf.tar.gz
Merge branch 'master' into patch-4
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/firewall_nat_edit.php2
-rw-r--r--src/usr/local/www/help.php39
-rwxr-xr-xsrc/usr/local/www/interfaces.php2
3 files changed, 29 insertions, 14 deletions
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index c1cc5b8..3833a1d 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -1111,7 +1111,7 @@ events.push(function() {
disableInput('localbeginport', true);
disableInput('localbeginport_cust', true);
disableInput('dstendport_cust', false);
- ddisableInput('localbeginport', false);
+ disableInput('localbeginport', false);
disableInput('localbeginport_cust', false);
}
diff --git a/src/usr/local/www/help.php b/src/usr/local/www/help.php
index 9954067..9c4b9a6 100644
--- a/src/usr/local/www/help.php
+++ b/src/usr/local/www/help.php
@@ -346,9 +346,11 @@ if (empty($pagename)) {
$pagename = $uri_split[1];
}
- /* If the page name is still empty, the user must have requested / (index.php) */
- if (empty($pagename)) {
- $pagename = "index.php";
+ /* If the referrer was index.php then this was a redirect to help.php
+ because help.php was the first page the user has priv to.
+ In that case we do not want to redirect off to the dashboard help. */
+ if ($pagename == "index.php") {
+ $pagename = "";
}
/* If the filename is pkg_edit.php or wizard.php, reparse looking
@@ -365,18 +367,31 @@ if (empty($pagename)) {
}
/* Using the derived page name, attempt to find in the URL mapping hash */
-if (array_key_exists($pagename, $helppages)) {
- $helppage = $helppages[$pagename];
+if (strlen($pagename) > 0) {
+ if (array_key_exists($pagename, $helppages)) {
+ $helppage = $helppages[$pagename];
+ } else {
+ // If no specific page was found, use a generic help page
+ $helppage = 'https://doc.pfsense.org/index.php/No_Help_Found';
+ }
+
+ /* Redirect to help page. */
+ header("Location: {$helppage}");
}
-/* If we haven't determined a proper page, use a generic help page
- stating that a given page does not have help yet. */
+// No page name was determined, so show a message.
+$pgtitle = array(gettext("Help"), gettext("About this Page"));
+require_once("head.inc");
-if (empty($helppage)) {
- $helppage = 'https://doc.pfsense.org/index.php/No_Help_Found';
+if (is_array($allowedpages) && str_replace('*', '', $allowedpages[0]) == "help.php") {
+ if (count($allowedpages) == 1) {
+ print_info_box(gettext("The Help page is the only page this user has privilege for."));
+ } else {
+ print_info_box(gettext("Displaying the Help page because it is the first page this user has privilege for."));
+ }
+} else {
+ print_info_box(gettext("Help page accessed directly without any page parameter."));
}
-/* Redirect to help page. */
-header("Location: {$helppage}");
-
+include("foot.inc");
?>
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index e766074..95e6dd2 100755
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -516,7 +516,7 @@ if ($_POST['apply']) {
if (is_array($config['ifgroups']['ifgroupentry'])) {
foreach ($config['ifgroups']['ifgroupentry'] as $ifgroupentry) {
if ($ifgroupentry['ifname'] == $_POST['descr']) {
- $input_errors[] = sprintf(gettext("Sorry, an interface group with the name %s already exists."), $wancfg['descr']);
+ $input_errors[] = sprintf(gettext("Sorry, an interface group with the name %s already exists."), $_POST['descr']);
}
}
}
OpenPOWER on IntegriCloud