1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
updtr1100.php
См. документацию.
1<?
2if (CModule::IncludeModule("blog"))
3{
4 $arComments = array();
5 $dbLogComment = CSocNetLogComments::GetList(array("LOG_DATE" => "ASC"), array("EVENT_ID" => "blog_comment_micro", "SOURCE_ID" => false), false, false, array("ID", "LOG_SOURCE_ID", "USER_ID", "TEXT_MESSAGE", "LOG_DATE"));
6 while($arLogComment = $dbLogComment->Fetch())
7 {
8 $arPost = CBlogPost::GetByID($arLogComment["LOG_SOURCE_ID"]);
9 if ($arPost)
10 {
11 $arBlog = CBlog::GetByID($arPost["BLOG_ID"]);
12
13 $arFieldsComment = Array(
14 "POST_ID" => $arPost["ID"],
15 "BLOG_ID" => $arBlog["ID"],
16 "POST_TEXT" => $arLogComment["TEXT_MESSAGE"],
17 "DATE_CREATE" => $arLogComment["LOG_DATE"],
18 "AUTHOR_ID" => $arLogComment["USER_ID"],
19 "PARENT_ID" => false
20 );
21
22 $commentId = CBlogComment::Add($arFieldsComment);
23 $arComments[$arLogComment["ID"]] = $commentId;
24 }
25 }
26
27 foreach($arComments as $log_comment_id => $blog_comment_id)
28 CSocNetLogComments::Update($log_comment_id, array("SOURCE_ID" => $blog_comment_id));
29
30}
31?>
static GetByID($ID)
Определения blog.php:931
static Add($arFields, $bSearchIndex=true)
Определения blog_comment.php:8
static GetByID($ID)
Определения blog_post.php:511
static GetList($arOrder=Array("ID"=> "DESC"), $arFilter=Array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array(), $arParams=array())
Определения log_comments.php:519
static Update($ID, $arFields, $bSetSource=false)
Определения log_comments.php:307
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804