- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+ die();
+} elseif ((!isHtmlOutputMode()) || (!isMonthlyResetEnabled())) {
+ // Do not execute when script is in non-HTML mode or no hourly reset
+ return;
+} elseif (!isExtensionActive('surfbar')) {
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-surfbar disabled.');