summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/exec.php2
-rwxr-xr-xusr/local/www/guiconfig.inc9
-rwxr-xr-xusr/local/www/interfaces.php10
-rwxr-xr-xusr/local/www/interfaces_assign.php2
-rwxr-xr-xusr/local/www/load_balancer_setting.php25
-rw-r--r--usr/local/www/services_dhcpv6.php3
-rwxr-xr-xusr/local/www/status_interfaces.php16
-rwxr-xr-xusr/local/www/system.php24
8 files changed, 80 insertions, 11 deletions
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php
index e9b0259..8dfd73d 100755
--- a/usr/local/www/exec.php
+++ b/usr/local/www/exec.php
@@ -230,7 +230,7 @@ if (!isBlank($_POST['txtCommand'])) {
puts("\$ " . htmlspecialchars($_POST['txtCommand']));
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " ")); /* PHP scripts */
- $ph = popen($_POST['txtCommand'], "r" );
+ $ph = popen($_POST['txtCommand'] . ' 2>&1', "r" );
while ($line = fgets($ph)) echo htmlspecialchars($line);
pclose($ph);
puts("</pre>");
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 684d531..cbdcb9a 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -78,6 +78,15 @@ foreach($apple_ua as $useragent)
if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
$g['theme'] = "pfsense";
+/* Set the default interface language */
+if($config['system']['language'] <> "") {
+ $g['language'] = $config['system']['language'];
+} elseif ($g['language'] == "") {
+ $g['language'] = 'en_US';
+}
+
+set_language($g['language']);
+
/* used by progress bar */
$lastseen = "-1";
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7ec972f..f72218d 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -561,10 +561,12 @@ if ($_POST['apply']) {
$input_errors[] = gettext("The MSS must be greater than 576 bytes.");
/* Wireless interface? */
if (isset($wancfg['wireless'])) {
- $reqdfields = "mode";
- if($_POST['mode'] == 'hostap') { $reqdfields += " ssid"; }
- $reqdfields = explode(" ", $reqdfields);
- $reqdfieldsn = array(gettext("Mode"),gettext("SSID"));
+ $reqdfields = array("mode");
+ $reqdfieldsn = array(gettext("Mode"));
+ if ($_POST['mode'] == 'hostap') {
+ $reqdfields[] = "ssid";
+ $reqdfieldsn[] = gettext("SSID");
+ }
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
check_wireless_mode();
/* loop through keys and enforce size */
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index f518b76..d8f5511 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -428,7 +428,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
$ifdescr = strtoupper($ifname);
?>
<tr>
- <td class="listlr" valign="middle"><strong><?=$ifdescr;?></strong></td>
+ <td class="listlr" valign="middle"><strong><u><span onclick="location.href='/interfaces.php?if=<?=$ifname;?>'" style="cursor: pointer;"><?=$ifdescr;?></span></strong></td>
<td valign="middle" class="listr">
<select onChange="javascript:jQuery('#savediv').show();" name="<?=$ifname;?>" id="<?=$ifname;?>">
<?php foreach ($portlist as $portname => $portinfo): ?>
diff --git a/usr/local/www/load_balancer_setting.php b/usr/local/www/load_balancer_setting.php
index 479b2d0..ffe7625 100755
--- a/usr/local/www/load_balancer_setting.php
+++ b/usr/local/www/load_balancer_setting.php
@@ -70,13 +70,24 @@ if ($_POST) {
}
if ($_POST['interval'] && !is_numeric($_POST['interval'])) {
- $input_errors[] = gettext("Interval must be a numeric value");
+ $input_errors[] = gettext("Interval must be a numeric value");
}
+ if ($_POST['prefork']) {
+ if (!is_numeric($_POST['prefork'])) {
+ $input_errors[] = gettext("Prefork must be a numeric value");
+ } else {
+ if (($_POST['prefork']<=0) || ($_POST['prefork']>32)) {
+ $input_errors[] = gettext("Prefork value must be between 1 and 32");
+ }
+ }
+ }
+
/* update config if user entry is valid */
if (!$input_errors) {
$lbsetting['timeout'] = $_POST['timeout'];
$lbsetting['interval'] = $_POST['interval'];
+ $lbsetting['prefork'] = $_POST['prefork'];
write_config();
mark_subsystem_dirty('loadbalancer');
@@ -121,7 +132,7 @@ include("head.inc");
<td colspan="2" valign="top" class="listtopic"><?=gettext("Relayd global settings"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Pool member timeout") ; ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("timeout") ; ?></td>
<td width="78%" class="vtable">
<input name="timeout" id="timeout" value="<?php if ($lbsetting['timeout'] <> "") echo $lbsetting['timeout']; ?>" class="formfld unknown">
<br />
@@ -129,13 +140,21 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Pool member check interval") ; ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("interval") ; ?></td>
<td width="78%" class="vtable">
<input name="interval" id="interval" value="<?php if ($lbsetting['interval'] <> "") echo $lbsetting['interval']; ?>" class="formfld unknown">
<br />
<?=gettext("Set the interval in seconds at which the member of a pool will be checked. Leave blank to use the default interval of 10 seconds"); ?>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("prefork") ; ?></td>
+ <td width="78%" class="vtable">
+ <input name="prefork" id="prefork" value="<?php if ($lbsetting['prefork'] <> "") echo $lbsetting['prefork']; ?>" class="formfld unknown">
+ <br />
+ <?=gettext("Number of processes used by relayd. Leave blank to use the default value of 5 processes"); ?>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
diff --git a/usr/local/www/services_dhcpv6.php b/usr/local/www/services_dhcpv6.php
index dc8cbc8..f873e0b 100644
--- a/usr/local/www/services_dhcpv6.php
+++ b/usr/local/www/services_dhcpv6.php
@@ -558,8 +558,7 @@ include("head.inc");
?>
-
<?php
- /* FIXME end of subnet calculation here */
- $range_to = gen_subnetv6_max($ifcfgip, $ifcfgsn);;
+ $range_to = gen_subnetv6_max($ifcfgip, $ifcfgsn);
echo $range_to;
?>
</td>
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index e998ae1..248667a 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -260,6 +260,22 @@ include("head.inc");
<?=htmlspecialchars($ifinfo['media']);?>
</td>
</tr>
+ <?php endif; if ($ifinfo['laggproto']): ?>
+ <tr>
+ <td width="22%" class="vncellt"><?=gettext("LAGG Protocol");?></td>
+ <td width="78%" class="listr">
+ <?=htmlspecialchars($ifinfo['laggproto']);?>
+ </td>
+ </tr>
+ <?php endif; if (is_array($ifinfo['laggport'])): ?>
+ <tr>
+ <td width="22%" class="vncellt"><?=gettext("LAGG Ports");?></td>
+ <td width="78%" class="listr">
+ <?php foreach ($ifinfo['laggport'] as $laggport) { ?>
+ <?php echo htmlspecialchars($laggport); ?><br/>
+ <?php } ?>
+ </td>
+ </tr>
<?php endif; ?><?php if ($ifinfo['channel']): ?>
<tr>
<td width="22%" class="vncellt"><?=gettext("Channel");?></td>
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index 6248ada..914f182 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -61,6 +61,7 @@ $pconfig['timezone'] = $config['system']['timezone'];
$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
$pconfig['timeservers'] = $config['system']['timeservers'];
$pconfig['theme'] = $config['system']['theme'];
+$pconfig['language'] = $config['system']['language'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
@@ -170,6 +171,11 @@ if ($_POST) {
update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
+ if($_POST['language'] && $_POST['language'] != $config['system']['language']) {
+ $config['system']['language'] = $_POST['language'];
+ set_language($config['system']['language']);
+ }
+
/* pfSense themes */
if (! $g['disablethemeselection']) {
update_if_changed("System Theme", $config['theme'], $_POST['theme']);
@@ -404,6 +410,24 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?php echo gettext("Language");?></td>
+ <td width="78%" class="vtable">
+ <select name="language">
+ <?php
+ foreach(get_locale_list() as $lcode => $ldesc) {
+ $selected = ' selected';
+ if($lcode != $pconfig['language'])
+ $selected = '';
+ echo "<option value=\"{$lcode}\"{$selected}>{$ldesc}</option>";
+ }
+ ?>
+ </select>
+ <strong>
+ <?=gettext("Choose a language for the webConfigurator"); ?>
+ </strong>
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<?php if (! $g['disablethemeselection']): ?>
OpenPOWER on IntegriCloud