Bitrix Site Manager

CForumTopic::Update

int
Update(
 int ID,
 array arFields [,
 bool skip_counts]
);

The method Update modifies the parameters of the existing topic specified by the ID. Returns the ID of the modified topic.

Parameters

ParameterDescription
ID The ID of the topic whose parameters are to be modified.
arFields An array of the format Array(field1=>value1[, field2=>value2 [, ..]]), where
  • field - field name;
  • value - field value.
The fields are listed in the List of topic fields.
skip_counts If true, the statistical data is not updated when the topic is modified. It speeds up the method execution but causes information to become somewhat logically inconsistent.

Optional. False by default.

Return Values

Returns the ID of the modified topic on success, or false otherwise.

See Also

  • Topic fields
  • Before a topic is modified, you should check whether it can be modified using CanUserUpdateTopic. It is recommended to add and modify messages and message subjects using the high level function ForumAddMessage.