diff --git a/src/system/engine/vsbridgecontroller.php b/src/system/engine/vsbridgecontroller.php index 3da954f..5f5a05b 100644 --- a/src/system/engine/vsbridgecontroller.php +++ b/src/system/engine/vsbridgecontroller.php @@ -59,7 +59,8 @@ public function checkExtensionStatus() /* Prevent access to API endpoint if disabled in extension settings */ public function checkEndpointStatus() { - $endpoint_name = str_replace('controllervsbridge', '', strtolower(get_class($this))); + $class_name = strtolower(preg_replace('/\B([A-Z])/', '_$1', get_class($this))); + $endpoint_name = str_replace('controller_vsbridge_', '', $class_name); if(empty($this->config->get('vsbridge_endpoint_statuses')[$endpoint_name])) { $this->load->language('vsbridge/api');