- // Also edit this 0 !
- if (empty($ref)) $ref = 0;
-
- // Update session
- setSession('refid', $ref);
-
- // We have an refid here. So we simply add it
- $URL .= bigintval($ref);
-
- // Is the refid valid?
- if ($ref > 0) {
- // Update ref counter
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
- array(bigintval($ref)), __FILE__, __LINE__);
- } // END - if
-} else {
- // No refid and we add our refid (don't forget to set $def_refid!)
- $URL = 'index.php';
-}
+ default: // Is not valid
+ reportBug(__FILE__, __LINE__, 'Invalid refid target ' . getConfig('refid_target') . ' detected.');
+ break;
+ } // END - switch
+} // END - if