X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Ftransaction_functions.php;h=4422754cf3ca01f344bde3ba03f6b9965a264226;hp=6e47230b46325a25b17e9ec4809fa05e52a2b552;hb=175b3f506e193d8d791ec6523db42276e296dd0b;hpb=e5dffd4249c97200cbad02f3f4eaf5c373fdb89a diff --git a/inc/libs/transaction_functions.php b/inc/libs/transaction_functions.php index 6e47230b46..4422754cf3 100644 --- a/inc/libs/transaction_functions.php +++ b/inc/libs/transaction_functions.php @@ -86,7 +86,7 @@ function logTransaction ($sender, $receiver, $level, $valueAmount, $originalAmou ); // Should work - assert(isValidId(getSqlInsertId())); + assert(isValidId(getSqlInsertId()), 'getSqlInsertId() is not valid id number.'); } // Calculates transaction fee for sender amount @@ -137,7 +137,7 @@ function generateHashFromTransactionData (array &$data, $oldHash = '') { // "Getter" for CAPTCHA code from given transaction id function getCaptchaCodeFromTransactionId ($transactionId) { // Must be valid - assert(isValidId($transactionId)); + assert(isValidId($transactionId), 'transactionId=' . $transactionId . ' is not valid id number.'); // Default is NULL $code = NULL; @@ -319,7 +319,7 @@ LIMIT %s", ), $allowed, '', FALSE); // Should always work - assert($updated === TRUE); + assert($updated === TRUE, 'Nothing has been updated which is not expected.'); } // END - if } // END - if @@ -347,7 +347,7 @@ LIMIT %s", ); // Should always work - assert(sqlAffectedRows() == count($failedIds)); + assert(sqlAffectedRows() == count($failedIds), 'sqlAffectedRows()=' . sqlAffectedRows() . ',failedIds()=' . count($failedIds)); } // END - if // Return status @@ -357,7 +357,7 @@ LIMIT %s", // Checks whether the given user has a fee exempt function ifUserHasTransactionFeeExempt ($username) { // Accept only valid ids - assert(isValidId($username)); + assert(isValidId($username), 'username=' . $username . ' which is not a valid id number.'); // Is there "cache"? if (!isset($GLOBALS[__FUNCTION__][$username])) { @@ -365,7 +365,7 @@ function ifUserHasTransactionFeeExempt ($username) { $GLOBALS[__FUNCTION__][$username] = FALSE; // "Determine" it - $GLOBALS[__FUNCTION__][$username] = (getTotalAmountByUserid($username) < getConfig('transaction_fee_exempt_amount')); + $GLOBALS[__FUNCTION__][$username] = (getTotalPoints($username) < getConfig('transaction_fee_exempt_amount')); } // END - if // Return cache