} $arParams["PATH_TO_MODERATION"] = trim($arParams["PATH_TO_MODERATION"]); if (strlen($arParams["PATH_TO_MODERATION"]) <= 0) { $arParams["PATH_TO_MODERATION"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=moderation&" . $arParams["BLOG_VAR"] . "=#blog#"); } if (!$USER->IsAuthorized()) { $arResult["urlToAuth"] = htmlspecialcharsbx($APPLICATION->GetCurPageParam("auth=Y", array("login", "logout", "register", "forgot_password", "change_password"))); if (COption::GetOptionString("main", "new_user_registration", "Y") == "Y") { $arResult["urlToRegister"] = htmlspecialcharsbx($APPLICATION->GetCurPageParam("auth=Y®ister=yes", array("login", "logout", "register", "forgot_password", "change_password", "backurl"))); } } else { $arResult["urlToLogout"] = $APPLICATION->GetCurPageParam("logout=yes", array("login", "logout", "register", "forgot_password", "change_password", "backurl")); } $user_id = $USER->GetID(); if (IntVal($user_id) > 0) { CBlogUser::SetLastVisit(); $arResult["urlToUser"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $user_id)); $arOwnBlog = CBlog::GetByOwnerID($user_id, $arParams["GROUP_ID"]); if ($arOwnBlog["ACTIVE"] == "Y") { $arGroup = CBlogGroup::GetByID($arOwnBlog["GROUP_ID"]); if ($arGroup["SITE_ID"] == SITE_ID) { if (!empty($arOwnBlog)) { $arResult["OwnBlog"] = $arOwnBlog; $arResult["urlToOwnBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arOwnBlog["URL"])); $arResult["urlToFriends"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_FRIENDS"], array("user_id" => $user_id)); $arResult["urlToOwnNewPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("blog" => $arOwnBlog["URL"], "post_id" => "new")); $arResult["urlToOwnBlogEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG_EDIT"], array("blog" => $arOwnBlog["URL"])); } } else { unset($arOwnBlog); }