summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-04-28 21:17:27 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-04-28 21:17:27 -0600
commitc3c2fd205b1563976a278bd11396d055d7818d27 (patch)
treeae0316ca6b0c8423c35fe22cfa1e8bcaf30cdd55 /usr/local/www/system_routes.php
parent39c0be7b5f387dffa7cbbb3dff3f2be46e6b504f (diff)
parent1364604bb503b02e80240bda728e154394271b9c (diff)
downloadpfsense-c3c2fd205b1563976a278bd11396d055d7818d27.zip
pfsense-c3c2fd205b1563976a278bd11396d055d7818d27.tar.gz
Merge branch 'master' into gettext
Resolved conflicts: usr/local/www/system_advanced_firewall.php usr/local/www/system_routes.php usr/local/www/system_routes_edit.php
Diffstat (limited to 'usr/local/www/system_routes.php')
-rwxr-xr-xusr/local/www/system_routes.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php
index 9defed7..9057afc 100755
--- a/usr/local/www/system_routes.php
+++ b/usr/local/www/system_routes.php
@@ -47,11 +47,8 @@ require_once("shaper.inc");
if (!is_array($config['staticroutes']['route']))
$config['staticroutes']['route'] = array();
-if (!is_array($config['gateways']['gateway_item']))
- $config['gateways']['gateway_item'] = array();
-
$a_routes = &$config['staticroutes']['route'];
-$a_gateways = &$config['gateways']['gateway_item'];
+$a_gateways = return_gateways_array(true);
$changedesc = gettext("Static Routes") . ": ";
if ($_POST) {
@@ -92,6 +89,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_routes[$_GET['id']]) {
$changedesc .= gettext("removed route to") . " " . $a_routes[$_GET['id']['route']];
+ mwexec("/sbin/route delete " . escapeshellarg($a_routes[$_GET['id']]['network']));
unset($a_routes[$_GET['id']]);
write_config($changedesc);
mark_subsystem_dirty('staticroutes');
@@ -160,17 +158,12 @@ include("head.inc");
</td>
<td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
<?php
- echo $route['gateway'] . " ";
+ echo $a_gateways[$route['gateway']]['name'] . " ";
?>
</td>
<td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
<?php
- foreach($a_gateways as $gateway) {
- if($gateway['name'] == $route['gateway']) {
- echo strtoupper($gateway['interface']) . " ";
- }
- }
-
+ echo convert_friendly_interface_to_friendly_descr($a_gateways[$route['gateway']]['friendlyiface']) . " ";
?>
</td>
<td class="listbg" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
OpenPOWER on IntegriCloud