summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-03-20 15:58:13 -0400
committerjim-p <jimp@pfsense.org>2013-03-20 15:58:13 -0400
commit33cc1e867728faeeae0716300fc13c6f2824b53d (patch)
tree47b3ab4ab83b52e1754ba15239fc5f15c6035f81 /usr/local/www/firewall_nat_out_edit.php
parentdaffbc34a912caeab791d2aa31ee70e1aed5a8e1 (diff)
downloadpfsense-33cc1e867728faeeae0716300fc13c6f2824b53d.zip
pfsense-33cc1e867728faeeae0716300fc13c6f2824b53d.tar.gz
Add the user/time tracking to Port forwards and outbound NAT also.
Diffstat (limited to 'usr/local/www/firewall_nat_out_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 5552071..479f6f4 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -74,6 +74,12 @@ if (isset($_GET['dup'])) {
}
if (isset($id) && $a_out[$id]) {
+ if ( isset($a_out[$id]['created']) && is_array($a_out[$id]['created']) )
+ $pconfig['created'] = $a_out[$id]['created'];
+
+ if ( isset($a_out[$id]['updated']) && is_array($a_out[$id]['updated']) )
+ $pconfig['updated'] = $a_out[$id]['updated'];
+
$pconfig['protocol'] = $a_out[$id]['protocol'];
list($pconfig['source'],$pconfig['source_subnet']) = explode('/', $a_out[$id]['source']['network']);
if (!is_numeric($pconfig['source_subnet']))
@@ -294,12 +300,18 @@ if ($_POST) {
$natent['destination']['not'] = true;
}
+ if ( isset($a_out[$id]['created']) && is_array($a_out[$id]['created']) )
+ $natent['created'] = $a_out[$id]['created'];
+
+ $natent['updated'] = make_config_revision_entry();
+
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/pre_write_config");
if (isset($id) && $a_out[$id]) {
$a_out[$id] = $natent;
} else {
+ $natent['created'] = make_config_revision_entry();
if (is_numeric($after)) {
array_splice($a_out, $after+1, 0, array($natent));
} else {
@@ -655,6 +667,34 @@ any)");?></td>
"for your reference (not parsed).");?></span></td>
</tr>
<?php
+$has_created_time = (isset($a_out[$id]['created']) && is_array($a_out[$id]['created']));
+$has_updated_time = (isset($a_out[$id]['updated']) && is_array($a_out[$id]['updated']));
+?>
+ <?php if ($has_created_time || $has_updated_time): ?>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Rule Information");?></td>
+ </tr>
+ <?php if ($has_created_time): ?>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Created");?></td>
+ <td width="78%" class="vtable">
+ <?= date(gettext("n/j/y H:i:s"), $a_out[$id]['created']['time']) ?> <?= gettext("by") ?> <strong><?= $a_out[$id]['created']['username'] ?></strong>
+ </td>
+ </tr>
+ <?php endif; ?>
+ <?php if ($has_updated_time): ?>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Updated");?></td>
+ <td width="78%" class="vtable">
+ <?= date(gettext("n/j/y H:i:s"), $a_out[$id]['updated']['time']) ?> <?= gettext("by") ?> <strong><?= $a_out[$id]['updated']['username'] ?></strong>
+ </td>
+ </tr>
+ <?php endif; ?>
+ <?php endif; ?>
+<?php
// Allow extending of the firewall edit page and include custom input validation
pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/htmlphplate");
?>
OpenPOWER on IntegriCloud