2#############################################
3# Bitrix Site Manager Forum #
4# Copyright (c) 2002-2007 Bitrix #
6# mailto:admin@bitrixsoft.com #
7#############################################
11 "C" =>
"vote_form_channel_",
12 "V" =>
"vote_form_vote_",
13 "Q" =>
"vote_form_question_",
14 "A" =>
"vote_form_answer_"
17 public static $cacheKey =
"/#SITE_ID#/voting.cache/";
22 return str_replace(
"#SITE_ID#",
$site_id, self::$cacheKey);
29 AddEventHandler(
"vote",
"onAfterVoteChannelAdd", Array(&$this,
"OnAfterVoteChannelChange"));
30 AddEventHandler(
"vote",
"onAfterVoteChannelUpdate", Array(&$this,
"OnAfterVoteChannelChange"));
31 AddEventHandler(
"vote",
"onAfterChannelDelete", Array(&$this,
"OnAfterVoteChannelChange"));
37 $eventManager->addEventHandler(
"vote",
"\\Bitrix\\Vote\\Vote::OnAfterAdd",
array($this,
"OnVoteChange"));
38 $eventManager->addEventHandler(
"vote",
"\\Bitrix\\Vote\\Vote::OnAfterUpdate",
array($this,
"OnVoteChange"));
39 $eventManager->addEventHandler(
"vote",
"\\Bitrix\\Vote\\Vote::OnAfterDelete",
array($this,
"OnVoteChange"));
44 if(defined(
"BX_COMP_MANAGED_CACHE"))
47 AddEventHandler(
"vote",
"onBeforeVoteQuestionUpdate",
array(&$this,
"OnBeforeVoteQuestionUpdate"));
48 AddEventHandler(
"vote",
"onAfterVoteQuestionUpdate",
array(&$this,
"OnAfterVoteQuestionUpdate"));
49 AddEventHandler(
"vote",
"onAfterVoteQuestionDelete",
array(&$this,
"OnAfterVoteQuestionDelete"));
61 if (! defined(
"BX_COMP_MANAGED_CACHE"))
64 $tags = is_array($tag) ? $tag :
array($tag =>
$ID);
65 foreach ($tags as $tag =>
$ID)
67 if (array_key_exists($tag, self::$types))
84 if (! defined(
"BX_COMP_MANAGED_CACHE"))
87 if (array_key_exists(
$type, self::$types))
98 if (VOTE_CACHE_TIME !==
false):
116 if (VOTE_CACHE_TIME !==
false):
130 if (array_key_exists(
"VOTE_ID",
$arFields))
140 if (array_key_exists(
"VOTE_ID",
$arFields))
165 if (array_key_exists(
"QUESTION_ID",
$arFields))
168 $res =
$DB->Query(
"SELECT QUESTION_ID FROM b_vote_answer WHERE ID=".
$ID);
169 if ($row =
$res->Fetch())
176 if (array_key_exists(
"QUESTION_ID",
$arFields))
183 $db_res =
$DB->Query(
"SELECT QUESTION_ID FROM b_vote_answer WHERE ID=".
$ID);
191 if ($QUESTION_ID !=
false)
193 if ($VOTE_ID !=
false)
199 unset(
$GLOBALS[
"VOTE_CACHE_VOTING"][$VOTE_ID]);
200 unset(
$GLOBALS[
"VOTE_CACHE"][
"VOTE"][$VOTE_ID]);
OnAfterVoteQuestionAdd($ID, $arFields)
static ClearTag($type, $ID=0)
OnAfterVoteAnswerUpdate($ID, $arFields)
OnAfterVoteAnswerAdd($ID, $arFields)
onAfterVoting($VOTE_ID, $EVENT_ID)
OnAfterVoteQuestionUpdate($ID, $arFields)
OnAfterVoteChannelChange($ID, $arFields=array())
OnVoteChange(\Bitrix\Main\Entity\Event $event)
OnAfterVoteAnswerDelete($ID, $QUESTION_ID, $VOTE_ID)
static SetTag($path, $tag, $ID=0)
OnAfterVoteQuestionDelete($ID, $VOTE_ID)
OnBeforeVoteAnswerUpdate($ID, $arFields)
OnBeforeVoteQuestionUpdate(&$ID, &$arFields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
AddEventHandler($FROM_MODULE_ID, $MESSAGE_ID, $CALLBACK, $SORT=100, $FULL_PATH=false)
$GLOBALS['_____370096793']