//alowed only once in a minute
if($userPhone->getDateSent())
{
$currentDateTime = new Main\Type\DateTime();
if(($currentDateTime->getTimestamp() - $userPhone->getDateSent()->getTimestamp()) < static::PHONE_CODE_RESEND_INTERVAL)
{
$result->addError(new Main\Error(Loc::getMessage("main_register_timeout"), "ERR_TIMEOUT"));
return $result;
}
}
$iBlock = \Bitrix\Iblock\Iblock::wakeUp(1)->getEntityDataClass();
$iterator = $iBlock::getList([
'select' => ['ID', 'NAME', 'MULTIPLE']
, 'filter' => \Bitrix\Main\ORM\Query\Query::filter()
->where('ID', 1)
]);
$elements = $iterator->fetchCollection();
foreach ($elements as $element) {
var_dump($element->getId());
var_dump($element->getName());
foreach ($element->getMultiple()->getAll() as $prop) {
var_dump($prop->getId());
var_dump($prop->getValue());
}
}
...
if(in_array("POPULARITY", $arSorts)){
$arAvailableSort["SHOWS"] = array("SHOWS", "desc");
}
if(in_array("NAME", $arSorts)){
$arAvailableSort["NAME"] = array("NAME", "asc");
}
if(in_array("CATALOG_QUANTITY", $arSorts)){
$arAvailableSort["CATALOG_QUANTITY"] = array("CATALOG_QUANTITY", "desc");
}
...
\Bitrix\Main\Context::getCurrent()->getResponse()->setLastModified(
\Bitrix\Main\Type\DateTime::createFromUserTime($item["TIMESTAMP_X"])
);
if ($_SERVER["REQUEST_METHOD"] == "POST" && $_REQUEST["Reindex"] == "Y") {
@set_time_limit(0);
$res = CSearch::ReIndexAll(
$bFull, COption::GetOptionInt("search", "max_execution_time"), $NS, $_REQUEST["clear_suggest"] === "Y"
);
if (is_array($res)):
?>
<script>
CloseWaitWindow();
DoNext(<?echo $jsNS?>);
</script>
<?php
else:
?>
<script>
CloseWaitWindow();
EndReindex();
var search_message = BX('search_message');
if (search_message)
search_message.style.display = 'none';
</script>
<?php
endif;
}
function DoNext(NS) {
var queryString = 'Reindex=Y'
+ '&lang=<?echo htmlspecialcharsbx(LANG)?>';
...
ShowWaitWindow();
BX.ajax.post(
'search_reindex.php?' + queryString,
NS,
function (result) {
document.getElementById('reindex_result_div').innerHTML = result;
var href = document.getElementById('continue_href');
if (!href) {
CloseWaitWindow();
StopReindex();
}
}
);
return false;
}