X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ref.php;h=7e452673a5e555f1dba513a9d587ec184f53b77e;hb=985a07b9c904d97b1d18af161457435212c7abdc;hp=c91ff65364b07531d0a7a6016c05e988df7e90d3;hpb=63f159414369b5ea19a8ca75d8cd8033c45d8341;p=mailer.git diff --git a/ref.php b/ref.php index c91ff65364..7e452673a5 100644 --- a/ref.php +++ b/ref.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module $GLOBALS['__module'] = 'ref'; @@ -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(convertZeroToNull(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