Explorar el Código

clientareafunctions

andre hace 3 años
padre
commit
bebf48ef71
Se han modificado 1 ficheros con 8 adiciones y 7 borrados
  1. 8 7
      cwp7.php

+ 8 - 7
cwp7.php

@@ -327,6 +327,7 @@ function cwp7_ClientAreaCustomButtonArray ($params)
 function cwp7_ClientAreaAllowedFunctions() {
 function cwp7_ClientAreaAllowedFunctions() {
 	return array(
 	return array(
 		"Enable SSL" => "enableSSL",
 		"Enable SSL" => "enableSSL",
+		"Renew SSL" => "renewSSL",
 		"Set DNS" => "setDNS",
 		"Set DNS" => "setDNS",
 		"Info DNS" => "infoDNS",
 		"Info DNS" => "infoDNS",
 		"Add Domain" => "addDomain",
 		"Add Domain" => "addDomain",
@@ -539,13 +540,6 @@ function cwp7_enableSSL($params) {
 }
 }
 
 
 function cwp7_renewSSL($params) {
 function cwp7_renewSSL($params) {
-	logModuleCall(
-		'cwp7',
-		__FUNCTION__,
-		$_POST,
-		'debug custom',
-		$params
-	);
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 	if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
 		return 'Error: invalid domain name';
 		return 'Error: invalid domain name';
 	}
 	}
@@ -553,6 +547,13 @@ function cwp7_renewSSL($params) {
 	$vars['name'] = $_POST['d'];
 	$vars['name'] = $_POST['d'];
 	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
 	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
 	$response = $cwp7->updateAutoSSL($vars);
 	$response = $cwp7->updateAutoSSL($vars);
+	logModuleCall(
+		'cwp7',
+		__FUNCTION__,
+		$_POST,
+		'debug custom',
+		$response
+	);
 	if($response['status'] != 'OK') {
 	if($response['status'] != 'OK') {
 		return 'Error: ' . $response['msj'];
 		return 'Error: ' . $response['msj'];
 	}
 	}