Documentation

CForumMessage::Update

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

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

Before a message is modified, you should check whether it can be modified using CForumMessage::CanUserUpdateMessage. It is recommended to add and modify messages and message subjects using the high level function ForumAddMessage.

Parameters

ParameterDescription
ID The ID of the message 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 message fields.
skip_counts If true, the statistical data is not updated when the message is modified. It speeds up the method execution but causes information to become somewhat logically inconsistent.

Optional. False by default.
strUploadDir Directory in which files are to be uploaded. Must be specified relative to the main upload directory.

Optional. The default value is "forum".

Return Values

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

See Also

  • Message fields
  • © «Bitrix24», 2001-2024
    Up