* add_mode = Add points only to $uid or also refs? (WARNING! Changing "ref" to "direct"
* for default value will cause no referral will get points ever!!!)
*/
-function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref")
-{
+function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") {
global $DEPTH, $_CONFIG, $DATA;
+ // Convert mode to lower-case
+ $add_mode = strtolower($add_mode);
+
// Debug message
//DEBUG_LOG(__FUNCTION__.": uid={$uid},points={$points}");