- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE id=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
-
- // Do a snapshot off all user refs
- $result_user = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
-
- // Transfer all neccessary data to the global $DATA array
- $DATA['uid_cnt'] = SQL_NUMROWS($result_user);
- $DATA['start'] = MAKE_DATETIME($start, "2");
- $DATA['end'] = MAKE_DATETIME($end , "2");
- $DATA['now_t'] = MAKE_DATETIME(time(), "2");
- $DATA['title'] = $title;
- $DATA['id'] = $id; // ID for the rallye details link
-
- if ($min_users == 0) {
- // Rallye ends without user limitation
- $DATA['min_users'] = RALLYE_END_NO_USER_LIMITATION;
- } else {
- // Rallye ends when X members are totally in your exchange
- $DATA['min_users'] = RALLYE_END_USERS_1." ".$min_users." ".RALLYE_END_USERS_2;
- }
-
- if ($min_prices == 0) {
- // Rallye ends without user limitation
- $DATA['min_prices'] = RALLYE_END_NO_PRICE_LIMITATION;
- } else {
- // Rallye ends when X members are totally in your exchange
- $DATA['min_prices'] = RALLYE_END_PRICES_1." ".$min_prices." ".RALLYE_END_PRICES_2;
- }
-
- // Load prices
- $prices = RALLYE_ADD_PRICES($id);
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_rallye_data`
+SET
+ `notified`='Y'
+WHERE
+ `id`=%s
+LIMIT 1",
+ array(bigintval($content['id'])), __FUNCTION__, __LINE__);
+
+ // Query all users
+ $result_user = SQL_QUERY("SELECT
+ `userid`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `status`='CONFIRMED'
+ " . runFilterChain('user_exclusion_sql', ' ') . "
+ORDER BY
+ `userid` ASC", __FUNCTION__, __LINE__);