Skip to content

Commit

Permalink
fixed an api endpoint status bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Tomaraei committed Mar 4, 2020
1 parent 861a0d0 commit 9298fc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/system/engine/vsbridgecontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 9298fc7

Please sign in to comment.