mnet/environment: Bugfix

Author: Donal McMullan <[email protected]>
This commit is contained in:
martinlanghoff
2007-01-04 03:34:48 +00:00
parent 735c7beb0a
commit 8c99567eec
+3 -3
View File
@@ -37,7 +37,7 @@ class mnet_environment {
$hostobject = get_record('mnet_host','id', $CFG->mnet_localhost_id);
if(is_object($hostobject)) {
$temparr = get_object_vars($hostobject);
foreach(get_object_vars($temparr) as $key => $value) {
foreach($temparr as $key => $value) {
$this->$key = $value;
}
unset($hostobject, $temparr);
@@ -82,7 +82,7 @@ class mnet_environment {
if (!empty($keypair)) {
// Explode/Implode is faster than Unserialize/Serialize
$this->keypair = explode('@@@@@@@@', $keypair);
list($this->keypair['certificate'], $this->keypair['keypair_PEM']) = explode('@@@@@@@@', $keypair);
}
if ($this->public_key_expires > time()) {
@@ -126,7 +126,7 @@ class mnet_environment {
$details = openssl_x509_parse($this->public_key);
$this->public_key_expires = $details['validTo_time_t'];
set_config('openssl', implode('@@@@@@@@', $this->keypair);
set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet');
update_record('mnet_host', $this);
}