- Модуль: vote
- Путь к файлу: ~/bitrix/modules/vote/classes/general/question.php
- Класс: CAllVoteQuestion
- Вызов: CAllVoteQuestion::setActive
static function setActive($ID, $activate = true)
{
$ID = intval($ID);
if ($ID <= 0)
return false;
$activate = (!!$activate);
/***************** Event onBeforeVoteQuestionUpdate ****************/
foreach (GetModuleEvents("vote", "onVoteQuestionActivate", true) as $arEvent)
if (ExecuteModuleEventEx($arEvent, array($ID, $activate)) === false)
return false;
/***************** /Event ******************************************/
global $DB;
$err_mess = (CAllVoteQuestion::err_mess())."
Function: activate
Line: ";
$strUpdate = $DB->PrepareUpdate("b_vote_question", array("ACTIVE" => ($activate ? "Y" : "N"), "~TIMESTAMP_X" => $DB->GetNowFunction()));
$DB->QueryBind("UPDATE b_vote_question SET ".$strUpdate." WHERE ID=".$ID, array(), false, $err_mess);
unset($GLOBALS["VOTE_CACHE"]["QUESTION"][$ID]);
return $ID;
}