From 70eef83536a3f89e181322ff56a2e1fd7aedfef2 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 28 Oct 2014 14:55:07 -0200 Subject: [PATCH] Remove redundancy as pointed out by phil-davis --- etc/inc/system.inc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 779c4b95ea..9c0345d8f9 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -826,14 +826,10 @@ function system_webgui_start() { if ($config['system']['webgui']['protocol'] == "https") { // Ensure that we have a webConfigurator CERT $cert =& lookup_cert($config['system']['webgui']['ssl-certref']); - if(!is_array($cert) || !$cert['crt'] || !$cert['prv']) { + if(!is_array($cert) || !$cert['crt'] || !$cert['prv']) $cert = system_webgui_create_certificate(); - $crt = base64_decode($cert['crt']); - $key = base64_decode($cert['prv']); - } else { - $crt = base64_decode($cert['crt']); - $key = base64_decode($cert['prv']); - } + $crt = base64_decode($cert['crt']); + $key = base64_decode($cert['prv']); if(!$config['system']['webgui']['port']) $portarg = "443";