Merge branch '2.5.x-saas' into cc-5709-airtime-analyzer-saas
This commit is contained in:
commit
f89c66922b
|
@ -139,9 +139,11 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/audio-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/playlist-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/block-preview') === false) {
|
||||
$client_id = Application_Model_Preference::GetClientId();
|
||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
if (Application_Model_Preference::GetLiveChatEnabled()) {
|
||||
$client_id = Application_Model_Preference::GetClientId();
|
||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
|
||||
|
|
|
@ -1013,6 +1013,24 @@ class Application_Model_Preference
|
|||
Logging::warn("Attempting to set client_id to invalid value: $id");
|
||||
}
|
||||
}
|
||||
|
||||
public static function GetLiveChatEnabled()
|
||||
{
|
||||
$liveChat = self::getValue("live_chat", false);
|
||||
if (is_null($liveChat) || $liveChat == "" || $liveChat == "1") { //Defaults to on
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function SetLiveChatEnabled($toggle)
|
||||
{
|
||||
if (is_bool($toggle)) {
|
||||
self::setValue("live_chat", $toggle ? "1" : "0");
|
||||
} else {
|
||||
Logging::warn("Attempting to set live_chat to invalid value: $toggle. Must be a bool.");
|
||||
}
|
||||
}
|
||||
|
||||
/* User specific preferences start */
|
||||
|
||||
|
|
Loading…
Reference in New Issue