Esempio n. 1
0
$arResult = array();
// Counters
$arResult["COUNTERS"] = CUserCounter::GetValues($USER->GetID(), SITE_ID);
CIMContactList::SetOnline(null, $arParams['DESKTOP'] == 'N');
$arSettings = CIMSettings::Get();
$arResult['SETTINGS'] = $arSettings['settings'];
if ($arParams['DESKTOP'] == 'Y') {
    $GLOBALS["APPLICATION"]->SetPageProperty("BodyClass", "im-desktop");
    CIMMessenger::SetDesktopStatusOnline();
    CIMMessenger::SetDesktopVersion(empty($_GET['BXD_API_VERSION']) ? 0 : $_GET['BXD_API_VERSION']);
} else {
    if ($arParams['FULLSCREEN'] == 'Y') {
        $GLOBALS["APPLICATION"]->SetPageProperty("BodyClass", "bx-im-fullscreen bx-language-" . LANGUAGE_ID);
    }
}
if ($arResult['SETTINGS']['bxdNotify'] && CIMMessenger::CheckInstallDesktop()) {
    CIMSettings::SetSetting(CIMSettings::SETTINGS, array('bxdNotify' => false));
    $arResult['SETTINGS']['bxdNotify'] = false;
}
$arParams["INIT"] = 'Y';
$arParams["DESKTOP_LINK_OPEN"] = 'N';
// Exchange
$arResult["PATH_TO_USER_MAIL"] = "";
$arResult["MAIL_COUNTER"] = 0;
if ($arParams["INIT"] == 'Y') {
    if (CIMMail::IsExternalMailAvailable()) {
        $arResult["PATH_TO_USER_MAIL"] = $arParams['PATH_TO_SONET_EXTMAIL'];
        $arResult["MAIL_COUNTER"] = intval($arResult["COUNTERS"]["mail_unseen"]);
    } else {
        if (CModule::IncludeModule("dav")) {
            $ar = CDavExchangeMail::GetTicker($GLOBALS["USER"]);
Esempio n. 2
0
 public static function isDesktopInstall()
 {
     if (!CModule::IncludeModule('im')) {
         return false;
     }
     return CIMMessenger::CheckInstallDesktop();
 }