]> git.mxchange.org Git - mailer.git/blobdiff - ref.php
Mailer continued, sub-id tracking continued:
[mailer.git] / ref.php
diff --git a/ref.php b/ref.php
index 6b0302c17adcc8514e727398e118e77ec6a63ff3..7f0d0c7b2e83c9aa1c7e3445d9517d670673a84a 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -56,9 +56,8 @@ $url = 'modules.php?module=index';
 
 // Check for determined referral id
 if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(determineReferralId()))) {
-       // Update ref counter
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`=%s LIMIT 1",
-               array(determineReferralId()), __FILE__, __LINE__);
+       // Run filter chain for updating referral data
+       runFilterChain('update_referral_data');
 
        // Base URL for redirection
        switch (getConfig('refid_target')) {
@@ -69,6 +68,10 @@ if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(deter
                case 'index':
                        $url = 'modules.php?module=index';
                        break;
+
+               default: // Is not valid
+                       reportBug(__FILE__, __LINE__, 'Invalid refid target ' . getConfig('refid_target') . ' detected.');
+                       break;
        } // END - switch
 } // END - if