- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
- require($INC);
-} elseif (!EXT_IS_ACTIVE('bonus')) {
+ die();
+} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+ // Do not execute when script is in CSS mode or no daily reset
+ return;
+} elseif (!isExtensionActive('bonus')) {
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');