1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
group_wiki_post_comment.php
См. документацию.
1<?if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED!==true) die();
2
3//http://jabber.bx/view.php?id=25340
4$arComponentVariables = array('message_id','group_id','wiki_name');
5
6if ($arParams['SEF_MODE'] != 'Y')
7 return;
8
9if(!CModule::IncludeModule('forum'))
10 return;
11
12$dbMessage = CForumMessage::GetList(array(), array('ID' => intval($arResult['VARIABLES']['message_id'])));
13
14if (!$dbMessage || !($arMessage = $dbMessage->Fetch()))
15 return;
16
17$elementID = intval($arMessage['PARAM2']);
18
19if ($elementID <= 0)
20 return;
21
22$dbElement = CIBlockElement::GetList(array(), array('ID' => $elementID),false,false,array("IBLOCK_SECTION_ID","IBLOCK_ID","NAME") );
23
24if (!$dbElement || !($arElement = $dbElement->Fetch()) || !($arElement['IBLOCK_ID'] == COption::GetOptionString('wiki', 'socnet_iblock_id')))
25 return;
26
27$ibSectionID = $arElement['IBLOCK_SECTION_ID'];
28
29do
30{
31 $dbIBSection = CIBlockSection::GetList(array(),array('ID' => $ibSectionID, 'CHECK_PERMISSIONS' => 'N'),false,false,array('IBLOCK_SECTION_ID','SOCNET_GROUP_ID'));
32
33 if (!$dbIBSection || !($arIBSection = $dbIBSection->Fetch()))
34 break;
35
36 $ibSectionID = $arIBSection['IBLOCK_SECTION_ID'];
37
38} while (!$arIBSection['SOCNET_GROUP_ID'] && $arIBSection['IBLOCK_SECTION_ID']);
39
40
41$redirectPath = CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_GROUP_WIKI_POST_CATEGORY'],
42 array(
43 "wiki_name" => rawurlencode($arElement['NAME']),
44 "group_id" => $arIBSection['SOCNET_GROUP_ID']
45 )
46 );
47
48$redirectPath .= "?MID=".$arResult['VARIABLES']['message_id']."#message".$arResult['VARIABLES']['message_id'];
49
51
52?>
$arParams
Определения access_dialog.php:21
$arResult
Определения generate_coupon.php:16
static GetList($arOrder=Array("ID"=>"ASC"), $arFilter=Array(), $bCount=false, $iNum=0, $arAddParams=array())
Определения message.php:193
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$dbElement
Определения group_wiki_post_comment.php:22
$elementID
Определения group_wiki_post_comment.php:17
$ibSectionID
Определения group_wiki_post_comment.php:27
$dbMessage
Определения group_wiki_post_comment.php:12
$redirectPath
Определения group_wiki_post_comment.php:41
$arComponentVariables
Определения group_wiki_post_comment.php:4
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения tools.php:4005
die
Определения quickway.php:367