protected function innerDelete($ID, &$errors) { if (!(CCrmProduct::CheckDeletePermission($ID) && CCrmProduct::EnsureDefaultCatalogScope($ID))) { $errors[] = 'Access denied.'; return false; } $result = CCrmProduct::Delete($ID); if ($result !== true) { $errors[] = CCrmProduct::GetLastError(); } return $result; }
protected function innerDelete($ID, &$errors) { if (!CModule::IncludeModule('iblock')) { throw new RestException('Could not load iblock module.'); } if (!(CCrmProduct::CheckDeletePermission($ID) && CCrmProduct::EnsureDefaultCatalogScope($ID))) { $errors[] = 'Access denied.'; return false; } $result = CCrmProduct::Delete($ID); if ($result !== true) { $errors[] = CCrmProduct::GetLastError(); } return $result; }