setSession('DOUBLER_USERID', '');
if (empty($GLOBALS['local_doubler_userid'])) $GLOBALS['local_doubler_userid'] = '0';
-// Init additional WHERE statement
-$whereStatement = ' ';
-
-// Is ext-holiday installed?
-// @TODO Rewrite these if() blocks to a filter
-if (isExtensionActive('holiday')) {
- // Exclude those as well
- $whereStatement .= " AND `d`.`holiday_active`='N'";
-} // END - if
-
// Check for doubles which we can pay out
$result_total = sqlQueryEscaped("SELECT
COUNT(`do`.`id`) AS `cnt`,
`do`.`userid`=`d`.`userid`
WHERE
`d`.`status`='CONFIRMED'
- " . runFilterChain('user_exclusion_sql', $whereStatement) . " AND
+ " . runFilterChain('user_exclusion_sql', ' ' . $whereStatement) . " AND
`do`.`points` <= %s AND
`do`.`points` >= ({?doubler_min?} * 2) AND
`do`.`completed`='N' AND
`do`.`userid`=`d`.`userid`
WHERE
`d`.`status`='CONFIRMED'
- " . runFilterChain('user_exclusion_sql', $whereStatement) . " AND
+ " . runFilterChain('user_exclusion_sql', ' ' . $whereStatement) . " AND
`do`.`points` <= %s AND
`do`.`points` >= ({?doubler_min?} * 2) AND
`do`.`completed`='N' AND