diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 9f9c4a709..9559d6988 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -110,6 +110,9 @@ define("LIBRETIME_ENABLE_WHMCS", false); define("WHMCS_API_URL", "https://account.example.org/includes/api.php"); define("SUBDOMAIN_WHMCS_CUSTOM_FIELD_NAME", "Choose your domain"); +//LiveChat integration +define('LIBRETIME_ENABLE_LIVECHAT', false); + //Sentry error logging define('SENTRY_CONFIG_PATH', '/etc/airtime-saas/sentry.airtime_web.ini'); diff --git a/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php b/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php index cf39af00a..f0239e413 100644 --- a/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php +++ b/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php @@ -224,7 +224,8 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract } $view->headScript()->appendScript("var userType = '$userType';"); - if (array_key_exists('REQUEST_URI', $_SERVER) //Doesn't exist for unit tests + if (LIBRETIME_ENABLE_LIVECHAT === true + && array_key_exists('REQUEST_URI', $_SERVER) //Doesn't exist for unit tests && strpos($_SERVER['REQUEST_URI'], 'Dashboard/stream-player') === false && strpos($_SERVER['REQUEST_URI'], 'audiopreview') === false && $_SERVER['REQUEST_URI'] != "/") {