diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-07-23 13:34:37 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-07-23 13:34:37 -0300 |
commit | a7f2d1fd48ecf3b8280699e0ce36618857aa9ff5 (patch) | |
tree | 4905298e2fe053db43acc7ed0dcfebb1b81745a2 /config/openbgpd | |
parent | 4211de072511ca5a1a7cd3929f3812d62c461173 (diff) | |
download | pfsense-packages-a7f2d1fd48ecf3b8280699e0ce36618857aa9ff5.tar.gz pfsense-packages-a7f2d1fd48ecf3b8280699e0ce36618857aa9ff5.tar.bz2 pfsense-packages-a7f2d1fd48ecf3b8280699e0ce36618857aa9ff5.zip |
simplify a bit using foreach
Diffstat (limited to 'config/openbgpd')
-rw-r--r-- | config/openbgpd/openbgpd_status.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index 330062e5..228ff42b 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -86,18 +86,16 @@ function listCmds() { global $commands; echo "<p>This status page includes the following information:\n"; echo "<ul width=\"700\">\n"; - for ($i = 0; isset($commands[$i]); $i++ ) { - echo "<li><strong><a href=\"#" . $commands[$i][0] . "\">" . $commands[$i][0] . "</a></strong></li>\n"; - } + foreach ($commands as $command) + echo "<li><strong><a href=\"#" . $command[0] . "\">" . $command[0] . "</a></strong></li>\n"; echo "</ul>\n"; } /* Execute all of the commands which were defined by a call to defCmd. */ function execCmds() { global $commands; - for ($i = 0; isset($commands[$i]); $i++ ) { - doCmdT($commands[$i][0], $commands[$i][1]); - } + foreach ($commands as $command) + doCmdT($command[0], $command[1]); } ?> |