bool CFormResult::SetStatus( int result_id, int status_id, string check_rights = "Y" )
The method SetStatus assigns a new status to a result.
Parameter | Description |
---|---|
result_id | The result ID. |
status_id | The new status ID. |
check_rights | Specifies that the current user access permissions should be checked. The following values are possible:
|
Returns true on success, or false otherwise.
<? $RESULT_ID = 189; // the result ID $STATUS_ID = 1; // the ID of the status "Published" // assign a new status to a result // check current user permissions if (CFormResult::SetStatus($RESULT_ID, $STATUS_ID)) { echo "Status #".$STATUS_ID." for result #".$RESULT_ID." successfully set."; } else // error { global $strError; echo $strError; } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |