- if (EXT_IS_ACTIVE('autopurge')) {
- // Use last online stamp only when autopurge for inactive members is activated
- if (getConfig('ap_inactive_since') > 0) {
- // Okay, include last online timestamp
- $whereStatement1 = sprintf("WHERE `status`='CONFIRMED' AND `last_online` >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
- $whereStatement2 = getConfig('bonus_ranks');
- } // END - if
+ // @TODO Rewrite these if() blocks to a filter
+ if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
+ // Okay, include last online timestamp
+ $whereStatement .= ' AND (UNIX_TIMESTAMP() - `d`.`last_online`) < {?ap_inactive_since?}';
+ } // END - if
+
+ // Is ext-holiday installed?
+ if (isExtensionActive('holiday')) {
+ // Exclude those as well
+ $whereStatement .= " AND `d`.`holiday_active`='N'";