• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/sticker.php
  • Класс: CSticker
  • Вызов: CSticker::SetHiden
static function SetHiden($ids = array(), $bHide = false)
{
	if (!is_array($ids))
		$ids = array($ids);

	if (!CSticker::CanDoOperation('sticker_edit'))
		return GetMessage('FMST_EDIT_ACCESS_ERROR');

	if (count($ids) == 0)
		return GetMessage('FMST_NO_ITEMS_WARN');

	global $DB;
	$strIds = "";
	for($i=0; $i < count($ids); $i++)
		$strIds .= ",".intval($ids[$i]);

	$arFields = array("CLOSED" => $bHide ? "Y" : "N");
	$strUpdate = $DB->PrepareUpdate("b_sticker", $arFields);
	$strSql =
		"UPDATE b_sticker SET ".
			$strUpdate.
		" WHERE ID in (".trim($strIds, ", ").")";

	if (!$DB->Query($strSql, false, "File: ".__FILE__."
Line: ".__LINE__)) return GetMessage('FMST_REQ_ERROR'); CSticker::ClearCache(); return true; }