]> git.mxchange.org Git - mailer.git/blobdiff - inc/referal-functions.php
No die() here
[mailer.git] / inc / referal-functions.php
index cec12c40a71e63db515d4e03b426792a498aa814..8868904eaddc30140d39e89c31f45f0dfbe77ccb 100644 (file)
@@ -92,7 +92,7 @@ function getReferalLevelPercents ($level) {
  * refid         = inc/modules/guest/what-confirm.php need this
  * locked        = Shall I pay it to normal (false) or locked (true) points ammount?
  */
-function addPointsThroughReferalSystem ($subject, $userid, $points, $refid = '0') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $refid = NULL) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',points=' . $points . ',refid=' . $refid . ' - ENTERED!');
        // By default nothing has been added
        $added = false;
@@ -512,6 +512,9 @@ function updateReferalTable ($userid) {
        // The last step is to flush all userid's entries to the database
        flushReferalTableToDatabase($userid);
 
+       // Rebuild cache
+       rebuildCache('refsystem', 'refsystem');
+
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - EXIT!');
 }