aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc24
-rwxr-xr-xconfig/openvpn-client-export/vpn_openvpn_export.php4
2 files changed, 14 insertions, 14 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 5cd75ce8..d145c8a3 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -106,8 +106,8 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
}
// lookup server certificate info
- $server_cert =& lookup_cert($settings['certref']);
- $server_ca =& lookup_ca($server_cert['caref']);
+ $server_cert = lookup_cert($settings['certref']);
+ $server_ca = lookup_ca($server_cert['caref']);
if (!$server_cert || !$server_ca) {
$input_errors[] = "Could not locate certificate.";
return false;
@@ -115,7 +115,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
// lookup user info
if ($usrid) {
- $user =& $config['system']['user'][$usrid];
+ $user = $config['system']['user'][$usrid];
if (!$user) {
$input_errors[] = "Could not find user settings.";
return false;
@@ -124,7 +124,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
// lookup user certificate info
if ($settings['mode'] != "server_user") {
- $cert =& $user['cert'][$crtid];
+ $cert = $user['cert'][$crtid];
if (!$cert)
return false;
// If $cert is not an array, it's a certref not a cert.
@@ -273,8 +273,8 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
$nokeys = false;
// lookup server certificate info
- $server_cert =& lookup_cert($settings['certref']);
- $server_ca =& lookup_ca($server_cert['caref']);
+ $server_cert = lookup_cert($settings['certref']);
+ $server_ca = lookup_ca($server_cert['caref']);
if (!$server_cert || !$server_ca) {
$input_errors[] = "Could not find a valid certificate.";
return false;
@@ -282,7 +282,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
// lookup user info
if ($usrid) {
- $user =& $config['system']['user'][$usrid];
+ $user = $config['system']['user'][$usrid];
if (!$user) {
$input_errors[] = "Could not find the details about userid: {$usrid}";
return false;
@@ -291,7 +291,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
// lookup user certificate info
if ($settings['mode'] != "server_user") {
- $cert =& $user['cert'][$crtid];
+ $cert = $user['cert'][$crtid];
if (!$cert)
return false;
// If $cert is not an array, it's a certref not a cert.
@@ -396,21 +396,21 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
return false;
// lookup server certificate info
- $server_cert =& lookup_cert($settings['certref']);
- $server_ca =& lookup_ca($server_cert['caref']);
+ $server_cert = lookup_cert($settings['certref']);
+ $server_ca = lookup_ca($server_cert['caref']);
if (!$server_cert || !$server_ca)
return false;
// lookup user info
if ($usrid) {
- $user =& $config['system']['user'][$usrid];
+ $user = $config['system']['user'][$usrid];
if (!$user)
return false;
}
// lookup user certificate info
if ($settings['mode'] != "server_user") {
- $cert =& $user['cert'][$crtid];
+ $cert = $user['cert'][$crtid];
if (!$cert)
return false;
// If $cert is not an array, it's a certref not a cert.
diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php
index 0834941c..e0681aea 100755
--- a/config/openvpn-client-export/vpn_openvpn_export.php
+++ b/config/openvpn-client-export/vpn_openvpn_export.php
@@ -338,12 +338,12 @@ include("head.inc");
<!--
var servers = new Array();
-<?php foreach ($ras_server as $sindex => & $server): ?>
+<?php foreach ($ras_server as $sindex => $server): ?>
servers[<?=$sindex;?>] = new Array();
servers[<?=$sindex;?>][0] = '<?=$server['index'];?>';
servers[<?=$sindex;?>][1] = new Array();
servers[<?=$sindex;?>][2] = '<?=$server['mode'];?>';;
-<?php foreach ($server['users'] as $uindex => & $user): ?>
+<?php foreach ($server['users'] as $uindex => $user): ?>
servers[<?=$sindex;?>][1][<?=$uindex;?>] = new Array();
servers[<?=$sindex;?>][1][<?=$uindex;?>][0] = '<?=$user['uindex'];?>';
servers[<?=$sindex;?>][1][<?=$uindex;?>][1] = '<?=$user['cindex'];?>';