add_mode in ADD_POINTS_REFSYSTEM() is now always lower-case
[mailer.git] / inc / mysql-manager.php
index 5433a771ee5f5ac4f3929ba7b891a657c4a07eea..7e6d95f31ae89ab7fe7e6f4acc09be7dac53bc3a 100644 (file)
@@ -1098,10 +1098,12 @@ function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid",
  * 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}");