protected function processActionSetLiveFeed() { $this->checkRequiredPostParams(array('iblockId', 'checked')); $this->iblockTypeId = COption::GetOptionString("lists", "livefeed_iblock_type_id"); $this->checkPermission(); if ($this->errorCollection->hasErrors()) { $this->sendJsonErrorResponse(); } $this->iblockId = intval($this->request->getPost('iblockId')); if ($this->request->getPost('checked') == 'true') { $checked = 1; } else { $checked = 0; } CLists::setLiveFeed($checked, $this->iblockId); $this->sendJsonSuccessResponse(); }
public static function migrateList($id) { $id = intval($id); if ($id <= 0) { throw new Main\ArgumentNullException("id"); } $db = \CIBlock::GetList(array(), array("ID" => $id, "IBLOCK_TYPE_ID" => "lists", "CHECK_PERMISSIONS" => "N")); $iblock = $db->Fetch(); if (!$iblock) { throw new Main\ArgumentOutOfRangeException("id"); } $iblockType = static::getIBlockType(); $ob = new \CIBlock(); $res = $ob->Update($id, array("IBLOCK_TYPE_ID" => $iblockType)); if ($res) { \CLists::setLiveFeed(1, $id); } \CBPDocument::MigrateDocumentType(array("lists", 'Bitrix\\Lists\\BizprocDocumentLists', "iblock_" . $id), array("lists", "BizprocDocument", "iblock_" . $id)); }