// 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')) {
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