X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fwernis_functions.php;h=b7c369d21b62051ff9bc65b9659ade678af95121;hp=0868db2f3d48c51182f8bda817e5a41cde43531a;hb=b7a3b394d4639834ad8466fbc4ab06694a4d4569;hpb=5855377579850556ccfb7d667d5b5fdcc406b7dd diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 0868db2f3d..b7c369d21b 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -190,7 +190,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { break; default: // Unknown error (maybe new?) - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1])); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Unknown error %s from WDS66 API received.', $data[1])); $return = array( 'status' => 'request_failed', 'message' => '{%message,WERNIS_API_REQUEST_FAILED=' . $data[1] . '%}' @@ -211,11 +211,20 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { // Tests the function by calling balance.php on the API function WERNIS_TEST_API () { + // Only as admin + assert(isAdmin()); + // Result is always failed $result = FALSE; + // Prepare the request data + $requestData = array( + 't_uid' => getWernisRefid(), + 't_md5' => getWernisPassMd5() + ); + // Return the result from the lower functions - $return = WERNIS_SEND_REQUEST('balance.php'); + $return = WERNIS_SEND_REQUEST('balance.php', $requestData); // Did it went smoothly? if ($return['status'] == 'OK') {