本文整理汇总了PHP中CSearch::ChangeIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP CSearch::ChangeIndex方法的具体用法?PHP CSearch::ChangeIndex怎么用?PHP CSearch::ChangeIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSearch
的用法示例。
在下文中一共展示了CSearch::ChangeIndex方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpdateForumTopicIndex
function UpdateForumTopicIndex($topic_id, $entity_type, $entity_id, $feature, $operation, $path_template)
{
global $DB;
if (!CModule::IncludeModule("forum")) {
return;
}
$topic_id = intval($topic_id);
$rsForumTopic = $DB->Query("SELECT FORUM_ID FROM b_forum_topic WHERE ID = " . $topic_id);
$arForumTopic = $rsForumTopic->Fetch();
if (!$arForumTopic) {
return;
}
$arGroups = $this->GetSearchGroups($entity_type, $entity_id, $feature, $operation);
CSearch::ChangePermission("forum", $arGroups, false, $arForumTopic["FORUM_ID"], $topic_id);
$rsForumMessages = $DB->Query("\n\t\t\tSELECT ID\n\t\t\tFROM b_forum_message\n\t\t\tWHERE TOPIC_ID = " . intval($topic_id) . "\n\t\t");
while ($arMessage = $rsForumMessages->Fetch()) {
$url = str_replace(array("#topic_id#", "#message_id#", "#action#"), array($arTopic["ID"], $arMessage["ID"], ""), $path_template);
CSearch::ChangeSite("forum", array(SITE_ID => $url), $arMessage["ID"]);
$this->_counter++;
}
$arParams = $this->GetSearchParams($entity_type, $entity_id, $feature, $operation);
CSearch::ChangeIndex("forum", array("UPD" => $this->_sess_id, "PARAMS" => $arParams), false, $arForumTopic["FORUM_ID"], $topic_id);
}
示例2: UpdateForumTopicIndex
function UpdateForumTopicIndex($topic_id, $entity_type, $entity_id, $feature, $operation, $path, $arPermissions, $siteID)
{
global $DB;
if (!CModule::IncludeModule("forum")) {
return;
}
$topic_id = intval($topic_id);
$rsForumTopic = $DB->Query("SELECT FORUM_ID FROM b_forum_topic WHERE ID = " . $topic_id);
$arForumTopic = $rsForumTopic->Fetch();
if (!$arForumTopic) {
return;
}
CSearch::ChangePermission("forum", $arPermissions, false, $arForumTopic["FORUM_ID"], $topic_id);
$rsForumMessages = $DB->Query("\n\t\t\tSELECT ID\n\t\t\tFROM b_forum_message\n\t\t\tWHERE TOPIC_ID = " . $topic_id . "\n\t\t");
while ($arMessage = $rsForumMessages->Fetch()) {
CSearch::ChangeSite("forum", array($siteID => $path), $arMessage["ID"]);
}
$arParams = array("feature_id" => "S" . $entity_type . "_" . $entity_id . "_" . $feature . "_" . $operation, "socnet_user" => $entity_id);
CSearch::ChangeIndex("forum", array("PARAMS" => $arParams), false, $arForumTopic["FORUM_ID"], $topic_id);
}