summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-04-28 21:10:57 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-04-28 21:10:57 -0600
commit1364604bb503b02e80240bda728e154394271b9c (patch)
tree9ed6f376402c6759a70585dc2660daa575ce6d83 /usr/local/www/system_routes.php
parentedc7a2815f7f89b1466a2b85ee52f2072d097b81 (diff)
parent01dcf2b396fdf374e7cc466f4619b1ff14a1bec6 (diff)
downloadpfsense-1364604bb503b02e80240bda728e154394271b9c.zip
pfsense-1364604bb503b02e80240bda728e154394271b9c.tar.gz
Merge remote branch 'mainline/master'
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 a9160c5..fc24962 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 = "Static Routes: ";
if ($_POST) {
@@ -92,6 +89,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_routes[$_GET['id']]) {
$changedesc .= "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