protected function innerAdd(&$fields, &$errors, array $params = null) { if (!CCrmProduct::CheckCreatePermission()) { $errors[] = 'Access denied.'; return false; } $result = CCrmProductSection::Add($fields); if (!(is_int($result) && $result > 0)) { $errors[] = CCrmProductSection::GetLastError(); } return $result; }