Make the LiveChat changes from yesterday slightly more reslient to
missing database keys.
This commit is contained in:
parent
ad56d6cafb
commit
797bafa453
|
@ -158,10 +158,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/playlist-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/block-preview') === false) {
|
||||
if (Application_Model_Preference::GetLiveChatEnabled()) {
|
||||
$client_id = Application_Model_Preference::GetClientId();
|
||||
$plan_level = Application_Model_Preference::GetPlanLevel();
|
||||
$client_id = strval(Application_Model_Preference::GetClientId());
|
||||
$plan_level = strval(Application_Model_Preference::GetPlanLevel());
|
||||
$station_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||
$view->headScript()->appendScript("var livechat_client_id = $client_id;\n".
|
||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';\n".
|
||||
"var livechat_plan_type = '$plan_level';\n".
|
||||
"var livechat_station_url = 'http://$station_url';");
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
|
Loading…
Reference in New Issue