Merge branch '2.5.x-saas' into cc-5709-airtime-analyzer-saas

This commit is contained in:
Albert Santoni 2014-05-05 12:42:42 -04:00
commit f89c66922b
2 changed files with 23 additions and 3 deletions

View file

@ -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 */