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] . '%}'
// 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') {