$o["BASE_URL"] = $arResult['BASE_URL']; $o["DESCRIPTION"] = (array_key_exists("DESCRIPTION", $_REQUEST) ? $_REQUEST["DESCRIPTION"] : ""); $fileOptT = CWebDavExtLinks::GetFileOptions($ob); $o["F_SIZE"] = $fileOptT["F_SIZE"]; CWebDavExtLinks::GetExtLink($arParams, $o); } if(!empty($_REQUEST['editInGoogle'])) { CUtil::JSPostUnescape(); CWebDavExtLinks::CheckSessID(); CWebDavExtLinks::CheckRights($ob); CModule::IncludeModule('socialservices'); $socGoogleOAuth = new CSocServGoogleOAuth(); $googleOAuth = CUtil::JSEscape($socGoogleOAuth->GetFormHtml(array('GET_URL' => true))); $oAuthManager = new CSocServAuthManager(); $arServices = $oAuthManager->GetActiveAuthServices(array());//check active google oauth service $dbSocservUser = CSocServAuthDB::GetList(array(), array('EXTERNAL_AUTH_ID' => 'GoogleOAuth', 'USER_ID' => $USER->GetId())); $row = $dbSocservUser->Fetch(); if(!$row || empty($row['OATOKEN'])) { $APPLICATION->RestartBuffer(); echo <<<HTML <script type="text/javascript"> window.location.href = "{$googleOAuth}"; </script> HTML; } else