diff options
author | jim-p <jimp@pfsense.org> | 2011-04-07 12:09:34 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-04-07 12:10:46 -0400 |
commit | 60adc79cfe57d17d0727bd41cbcce755233b97b3 (patch) | |
tree | 5aed99b6bc73235276fc23671941bc5f05e56656 /config/openvpn-client-export | |
parent | 91cd99c0faf212d12fec820afb34bbfef5ed5c9d (diff) | |
download | pfsense-packages-60adc79cfe57d17d0727bd41cbcce755233b97b3.tar.gz pfsense-packages-60adc79cfe57d17d0727bd41cbcce755233b97b3.tar.bz2 pfsense-packages-60adc79cfe57d17d0727bd41cbcce755233b97b3.zip |
Misc shared key export fixes.
Diffstat (limited to 'config/openvpn-client-export')
-rw-r--r-- | config/openvpn-client-export/vpn_openvpn_export_shared.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/config/openvpn-client-export/vpn_openvpn_export_shared.php b/config/openvpn-client-export/vpn_openvpn_export_shared.php index 95cc37bd..60bd09d4 100644 --- a/config/openvpn-client-export/vpn_openvpn_export_shared.php +++ b/config/openvpn-client-export/vpn_openvpn_export_shared.php @@ -58,6 +58,7 @@ foreach($a_server as $sindex => $server) { $name = "Shared Key Server {$prot}:{$port}"; $ras_serverent['index'] = $sindex; $ras_serverent['name'] = $name; + $ras_serverent['mode'] = $server['mode']; $ras_server[] = $ras_serverent; } @@ -159,7 +160,7 @@ var servers = new Array(); servers[<?=$sindex;?>] = new Array(); servers[<?=$sindex;?>][0] = '<?=$server['index'];?>'; servers[<?=$sindex;?>][1] = new Array(); -servers[<?=$sindex;?>][2] = '<?=$server['mode'];?>';; +servers[<?=$sindex;?>][2] = '<?=$server['mode'];?>'; <? endforeach; ?> function download_begin(act) { @@ -213,7 +214,7 @@ function download_begin(act) { } var dlurl; - dlurl = "/vpn_openvpn_export.php?act=" + act; + dlurl = "/vpn_openvpn_export_shared.php?act=" + act; dlurl += "&srvid=" + servers[index][0]; dlurl += "&useaddr=" + useaddr; if (useproxy) { @@ -237,15 +238,17 @@ function server_changed() { var index = document.getElementById("server").selectedIndex; - var row = table.insertRow(table.rows.length); - var cell0 = row.insertCell(0); - var cell1 = row.insertCell(1); - cell0.className = "listlr"; - cell0.innerHTML = "Other Shared Key OS Client"; - cell1.className = "listr"; - cell1.innerHTML = "<a href='javascript:download_begin(\"skconf\")'>Configuration</a>"; - cell1.innerHTML += " / "; - cell1.innerHTML += "<a href='javascript:download_begin(\"skzipconf\")'>Configuration archive</a>"; + if (servers[index][2] == 'p2p_shared_key') { + var row = table.insertRow(table.rows.length); + var cell0 = row.insertCell(0); + var cell1 = row.insertCell(1); + cell0.className = "listlr"; + cell0.innerHTML = "Other Shared Key OS Client"; + cell1.className = "listr"; + cell1.innerHTML = "<a href='javascript:download_begin(\"skconf\")'>Configuration</a>"; + cell1.innerHTML += "<br/>"; + cell1.innerHTML += "<a href='javascript:download_begin(\"skzipconf\")'>Configuration archive</a>"; + } } function useaddr_changed(obj) { |